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
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-02-18 21:52:52 +0100
commita9924d94e7db6db50b8b36a311f7d7abf80e4700 (patch)
treeded1372b5bc9a0f6692b651cb7863265d2de4b6b /chart2/qa/extras/chart2import.cxx
parent32fe0c6adcff25a0df536127ca980413e1cabefd (diff)
add test for missing chart area style fill import, tdf#89451
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 45fe8659a4c1..1eaa74de11de 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -56,6 +56,7 @@ public:
void testFdo54361();
void testFdo54361_1();
void testAutoBackgroundXLSX();
+ void testChartAreaStyleBackgroundXLSX();
// void testTextCanOverlapXLSX(); // TODO : temporarily disabled.
void testNumberFormatsXLSX();
@@ -87,6 +88,7 @@ public:
CPPUNIT_TEST(testFdo54361);
CPPUNIT_TEST(testFdo54361_1);
CPPUNIT_TEST(testAutoBackgroundXLSX);
+ CPPUNIT_TEST(testChartAreaStyleBackgroundXLSX);
// CPPUNIT_TEST(testTextCanOverlapXLSX); // TODO : temporarily disabled.
CPPUNIT_TEST(testNumberFormatsXLSX);
CPPUNIT_TEST_SUITE_END();
@@ -639,6 +641,23 @@ void Chart2ImportTest::testAutoBackgroundXLSX()
(nColor & 0x00FFFFFF) == 0x00FFFFFF); // highest 2 bytes are transparency which we ignore here.
}
+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);
+}
+
/* TODO : temporarily disabled.
void Chart2ImportTest::testTextCanOverlapXLSX()
{