summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-04-11 22:25:45 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2020-04-11 23:48:42 +0200
commitb0b9d736fb9ed73e849f80800916466868dbce28 (patch)
tree5b4fc997787c8e83c7f48e484672f1b132d677fc /sd
parent95460224f4f8443547dbf5cedbea008ea2639337 (diff)
tdf#106026: Add unittest
Change-Id: I9ac779a4b4a5578842a466bf5d03529ba658b6b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92066 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/odp/tdf106026.odpbin0 -> 10876 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx27
2 files changed, 27 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf106026.odp
Binary files 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);