diff options
author | Attila Bakos (NISZ) <bakos.attilakaroly@nisz.hu> | 2021-06-08 12:25:41 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-07-02 14:23:17 +0200 |
commit | dbdcceb9d77c602ea1161ab0f4e3899071333a92 (patch) | |
tree | 7e74fc3ceec5114417ec504ab90a101b5520c5a2 /sd/qa/unit | |
parent | 261a28da833c73045080e6d29d8bf87f4542fd12 (diff) |
tdf#142235 PPTX export: fix styles with placeholders
inserting icons and alignment.
Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e
(tdf#111903 tdf#137152 PPTX export: fix placeholders).
Note: in the unit test document, check fixed vertical position
of the second text boxes of Slide 2–4.
Change-Id: I3c649db69f94a2e9f49ae7aa11d9cd9d9f6d80d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116828
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/data/odp/placeholder-box-textalignment.odp | bin | 0 -> 15853 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml3.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/placeholder-box-textalignment.odp b/sd/qa/unit/data/odp/placeholder-box-textalignment.odp Binary files differnew file mode 100644 index 000000000000..df33291fbd40 --- /dev/null +++ b/sd/qa/unit/data/odp/placeholder-box-textalignment.odp diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index fb2db18e8d22..6632934e430e 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -116,6 +116,7 @@ public: void testTdf125560_textDeflate(); void testTdf125560_textInflateTop(); void testTdf96061_textHighlight(); + void testTdf142235_TestPlaceholderTextAlignment(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest3); @@ -184,6 +185,7 @@ public: CPPUNIT_TEST(testTdf125560_textDeflate); CPPUNIT_TEST(testTdf125560_textInflateTop); CPPUNIT_TEST(testTdf96061_textHighlight); + CPPUNIT_TEST(testTdf142235_TestPlaceholderTextAlignment); CPPUNIT_TEST_SUITE_END(); virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override @@ -1688,6 +1690,24 @@ void SdOOXMLExportTest3::testTdf125560_textInflateTop() "type", "mso-spt164"); } +void SdOOXMLExportTest3::testTdf142235_TestPlaceholderTextAlignment() +{ + auto xDocShRef = loadURL( + m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/placeholder-box-textalignment.odp"), ODP); + + utl::TempFile tmpfile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tmpfile); + xDocShRef->DoClose(); + + xmlDocUniquePtr pXml1 = parseExport(tmpfile, "ppt/slides/slide2.xml"); + xmlDocUniquePtr pXml2 = parseExport(tmpfile, "ppt/slides/slide3.xml"); + + // Without the fix in place many of these asserts failed, because alignment was bad. + + assertXPath(pXml1, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr", "anchor", "t"); + assertXPath(pXml2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:bodyPr", "anchor", "t"); +} + void SdOOXMLExportTest3::testTdf96061_textHighlight() { ::sd::DrawDocShellRef xDocShRef |