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

Balazs Varga (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 28 12:32:50 UTC 2019


 chart2/qa/extras/chart2import.cxx         |   19 +++++++++++++++++++
 chart2/qa/extras/data/xlsx/tdf126033.xlsx |binary
 chart2/source/view/main/VDataSeries.cxx   |    2 +-
 3 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit 2ba68f936669a6516eae8a8bff000131ac63f411
Author:     Balazs Varga <balazs.varga991 at gmail.com>
AuthorDate: Tue Jun 25 13:26:41 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Fri Jun 28 14:32:12 2019 +0200

    tdf#126033 chart: hide removed marker of a single data point
    
    instead of showing a black square.
    
    Note: the patch fixes also the OOXML import (see the unit test).
    
    Change-Id: Ie578db3dd9ba310b0ce972832269acd5ae501778
    Reviewed-on: https://gerrit.libreoffice.org/74690
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 2783a34899379dae84889c924e49481631280ab1)
    Reviewed-on: https://gerrit.libreoffice.org/74840
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index fa673ccbfde1..72b96c97dc48 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -74,6 +74,7 @@ public:
     void testTdf108021();
     void testTdf100084();
     void testTdf124817();
+    void testTdf126033();
     void testAutoBackgroundXLSX();
     void testAutoChartAreaBorderPropXLSX();
     void testChartAreaStyleBackgroundXLSX();
@@ -165,6 +166,7 @@ public:
     CPPUNIT_TEST(testTdf108021);
     CPPUNIT_TEST(testTdf100084);
     CPPUNIT_TEST(testTdf124817);
+    CPPUNIT_TEST(testTdf126033);
     CPPUNIT_TEST(testAutoBackgroundXLSX);
     CPPUNIT_TEST(testAutoChartAreaBorderPropXLSX);
     CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
@@ -929,6 +931,23 @@ void Chart2ImportTest::testTdf124817()
     CPPUNIT_ASSERT((xPropSet_2->getPropertyValue("Symbol") >>= aSymblProp) && (aSymblProp.BorderColor == static_cast<sal_Int32>(0xFF0000)));
 }
 
+void Chart2ImportTest::testTdf126033()
+{
+    load("/chart2/qa/extras/data/xlsx/", "tdf126033.xlsx");
+    Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+    CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+    // Check symbol style and size of data points
+    chart2::Symbol aSymblProp;
+    uno::Reference<chart2::XDataSeries> xDataSeries(getDataSeriesFromDoc(xChartDoc, 0));
+    CPPUNIT_ASSERT(xDataSeries.is());
+    uno::Reference<beans::XPropertySet> xPropertySet(xDataSeries->getDataPointByIndex(0), uno::UNO_SET_THROW);
+    CPPUNIT_ASSERT(xPropertySet->getPropertyValue("Symbol") >>= aSymblProp);
+    CPPUNIT_ASSERT_EQUAL(chart2::SymbolStyle_NONE, aSymblProp.Style);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Width);
+    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(176), aSymblProp.Size.Height);
+}
+
 void Chart2ImportTest::testTransparentBackground(OUString const & filename)
 {
     load("/chart2/qa/extras/data/xlsx/", filename);
diff --git a/chart2/qa/extras/data/xlsx/tdf126033.xlsx b/chart2/qa/extras/data/xlsx/tdf126033.xlsx
new file mode 100644
index 000000000000..ee60103c98e4
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/tdf126033.xlsx differ
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index 6d9b7d11196c..b9ea9266abd0 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -803,7 +803,7 @@ Symbol* VDataSeries::getSymbolProperties( sal_Int32 index ) const
                     m_apSymbolProperties_InvisibleSymbolForSelection.reset(new Symbol);
                     m_apSymbolProperties_InvisibleSymbolForSelection->Style = SymbolStyle_STANDARD;
                     m_apSymbolProperties_InvisibleSymbolForSelection->StandardSymbol = 0;//square
-                    m_apSymbolProperties_InvisibleSymbolForSelection->Size = m_apSymbolProperties_Series->Size;
+                    m_apSymbolProperties_InvisibleSymbolForSelection->Size = com::sun::star::awt::Size(0, 0);//tdf#126033
                     m_apSymbolProperties_InvisibleSymbolForSelection->BorderColor = 0xff000000;//invisible
                     m_apSymbolProperties_InvisibleSymbolForSelection->FillColor = 0xff000000;//invisible
                 }


More information about the Libreoffice-commits mailing list