summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2017-12-08 23:54:30 +0100
committerEike Rathke <erack@redhat.com>2017-12-08 23:54:35 +0100
commit5a2daafe383a54c7b85c8259633b0bab7be935d6 (patch)
treee8a5a77c4342c4aba50922f9d3461ec2b8eafd38 /sc
parentbbbf15993c48fffcf99e62d4876910e18b633762 (diff)
GetCurrentNumberFormatType() mask out the user defined bit
SvNumberformat::GetType() includes css::util::NumberFormat::DEFINED whereas SvNumberFormatter::GetType() does not. For the type determination we don't need the user defined bit, or even don't want it to be a different type. Change-Id: I713eeb25af01110a0f27bc0c082a7483efdf55db
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/formatsh.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 8afb1072c1dd..eee8fd2f5c94 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -2871,11 +2871,7 @@ short ScFormatShell::GetCurrentNumberFormatType()
ScRange aColRange(nCol, nRow1, aRange.aStart.Tab());
aColRange.aEnd.SetRow(nRow2);
sal_uInt32 nNumFmt = pDoc->GetNumberFormat(aColRange);
- const SvNumberformat* pEntry = pFormatter->GetEntry(nNumFmt);
- if (!pEntry)
- return 0;
-
- short nThisType = pEntry->GetType();
+ short nThisType = pFormatter->GetType(nNumFmt);
if (bFirstItem)
{
bFirstItem = false;
@@ -2893,8 +2889,7 @@ short ScFormatShell::GetCurrentNumberFormatType()
sal_uInt32 nNumFmt;
pDoc->GetNumberFormat( pViewData->GetCurX(), pViewData->GetCurY(),
pViewData->GetTabNo(), nNumFmt );
- const SvNumberformat* pEntry = pFormatter->GetEntry( nNumFmt );
- nType = pEntry ? pEntry->GetType() : 0;
+ nType = pFormatter->GetType( nNumFmt );
}
return nType;
}