summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-08 22:20:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-12-09 22:00:18 +0100
commitdbbf644d22e3a893d83508d2c74e04a7ef9f8020 (patch)
tree1900f020f353a78736886b13410806a201b5dad8 /sc/source/ui
parent88fa077b264a07e43fcac33607adba20e37e25a2 (diff)
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 (cherry picked from commit 4d850442a04b63e4ed92dcd431c8620ce12010c2) Reviewed-on: https://gerrit.libreoffice.org/46128 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/view/formatsh.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 005a1c7a5174..82f5ba3fbc97 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2540,20 +2540,18 @@ void ScFormatShell::GetNumFormatState( SfxItemSet& rSet )
if ( rAttrSet.GetItemState( ATTR_VALUE_FORMAT ) >= 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;