[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - 2 commits - sw/source xmloff/source

Julien Nabet (via logerrit) logerrit at kemper.freedesktop.org
Thu Jan 23 14:44:20 UTC 2020


 sw/source/core/text/porlay.cxx       |    1 +
 xmloff/source/chart/PropertyMaps.cxx |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 5053f01bfebebd5a0f00e0f1c27d4868fbe2e6a0
Author:     Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Wed Jan 22 23:13:40 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 23 15:44:03 2020 +0100

    tdf#130133: fix wrong values for attribute chart:regression-type in ODF 1.2
    
    "polynomial" and "moving-average"
    
    Change-Id: I5d07d0315555e8b72ea721a35a2205a8223ed294
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87226
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 84c2b1ab7a8cf5d7f568ef05d4b2b25e783382b6)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87253
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index ecf7f86b870a..68658a2b1b06 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -466,6 +466,8 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
                 break;
             case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE:
                 {
+                    const SvtSaveOptions::ODFDefaultVersion nCurrentVersion( SvtSaveOptions().GetODFDefaultVersion() );
+
                     OUString aServiceName;
                     rProperty.maValue >>= aServiceName;
                     if      (aServiceName == "com.sun.star.chart2.LinearRegressionCurve")
@@ -476,9 +478,9 @@ void XMLChartExportPropertyMapper::handleSpecialItem(
                         sValueBuffer.append( GetXMLToken( XML_EXPONENTIAL ));
                     else if (aServiceName == "com.sun.star.chart2.PotentialRegressionCurve")
                         sValueBuffer.append( GetXMLToken( XML_POWER ));
-                    else if (aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
+                    else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.PolynomialRegressionCurve")
                         sValueBuffer.append( GetXMLToken( XML_POLYNOMIAL ));
-                    else if (aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
+                    else if (nCurrentVersion > SvtSaveOptions::ODFVER_012 && aServiceName == "com.sun.star.chart2.MovingAverageRegressionCurve")
                         sValueBuffer.append( GetXMLToken( XML_MOVING_AVERAGE ));
                 }
                 break;
commit b11ef7de2420a1f35290802145067cbbd2da5d93
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Jan 22 12:19:54 2020 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 23 15:43:46 2020 +0100

    sw_redlinehide: fix SwScriptInfo hidden text
    
    A missing update of nOffset in SwScriptInfo::InitScriptInfo(); it must
    be updated for every extent but it's not for the last one in a node.
    
    test case:
     ab
     cd
    Delete "bc", hide "d", but "a" disappears.
    
    (regression from 0e26d48ad7f18deac8447a306215f79d5c62be27)
    
    Change-Id: I99fb88409e184a61866f908722b4430a53914153
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87201
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 53cd5d1f50d3da4efe0938aa340f6a57a0b8501d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87246
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index e16619663f48..d9406a4e28c1 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -803,6 +803,7 @@ void SwScriptInfo::InitScriptInfo(const SwTextNode& rNode,
                     }
                 }
             }
+            nOffset += TextFrameIndex(iter->nEnd - iter->nStart);
         }
     }
     else


More information about the Libreoffice-commits mailing list