summaryrefslogtreecommitdiff
path: root/sd/qa
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-10-18 16:20:43 +0200
committerLászló Németh <nemeth@numbertext.org>2022-11-02 08:03:40 +0100
commitea62cacd129f03813d7d3d214bf9aa2ae60bbef4 (patch)
tree47b04e541524edcaa2a27f0fd4d019ceeecd0718 /sd/qa
parent71081a2a79a7b5a1eefec60fc687c533a95d190d (diff)
tdf#151622 PPTX: fix export of show as icon option
Embedded OLE object wasn't look like an icon after its opening because of missing showAsIcon="1" of p:oleObj. Change-Id: I21dbd1e31f7e1de78d8bf548ca6f3619eb3e4a10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141505 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd/qa')
-rw-r--r--sd/qa/unit/data/odp/ole_icon.odpbin0 -> 18926 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx19
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/ole_icon.odp b/sd/qa/unit/data/odp/ole_icon.odp
new file mode 100644
index 000000000000..073899c6e564
--- /dev/null
+++ b/sd/qa/unit/data/odp/ole_icon.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index a4e5d882d8e6..93c8a3ac908e 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -129,6 +129,7 @@ public:
void testTdf94122_autoColor();
void testTdf124333();
void testAutofittedTextboxIndent();
+ void testTdf151622_oleIcon();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest3);
@@ -218,6 +219,7 @@ public:
CPPUNIT_TEST(testTdf94122_autoColor);
CPPUNIT_TEST(testTdf124333);
CPPUNIT_TEST(testAutofittedTextboxIndent);
+ CPPUNIT_TEST(testTdf151622_oleIcon);
CPPUNIT_TEST_SUITE_END();
virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -2071,6 +2073,23 @@ void SdOOXMLExportTest3::testAutofittedTextboxIndent()
"691200");
}
+void SdOOXMLExportTest3::testTdf151622_oleIcon()
+{
+ auto xDocShRef = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/ole_icon.odp"), ODP);
+
+ utl::TempFileNamed tmpfile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tmpfile);
+ xDocShRef->DoClose();
+
+ xmlDocUniquePtr pXml = parseExport(tmpfile, "ppt/slides/slide1.xml");
+
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expression: prop
+ // - In ..., XPath '//p:oleObj' no attribute 'showAsIcon' exist
+ // i.e. show as icon option wasn't exported.
+ assertXPath(pXml, "//p:oleObj", "showAsIcon", "1");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest3);
CPPUNIT_PLUGIN_IMPLEMENT();