diff options
-rw-r--r-- | sc/source/ui/view/formatsh.cxx | 9 |
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; } |