summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/pptx/tdf104015.pptxbin0 -> 19185 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx40
2 files changed, 40 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf104015.pptx b/sd/qa/unit/data/pptx/tdf104015.pptx
new file mode 100644
index 000000000000..f3675f9e8805
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf104015.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f9f40cc198e5..6c14bd5da3dc 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -129,6 +129,7 @@ public:
void testTdf103473();
void testTdf103792();
void testTdf103876();
+ void testTdf104015();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -183,6 +184,7 @@ public:
CPPUNIT_TEST(testTdf103473);
CPPUNIT_TEST(testTdf103792);
CPPUNIT_TEST(testTdf103876);
+ CPPUNIT_TEST(testTdf104015);
CPPUNIT_TEST_SUITE_END();
};
@@ -1545,6 +1547,44 @@ void SdImportTest::testTdf103876()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf104015()
+{
+ // Shape fill, line and effect properties were not inherited from master slide shape
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf104015.pptx"), PPTX);
+
+ const SdrPage *pPage = GetPage( 1, xDocShRef );
+ CPPUNIT_ASSERT_MESSAGE("No page found", pPage != nullptr);
+ SdrObject *const pObj = pPage->GetObj(0);
+ CPPUNIT_ASSERT_MESSAGE("Wrong object", pObj != nullptr);
+ // Should have a red fill color
+ {
+ const XFillStyleItem& rStyleItem = dynamic_cast<const XFillStyleItem&>(
+ pObj->GetMergedItem(XATTR_FILLSTYLE));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, rStyleItem.GetValue());
+ const XFillColorItem& rColorItem = dynamic_cast<const XFillColorItem&>(
+ pObj->GetMergedItem(XATTR_FILLCOLOR));
+ CPPUNIT_ASSERT_EQUAL(ColorData(0xFF0000), rColorItem.GetColorValue().GetColor());
+ }
+ // Should have a blue line
+ {
+ const XLineStyleItem& rStyleItem = dynamic_cast<const XLineStyleItem&>(
+ pObj->GetMergedItem(XATTR_LINESTYLE));
+ CPPUNIT_ASSERT_EQUAL(drawing::LineStyle_SOLID, rStyleItem.GetValue());
+
+ const XLineColorItem& rColorItem = dynamic_cast<const XLineColorItem&>(
+ pObj->GetMergedItem(XATTR_LINECOLOR));
+ CPPUNIT_ASSERT_EQUAL(ColorData(0x0000FF), rColorItem.GetColorValue().GetColor());
+ }
+ // Should have some shadow
+ {
+ const SdrOnOffItem& rShadowItem = dynamic_cast<const SdrOnOffItem&>(
+ pObj->GetMergedItem(SDRATTR_SHADOW));
+ CPPUNIT_ASSERT(rShadowItem.GetValue());
+ }
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();