[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Eike Rathke (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 7 09:53:01 UTC 2021


 sw/source/filter/xml/xmltbli.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 428244a88ab01c68a8dec4d39eff3c0ece69b784
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Wed Jan 6 15:02:05 2021 +0100
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Thu Jan 7 10:52:28 2021 +0100

    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 at 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/+/108900
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 5a95befacf47..de540a39e17a 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;


More information about the Libreoffice-commits mailing list