sd/qa/unit/data/pptx/tdf135843_export.pptx |binary sd/qa/unit/export-tests-ooxml3.cxx | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+)
New commits: commit ff0387e726b59e374029d2f635ce00308d99eff6 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Fri May 20 14:29:19 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri May 20 16:16:22 2022 +0200 tdf#135843: sd_export_tests-ooxml3: Add unittest for the export part 3faf005a367cbd28077403bf93810bbaf4805851 "tdf#135843 Implement inside horizontal vertical borders." also fixed a problem when exporting to PPTX. Before the patch, if attachment from tdf#106011 was exported to PPTX and then opened in Powerpoint, the table was visible there. Change-Id: Iaa06a0ab9d6421916eccd4944fd4a8f041046907 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134683 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/data/pptx/tdf135843_export.pptx b/sd/qa/unit/data/pptx/tdf135843_export.pptx new file mode 100644 index 000000000000..c07b0e0dfa9c Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf135843_export.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index c53abe6b363a..917142c61684 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -76,6 +76,7 @@ public: void testTdf99213(); void testPotxExport(); void testTdf44223(); + void testTdf135843(); void testSmartArtPreserve(); void testTdf125346(); void testTdf125346_2(); @@ -157,6 +158,7 @@ public: CPPUNIT_TEST(testTdf99213); CPPUNIT_TEST(testPotxExport); CPPUNIT_TEST(testTdf44223); + CPPUNIT_TEST(testTdf135843); CPPUNIT_TEST(testSmartArtPreserve); CPPUNIT_TEST(testTdf125346); CPPUNIT_TEST(testTdf125346_2); @@ -1169,6 +1171,31 @@ void SdOOXMLExportTest3::testTdf44223() xDocShRef->DoClose(); } +void SdOOXMLExportTest3::testTdf135843() +{ + ::sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf135843_export.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + + xmlDocUniquePtr pXmlDoc = parseExport(tempFile, "ppt/slides/slide1.xml"); + const OString sPathStart("/p:sld/p:cSld/p:spTree/p:graphicFrame/a:graphic/a:graphicData/a:tbl"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnL/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnR/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnT/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[1]/a:tc[1]/a:tcPr/a:lnB/a:noFill"); + + assertXPath(pXmlDoc, sPathStart + "/a:tr[2]/a:tc[1]/a:tcPr/a:lnL/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[2]/a:tc[1]/a:tcPr/a:lnR/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[2]/a:tc[1]/a:tcPr/a:lnT/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[2]/a:tc[1]/a:tcPr/a:lnB/a:noFill"); + + assertXPath(pXmlDoc, sPathStart + "/a:tr[3]/a:tc[1]/a:tcPr/a:lnL/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[3]/a:tc[1]/a:tcPr/a:lnR/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[3]/a:tc[1]/a:tcPr/a:lnT/a:noFill"); + assertXPath(pXmlDoc, sPathStart + "/a:tr[3]/a:tc[1]/a:tcPr/a:lnB/a:noFill"); +} + void SdOOXMLExportTest3::testSmartArtPreserve() { ::sd::DrawDocShellRef xDocShRef = loadURL(