summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorMatus Uzak <matus.uzak@gmail.com>2016-03-12 21:11:42 +0100
committerKatarina Behrens <Katarina.Behrens@cib.de>2016-03-29 12:18:28 +0000
commitbc14ec0f86647a39a954bd1c32b1671c22d7f475 (patch)
treef1b9404e72c669a5cf7a75e10aab219060e749cd /sd
parent0f2e6f1fbb42fe33bee3ffd5b5200b17be3382d9 (diff)
tdf#95932: PPTX import: Incorrect inheritance of shape style
Inheritance Order: 1. Reference Shape's properties, 2. Shape style, 3. Shape properties. You MUST NOT inherit reference shape's style, because it's already part of inherited reference shape's properties. That would overwrite shape properties applied at point 3, at slide layout/master level. Change-Id: Id1ab550295988b0087a67c6819dfe32f84825e4e Reviewed-on: https://gerrit.libreoffice.org/23182 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf95932.pptxbin0 -> 66621 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx20
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/tdf95932.pptx b/sd/qa/unit/data/pptx/tdf95932.pptx
new file mode 100644
index 000000000000..5e22b1158137
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf95932.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 9ae03fce4050..da4d4c49db67 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -111,6 +111,7 @@ public:
void testTdf62255();
void testTdf89927();
void testTdf93868();
+ void testTdf95932();
CPPUNIT_TEST_SUITE(SdImportTest);
@@ -156,6 +157,7 @@ public:
CPPUNIT_TEST(testTdf62255);
CPPUNIT_TEST(testTdf89927);
CPPUNIT_TEST(testTdf93868);
+ CPPUNIT_TEST(testTdf95932);
CPPUNIT_TEST_SUITE_END();
};
@@ -1233,6 +1235,24 @@ void SdImportTest::testTdf93868()
xDocShRef->DoClose();
}
+void SdImportTest::testTdf95932()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf95932.pptx"), PPTX);
+
+ const SdrPage *pPage = GetPage( 1, xDocShRef );
+ SdrObject *const pObj = pPage->GetObj(2);
+ CPPUNIT_ASSERT(pObj);
+
+ 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(0x76bf3d), rColorItem.GetColorValue().GetColor());
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdImportTest);
CPPUNIT_PLUGIN_IMPLEMENT();