summaryrefslogtreecommitdiff
path: root/sd/qa/unit/export-tests.cxx
diff options
context:
space:
mode:
authorVaibhavMalik4187 <vaibhavmalik2018@gmail.com>2022-02-24 00:03:51 +0530
committerXisco Fauli <xiscofauli@libreoffice.org>2022-03-08 11:22:29 +0100
commit5c9e6a6a2b7fbdfc3ee32ef2b9d5433270fd6161 (patch)
treed622b7f29385863f75c33258dea1fc052c177b2b /sd/qa/unit/export-tests.cxx
parentba2f243d684fce905b1dc8871f57c64008471405 (diff)
tdf#112126 Added Unit Test
Change-Id: Ia02d0846ee932188a90687a2f29183e34e01c4c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129922 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/qa/unit/export-tests.cxx')
-rw-r--r--sd/qa/unit/export-tests.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 8d4898feb6a7..fd2380af5cf9 100644
--- a/sd/qa/unit/export-tests.cxx
+++ b/sd/qa/unit/export-tests.cxx
@@ -94,6 +94,7 @@ public:
void testTdf140714();
void testMasterPageBackgroundFullSize();
void testColumnsODG();
+ void testTdf112126();
CPPUNIT_TEST_SUITE(SdExportTest);
@@ -141,7 +142,7 @@ public:
CPPUNIT_TEST(testTdf140714);
CPPUNIT_TEST(testMasterPageBackgroundFullSize);
CPPUNIT_TEST(testColumnsODG);
-
+ CPPUNIT_TEST(testTdf112126);
CPPUNIT_TEST_SUITE_END();
virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -1715,6 +1716,24 @@ void SdExportTest::testColumnsODG()
tempFile.EnableKillingFile();
}
+void SdExportTest::testTdf112126()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/tdf112126.odg"), ODG);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), ODG, &tempFile);
+ uno::Reference<drawing::XDrawPage> xPage(getPage(0, xDocShRef));
+ uno::Reference<beans::XPropertySet> xPropertySet(xPage, uno::UNO_QUERY);
+
+ OUString xPageName;
+ xPropertySet->getPropertyValue("LinkDisplayName") >>= xPageName;
+
+ // without the fix in place, it fails with
+ // - Expected: Page 1
+ // - Actual : Slide 1
+ CPPUNIT_ASSERT_EQUAL(OUString("Page 1"), xPageName);
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdExportTest);
CPPUNIT_PLUGIN_IMPLEMENT();