diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-05-01 00:26:21 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2020-05-04 10:35:23 +0200 |
commit | f3fc0116ff5258bdee68518ae3ae53f59e8dbbd5 (patch) | |
tree | fed9234d56b36fd42b3a8d562de79de06fb5a298 /sd/qa/unit | |
parent | 070f44e3b2d7dcf26de68ee46c50dad5c0cf2170 (diff) |
tdf#79082 Add test for correctly importing tab stops from ppt
Change-Id: Iafccbe50e6e00e3a4c5155dabf898c12e8b8176c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93397
Tested-by: Jenkins
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/data/ppt/tdf79082.ppt | bin | 0 -> 72704 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 42 |
2 files changed, 42 insertions, 0 deletions
diff --git a/sd/qa/unit/data/ppt/tdf79082.ppt b/sd/qa/unit/data/ppt/tdf79082.ppt Binary files differnew file mode 100644 index 000000000000..259b8808515d --- /dev/null +++ b/sd/qa/unit/data/ppt/tdf79082.ppt diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index fef365062ada..d82d9ba52932 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -53,6 +53,7 @@ public: void testUnknownAttributes(); void testTdf80020(); void testLinkedGraphicRT(); + void testTdf79082(); void testImageWithSpecialID(); void testTdf62176(); void testTransparentBackground(); @@ -86,6 +87,7 @@ public: CPPUNIT_TEST(testUnknownAttributes); CPPUNIT_TEST(testTdf80020); CPPUNIT_TEST(testLinkedGraphicRT); + CPPUNIT_TEST(testTdf79082); CPPUNIT_TEST(testImageWithSpecialID); CPPUNIT_TEST(testTdf62176); CPPUNIT_TEST(testTransparentBackground); @@ -670,6 +672,46 @@ void SdExportTest::testLinkedGraphicRT() } } +void SdExportTest::testTdf79082() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/ppt/tdf79082.ppt"), PPT); + utl::TempFile tempFile; + tempFile.EnableKillingFile(); + xDocShRef = saveAndReload(xDocShRef.get(), ODP, &tempFile); + xmlDocPtr pXmlDoc = parseExport(tempFile, "content.xml"); + + // P1 should have 6 tab stops defined + assertXPathChildren( + pXmlDoc, "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops", 6); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[1]", + "position", "0cm"); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[2]", + "position", "5.08cm"); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[3]", + "position", "10.16cm"); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[4]", + "position", "15.24cm"); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[5]", + "position", "20.32cm"); + assertXPath(pXmlDoc, + "//style:style[@style:name='P1']/style:paragraph-properties/style:tab-stops/" + "style:tab-stop[6]", + "position", "25.4cm"); + + xDocShRef->DoClose(); +} + void SdExportTest::testImageWithSpecialID() { // Check how LO handles when the imported graphic's ID is different from that one |