summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2021-01-06 15:02:05 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-07 10:52:12 +0100
commit2569211290f460b4401a85f0540e965807bc5a34 (patch)
tree2ea4ca82ade12d7afc1201fdf03b6eaa1bafcbe2
parent0d55c821b72a4eba6f1696504888419ebcb23a20 (diff)
Resolves: tdf#139126 DBL_MAX is a valid value, just not for Writer
Restore the old side effect behaviour where "1.79769313486232E+308" was not converted back to DBL_MAX, Writer doesn't check cell value after import for this "special value", *cough*. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108875 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com> (cherry picked from commit 0e37ded8d4aea25e5d9f7325fba0597f509147bc) Conflicts: sw/source/filter/xml/xmltbli.cxx Change-Id: I31cf598d5f91d1f727d5f1f0e936a3505ea1b9e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108916 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/filter/xml/xmltbli.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 560e568c5f8e..518a0eec75e7 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -498,8 +498,10 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
break;
case XML_TOK_TABLE_VALUE:
{
+ // Writer wrongly uses DBL_MAX to flag error but fails to
+ // check for it after import, so check that here, tdf#139126.
double fTmp;
- if (::sax::Converter::convertDouble(fTmp, rValue))
+ if (::sax::Converter::convertDouble(fTmp, rValue) && fTmp < DBL_MAX)
{
m_fValue = fTmp;
m_bHasValue = true;