[Libreoffice-commits] core.git: sc/qa sc/source

Caolán McNamara caolanm at redhat.com
Mon Mar 26 12:58:45 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 01582612fe1283025685b09d23aba27435696c92
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/51854
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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 91774388322c..50329d2350b4 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -1872,6 +1872,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