summaryrefslogtreecommitdiff
path: root/chart2/qa/extras/chart2import.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2015-02-18 21:44:28 +0100
committerAndras Timar <andras.timar@collabora.com>2015-02-19 10:36:20 +0100
commitf95aeba3f32596b6bb623610aa8a5fd2289f4cf4 (patch)
tree98c9df1a05187e987e3ebd63c643bb3b84a41605 /chart2/qa/extras/chart2import.cxx
parent1141870c3c8f8e89370e3866045ffbd351fbba6a (diff)
add test for missing chart area style fill import, tdf#89451
(cherry picked from commit a9924d94e7db6db50b8b36a311f7d7abf80e4700) Conflicts: chart2/qa/extras/chart2import.cxx Change-Id: I052838eaf4134a72feb067fc2a1355fabcafe11f
Diffstat (limited to 'chart2/qa/extras/chart2import.cxx')
-rw-r--r--chart2/qa/extras/chart2import.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 67ada3985f1d..07b3dc0a4071 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -34,6 +34,7 @@ public:
void testPPTXChartSeries();
void testPPTChartSeries();
void testODPChartSeries();
+ void testChartAreaStyleBackgroundXLSX();
void testNumberFormatsXLSX();
CPPUNIT_TEST_SUITE(Chart2ImportTest);
@@ -55,6 +56,7 @@ public:
// CPPUNIT_TEST(testPPTChartSeries);
// CPPUNIT_TEST(testPPTXChartSeries);
// CPPUNIT_TEST(testODPChartSeries);
+ CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
CPPUNIT_TEST(testNumberFormatsXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -297,6 +299,23 @@ void Chart2ImportTest::testODPChartSeries()
CPPUNIT_ASSERT_EQUAL(OUString("Column 3"), seriesList[2]);
}
+void Chart2ImportTest::testChartAreaStyleBackgroundXLSX()
+{
+ load("/chart2/qa/extras/data/xlsx/", "chart-area-style-background.xlsx");
+ uno::Reference<chart2::XChartDocument> xChartDoc = getChartDocFromSheet(0, mxComponent);
+ CPPUNIT_ASSERT_MESSAGE("failed to load chart", xChartDoc.is());
+
+ // "Automatic" chart background fill in xlsx should be loaded as solid white.
+ Reference<beans::XPropertySet> xPropSet = xChartDoc->getPageBackground();
+ CPPUNIT_ASSERT(xPropSet.is());
+ drawing::FillStyle eStyle = xPropSet->getPropertyValue("FillStyle").get<drawing::FillStyle>();
+ sal_Int32 nColor = xPropSet->getPropertyValue("FillColor").get<sal_Int32>();
+ CPPUNIT_ASSERT_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid fill.",
+ eStyle == drawing::FillStyle_SOLID);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'Automatic' chart background fill in xlsx should be loaded as solid white.",
+ sal_Int32(0), nColor);
+}
+
void Chart2ImportTest::testNumberFormatsXLSX()
{