[Libreoffice-commits] core.git: chart2/qa

Heena Gupta heena.h.gupta at ericsson.com
Thu Jul 3 07:18:40 PDT 2014


 chart2/qa/extras/chart2import.cxx        |   21 +++++++++++++++++++++
 chart2/qa/extras/data/xlsx/fdo54361.xlsx |binary
 2 files changed, 21 insertions(+)

New commits:
commit 994fc8faa1cd232456910e2de1ff4add1eee024a
Author: Heena Gupta <heena.h.gupta at ericsson.com>
Date:   Mon Jun 30 15:12:32 2014 +0530

    fdo#54361:Add test case for the chart background
    
    Change-Id: I03f0a45d821b14fe687b3ec7df98f9367adab1f2
    Reviewed-on: https://gerrit.libreoffice.org/9978
    Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index b7c1e78..41a9a2f 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -16,6 +16,7 @@
 #include <com/sun/star/chart/XChartData.hpp>
 #include <com/sun/star/chart2/XInternalDataProvider.hpp>
 #include <com/sun/star/chart/XChartDataArray.hpp>
+#include <com/sun/star/drawing/FillStyle.hpp>
 
 #include <com/sun/star/util/Color.hpp>
 
@@ -40,6 +41,7 @@ public:
     void testDelayedCellImport(); // chart range referencing content on later sheets
     void testFlatODSStackedColumnChart();
     void testFdo78080();
+    void testFdo54361();
 
     CPPUNIT_TEST_SUITE(Chart2ImportTest);
     CPPUNIT_TEST(Fdo60083);
@@ -66,6 +68,7 @@ public:
     CPPUNIT_TEST(testDelayedCellImport);
     CPPUNIT_TEST(testFlatODSStackedColumnChart);
     CPPUNIT_TEST(testFdo78080);
+    CPPUNIT_TEST(testFdo54361);
     CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -396,6 +399,24 @@ void Chart2ImportTest::testFdo78080()
     CPPUNIT_ASSERT(!xTitle.is());
 }
 
+void Chart2ImportTest::testFdo54361()
+{
+    load("/chart2/qa/extras/data/xlsx/", "fdo54361.xlsx");
+    uno::Reference< chart2::XChartDocument > xChartDoc = getChartDocFromSheet(0, mxComponent);
+    CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+    uno::Reference< chart::XChartDocument > xChart2Doc (xChartDoc, uno::UNO_QUERY);
+    CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChart2Doc.is());
+
+    Reference< beans::XPropertySet > xPropSet( xChart2Doc->getArea(), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_MESSAGE("failed to get Area", xPropSet.is());
+
+    com::sun::star::drawing::FillStyle aStyle;
+    xPropSet -> getPropertyValue("FillStyle") >>= aStyle;
+
+    CPPUNIT_ASSERT_MESSAGE("Background needs to be with solid fill style", aStyle == 1);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Chart2ImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/chart2/qa/extras/data/xlsx/fdo54361.xlsx b/chart2/qa/extras/data/xlsx/fdo54361.xlsx
new file mode 100644
index 0000000..2c49802
Binary files /dev/null and b/chart2/qa/extras/data/xlsx/fdo54361.xlsx differ


More information about the Libreoffice-commits mailing list