sc/source/filter/html/htmlpars.cxx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-)
New commits: commit 93ceaadd6e40c458385471445e644f82815d9249 Author: Eike Rathke <er...@redhat.com> Date: Thu May 16 20:49:26 2013 +0200 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. diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 0a6a89c..110a7cb 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits