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

Caolán McNamara caolanm at redhat.com
Thu Apr 5 14:16:44 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 06af4f16ec1a6bfc93d5f22dba073a1f7093df8d
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/51861
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

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 4243fd08221e..5cef222d07ce 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