summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-05-01 00:26:21 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-05-19 23:41:47 +0200
commite990859780840f431a99c7da70084c22e740ac08 (patch)
tree1d480401fd04f74f599ba5b8aa18739bd9851ee6
parentfe99cb040ef087618973332802877fff45e9b7fc (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94428 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sd/qa/unit/data/ppt/tdf79082.pptbin0 -> 72704 bytes
-rw-r--r--sd/qa/unit/export-tests.cxx42
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
new file mode 100644
index 000000000000..259b8808515d
--- /dev/null
+++ b/sd/qa/unit/data/ppt/tdf79082.ppt
Binary files differ
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 57fe771339f1..38578766934d 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -52,6 +52,7 @@ public:
void testUnknownAttributes();
void testTdf80020();
void testLinkedGraphicRT();
+ void testTdf79082();
void testImageWithSpecialID();
void testTdf62176();
void testTransparentBackground();
@@ -83,6 +84,7 @@ public:
CPPUNIT_TEST(testUnknownAttributes);
CPPUNIT_TEST(testTdf80020);
CPPUNIT_TEST(testLinkedGraphicRT);
+ CPPUNIT_TEST(testTdf79082);
CPPUNIT_TEST(testImageWithSpecialID);
CPPUNIT_TEST(testTdf62176);
CPPUNIT_TEST(testTransparentBackground);
@@ -661,6 +663,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