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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sat Apr 11 21:49:14 UTC 2020


 sd/qa/unit/data/odp/tdf106026.odp  |binary
 sd/qa/unit/export-tests-ooxml2.cxx |   27 +++++++++++++++++++++++++++
 2 files changed, 27 insertions(+)

New commits:
commit b0b9d736fb9ed73e849f80800916466868dbce28
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sat Apr 11 22:25:45 2020 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Sat Apr 11 23:48:42 2020 +0200

    tdf#106026: Add unittest
    
    Change-Id: I9ac779a4b4a5578842a466bf5d03529ba658b6b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92066
    Tested-by: Jenkins
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sd/qa/unit/data/odp/tdf106026.odp b/sd/qa/unit/data/odp/tdf106026.odp
new file mode 100644
index 000000000000..0d77f755b081
Binary files /dev/null and b/sd/qa/unit/data/odp/tdf106026.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 17c0ea5e5dca..d462fd3220b2 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -123,6 +123,7 @@ public:
     void testTdf112333();
     void testTdf112552();
     void testTdf112557();
+    void testTdf106026();
     void testTdf112334();
     void testTdf112089();
     void testTdf112086();
@@ -231,6 +232,7 @@ public:
     CPPUNIT_TEST(testTdf112333);
     CPPUNIT_TEST(testTdf112552);
     CPPUNIT_TEST(testTdf112557);
+    CPPUNIT_TEST(testTdf106026);
     CPPUNIT_TEST(testTdf112334);
     CPPUNIT_TEST(testTdf112089);
     CPPUNIT_TEST(testTdf112086);
@@ -1384,6 +1386,31 @@ void SdOOXMLExportTest2::testTdf112557()
     xDocShRef->DoClose();
 }
 
+void SdOOXMLExportTest2::testTdf106026()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("/sd/qa/unit/data/odp/tdf106026.odp"), ODP);
+    utl::TempFile tempFile;
+    xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+    xmlDocPtr pXmlMasterContent = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[1]/a:pPr/a:spcBef/a:spcPts", "val", "1417");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[2]/a:pPr/a:spcBef/a:spcPts", "val", "1134");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[3]/a:pPr/a:spcBef/a:spcPts", "val", "850");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[4]/a:pPr/a:spcBef/a:spcPts", "val", "567");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[5]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[6]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+    assertXPath(pXmlMasterContent, "/p:sldMaster/p:cSld/p:spTree/p:sp/p:txBody/a:p[7]/a:pPr/a:spcBef/a:spcPts", "val", "283");
+
+    xmlDocPtr pXmlSlideContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+    assertXPath(pXmlSlideContent,
+                       "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+    assertXPath(pXmlSlideContent,
+                       "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+    assertXPath(pXmlSlideContent,
+                       "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:spcAft/a:spcPts", "val", "11339");
+    xDocShRef->DoClose();
+}
+
 void SdOOXMLExportTest2::testTdf112334()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf112334.pptx"), PPTX);


More information about the Libreoffice-commits mailing list