Kaydet (Commit) 93ceaadd authored tarafından Eike Rathke's avatar Eike Rathke

no number format mumbo-jumbo needed on empty format string

For every cell with CSS class attribute we tried to obtain the number format
from the number formatter and if not found tried to create it, even for empty
strings (no mso-number-format attribute present) which are never number
formats. Skip that.
üst 38b06c66
......@@ -2238,16 +2238,19 @@ void ScHTMLTable::DataOn( const ImportInfo& rInfo )
OUString aProp("mso-number-format");
const ScHTMLStyles& rStyles = mpParser->GetStyles();
const OUString& rVal = rStyles.getPropertyValue(aElem, aClass, aProp);
OUString aNumFmt = decodeNumberFormat(rVal);
nNumberFormat = GetFormatTable()->GetEntryKey(aNumFmt);
if (nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND)
if (!rVal.isEmpty())
{
sal_Int32 nErrPos = 0;
short nDummy;
bool bValidFmt = GetFormatTable()->PutEntry(aNumFmt, nErrPos, nDummy, nNumberFormat);
if (!bValidFmt)
nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
OUString aNumFmt = decodeNumberFormat(rVal);
nNumberFormat = GetFormatTable()->GetEntryKey(aNumFmt);
if (nNumberFormat == NUMBERFORMAT_ENTRY_NOT_FOUND)
{
sal_Int32 nErrPos = 0;
short nDummy;
bool bValidFmt = GetFormatTable()->PutEntry(aNumFmt, nErrPos, nDummy, nNumberFormat);
if (!bValidFmt)
nNumberFormat = NUMBERFORMAT_ENTRY_NOT_FOUND;
}
}
}
break;
......
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