[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sc/qa sc/source

Caolán McNamara caolanm at redhat.com
Thu Apr 5 14:19:23 UTC 2018


 sc/qa/unit/data/xls/pass/forcepoint-selfseriesadd.xls |binary
 sc/source/filter/excel/xichart.cxx                    |    5 +++++
 2 files changed, 5 insertions(+)

New commits:
commit a471620af5099c960e22b46fad6e6f92a5055dbd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Mar 26 08:57:09 2018 +0100

    forcepoint #29 detect illegal self series add
    
    Change-Id: I3bba0f942780c54951a3a810c05cc3b56ca18a5e
    Reviewed-on: https://gerrit.libreoffice.org/51862
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/sc/qa/unit/data/xls/pass/forcepoint-selfseriesadd.xls b/sc/qa/unit/data/xls/pass/forcepoint-selfseriesadd.xls
new file mode 100755
index 000000000000..e5eafd262520
Binary files /dev/null and b/sc/qa/unit/data/xls/pass/forcepoint-selfseriesadd.xls differ
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 9eda9e33c883..db71be8dc037 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1871,6 +1871,11 @@ void XclImpChSeries::SetDataLabel( const XclImpChTextRef& xLabel )
 void XclImpChSeries::AddChildSeries( const XclImpChSeries& rSeries )
 {
     OSL_ENSURE( !HasParentSeries(), "XclImpChSeries::AddChildSeries - not allowed for child series" );
+    if (&rSeries == this)
+    {
+        SAL_WARN("sc.filter", "self add attempt");
+        return;
+    }
 
     /*  In Excel, trend lines and error bars are stored as own series. In Calc,
         these are properties of the parent series. This function adds the


More information about the Libreoffice-commits mailing list