[Libreoffice-commits] core.git: sd/qa

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon May 4 08:36:03 UTC 2020


 sd/qa/unit/data/ppt/tdf79082.ppt |binary
 sd/qa/unit/export-tests.cxx      |   42 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

New commits:
commit f3fc0116ff5258bdee68518ae3ae53f59e8dbbd5
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri May 1 00:26:21 2020 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon May 4 10:35:23 2020 +0200

    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 at cib.de>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

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
Binary files /dev/null and b/sd/qa/unit/data/ppt/tdf79082.ppt differ
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


More information about the Libreoffice-commits mailing list