summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-09-13 10:29:03 +0200
committerLászló Németh <nemeth@numbertext.org>2022-09-28 14:16:50 +0200
commitadc042f95d3dbd65b778260025d59283146916e5 (patch)
treebe039e80dd6ca2d4b2d8d2baa4c5af0f5ae11ebd /sd
parent36003e7644014cde9330bf45fee3815278a74035 (diff)
tdf#124333 PPTX import: fix Z-order of embedded OLE objects
Choose mc:Choice in a:graphicData element if the selected p:oleObj element has a shape id to avoid of shape duplication which created also bad layout/overlapping because of the different Z-order of the duplicated shape. Change-Id: Idecff4903c2d637bc82353f13352cac72413cec1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140041 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/ole.pptxbin0 -> 41588 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/ole.pptx b/sd/qa/unit/data/pptx/ole.pptx
new file mode 100644
index 000000000000..b998e79e0d66
--- /dev/null
+++ b/sd/qa/unit/data/pptx/ole.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index c12a1f0ec4bd..e2ef6928104f 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -122,6 +122,7 @@ public:
void testTdf149551_tbrl90();
void testTdf149551_btlr();
void testTdf94122_autoColor();
+ void testTdf124333();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest3);
@@ -209,6 +210,7 @@ public:
CPPUNIT_TEST(testTdf149551_tbrl90);
CPPUNIT_TEST(testTdf149551_btlr);
CPPUNIT_TEST(testTdf94122_autoColor);
+ CPPUNIT_TEST(testTdf124333);
CPPUNIT_TEST_SUITE_END();
virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -2260,6 +2262,25 @@ void SdOOXMLExportTest3::testTdf94122_autoColor()
"val", "000000");
}
+void SdOOXMLExportTest3::testTdf124333()
+{
+ // Document contains one rectangle and one embedded OLE object.
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/ole.pptx"), PPTX);
+
+ // Without the fix in place, the number of shapes was 3.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect", sal_Int32(2),
+ getPage(0, xDocShRef)->getCount());
+
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX);
+
+ // Check number of shapes after export.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("number of shapes is incorrect after export", sal_Int32(2),
+ getPage(0, xDocShRef)->getCount());
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest3);
CPPUNIT_PLUGIN_IMPLEMENT();