summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorHeena Gupta <heena.h.gupta@ericsson.com>2014-06-30 15:12:32 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-07-03 14:18:13 +0000
commit994fc8faa1cd232456910e2de1ff4add1eee024a (patch)
treefabe4e62c588997e17f18023fdd0739bca478418 /chart2/qa/extras/chart2import.cxx
parent0ed069ff8dc941bf902edfefd5c62f1ece3f8ad8 (diff)
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@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index b7c1e78f663b..41a9a2f61ed0 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();