diff options
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/pptx/fill-color-list.pptx | bin | 0 -> 41044 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests-smartart.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/fill-color-list.pptx b/sd/qa/unit/data/pptx/fill-color-list.pptx Binary files differnew file mode 100644 index 000000000000..341233ad5f78 --- /dev/null +++ b/sd/qa/unit/data/pptx/fill-color-list.pptx diff --git a/sd/qa/unit/import-tests-smartart.cxx b/sd/qa/unit/import-tests-smartart.cxx index d14c4bc6950a..273056c868d7 100644 --- a/sd/qa/unit/import-tests-smartart.cxx +++ b/sd/qa/unit/import-tests-smartart.cxx @@ -105,6 +105,7 @@ public: void testRecursion(); void testDataFollow(); void testOrgChart2(); + void testFillColorList(); CPPUNIT_TEST_SUITE(SdImportTestSmartArt); @@ -149,6 +150,7 @@ public: CPPUNIT_TEST(testRecursion); CPPUNIT_TEST(testDataFollow); CPPUNIT_TEST(testOrgChart2); + CPPUNIT_TEST(testFillColorList); CPPUNIT_TEST_SUITE_END(); }; @@ -1454,6 +1456,23 @@ void SdImportTestSmartArt::testOrgChart2() xDocShRef->DoClose(); } +void SdImportTestSmartArt::testFillColorList() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/fill-color-list.pptx"), PPTX); + uno::Reference<drawing::XShape> xGroup(getShapeFromPage(0, 0, xDocShRef), uno::UNO_QUERY); + uno::Reference<drawing::XShape> xShape = getChildShape(getChildShape(xGroup, 1), 0); + uno::Reference<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY_THROW); + sal_Int32 nFillColor = 0; + xPropertySet->getPropertyValue("FillColor") >>= nFillColor; + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 12603469 (0xc0504d) + // - Actual : 16225862 (0xf79646) + // i.e. the background of the "A" shape was orange-ish, rather than red-ish. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0xC0504D), nFillColor); + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTestSmartArt); CPPUNIT_PLUGIN_IMPLEMENT(); |