diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-06 16:55:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-06 16:43:41 +0000 |
commit | 59339dec1ce56213dc74a06af2f0d35ac1c534d7 (patch) | |
tree | 6bd09e1e426ad21ec1bb893ab2a6d4dc4510f208 /sd | |
parent | ac561ab34ea9d26243fe3791f624c440dcf7ae6d (diff) |
tdf#105150 PPTX import: try harder to handle <p:sp useBgFill="1">
The bugdoc has two shapes. The red rectangle is supposed to be covered
by the other shape, but it wasn't as the fill style was set to none. The
reason for that was we ignored useBgFill, unless the slide had an
explicit fill style. Assume that in that case a white solid fill is the
default.
Change-Id: Iea20e216e44e13db68887f285c10bc1a8feacf0a
Reviewed-on: https://gerrit.libreoffice.org/32786
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/tdf105150.pptx | bin | 0 -> 31961 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf105150.pptx b/sd/qa/unit/data/pptx/tdf105150.pptx Binary files differnew file mode 100644 index 000000000000..48a2e01dc4b7 --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf105150.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index f4faf00dfd65..eb56ffb99feb 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -134,6 +134,7 @@ public: void testTdf104201(); void testTdf103477(); void testTdf104445(); + void testTdf105150(); CPPUNIT_TEST_SUITE(SdImportTest); @@ -192,6 +193,7 @@ public: CPPUNIT_TEST(testTdf104201); CPPUNIT_TEST(testTdf103477); CPPUNIT_TEST(testTdf104445); + CPPUNIT_TEST(testTdf105150); CPPUNIT_TEST_SUITE_END(); }; @@ -1641,6 +1643,18 @@ void SdImportTest::testTdf103477() xDocShRef->DoClose(); } +void SdImportTest::testTdf105150() +{ + sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf105150.pptx"), PPTX); + const SdrPage* pPage = GetPage(1, xDocShRef); + const SdrObject* pObj = pPage->GetObj(1); + auto& rFillStyleItem = dynamic_cast<const XFillStyleItem&>(pObj->GetMergedItem(XATTR_FILLSTYLE)); + // This was drawing::FillStyle_NONE, <p:sp useBgFill="1"> was ignored when + // the slide didn't have an explicit background fill. + CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, rFillStyleItem.GetValue()); + xDocShRef->DoClose(); +} + void SdImportTest::testTdf104445() { // Extra bullets were added to the first shape |