Kaydet (Commit) 5a2daafe authored tarafından Eike Rathke's avatar Eike Rathke

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
üst bbbf1599
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment