summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests-ooxml2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/qa/unit/export-tests-ooxml2.cxx')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx37
1 files changed, 37 insertions, 0 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index b2d30225af44..f057dd8e7e05 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -149,6 +149,7 @@ public:
void testTdf118825();
void testTextColumns_tdf140852();
void testTextColumns_3columns();
+ void testTdf59323_slideFooters();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest2);
@@ -213,6 +214,7 @@ public:
CPPUNIT_TEST(testTdf118825);
CPPUNIT_TEST(testTextColumns_tdf140852);
CPPUNIT_TEST(testTextColumns_3columns);
+ CPPUNIT_TEST(testTdf59323_slideFooters);
CPPUNIT_TEST_SUITE_END();
@@ -1742,6 +1744,41 @@ void SdOOXMLExportTest2::testTextColumns_3columns()
tempFile.EnableKillingFile();
}
+void SdOOXMLExportTest2::testTdf59323_slideFooters()
+{
+ ::sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf59323.pptx"), PPTX);
+
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+
+ uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(),
+ uno::UNO_QUERY_THROW);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xDoc->getDrawPages()->getCount());
+
+ for (int nPageIndex = 0; nPageIndex < 3; nPageIndex++)
+ {
+ uno::Reference<drawing::XDrawPage> xPage(getPage(0, xDocShRef));
+ uno::Reference<beans::XPropertySet> xPropSet(xPage, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xPropSet->getPropertyValue("IsFooterVisible") == true);
+ CPPUNIT_ASSERT(xPropSet->getPropertyValue("IsDateTimeVisible") == true);
+ CPPUNIT_ASSERT(xPropSet->getPropertyValue("IsPageNumberVisible") == true);
+ }
+
+ // Test placeholder indexes
+ xmlDocUniquePtr pXmlDocMaster = parseExport(tempFile, "ppt/slideMasters/slideMaster1.xml");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='dt']", "idx", "2");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='ftr']", "idx", "3");
+ assertXPath(pXmlDocMaster, "//p:ph [@type='sldNum']", "idx", "4");
+
+ xmlDocUniquePtr pXmlDocSlide1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='dt']", "idx", "2");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='ftr']", "idx", "3");
+ assertXPath(pXmlDocSlide1, "//p:ph [@type='sldNum']", "idx", "4");
+
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2);
CPPUNIT_PLUGIN_IMPLEMENT();