sc/source/ui/view/formatsh.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 4d850442a04b63e4ed92dcd431c8620ce12010c2 Author: Eike Rathke <er...@redhat.com> Date: Fri Dec 8 22:20:39 2017 +0100 A "standard" format does not necessarily mean the General format Actually there can be up to three and most times are at least two (short,medium[,long]) of which usually the medium default is General. Change-Id: Iab853fbaa2db3dca488ee40f63271ccd55b6b517 diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index cac33f075b87..cb8e690bda15 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -2606,20 +2606,18 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet ) if ( eItemState >= SfxItemState::DEFAULT ) //Modify for more robust { const SvNumberformat* pFormatEntry = pFormatter->GetEntry( nNumberFormat ); - bool bStandard = false; if ( pFormatEntry ) { aFormatCode = pFormatEntry->GetType(); - bStandard = pFormatEntry->IsStandard(); } switch(aFormatCode) { case css::util::NumberFormat::NUMBER: case css::util::NumberFormat::NUMBER| css::util::NumberFormat::DEFINED: - //use format code and standard format code to judge whether it is General, - if (bStandard) + // Determine if General format. + if ((nNumberFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0) aFormatCode = 0; else aFormatCode = 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits