diff options
-rw-r--r-- | oox/source/ppt/pptshape.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/data/pptx/tdf142645.pptx | bin | 0 -> 32953 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 16 |
3 files changed, 17 insertions, 1 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx index 7e120b8ec36e..80f165d6f085 100644 --- a/oox/source/ppt/pptshape.cxx +++ b/oox/source/ppt/pptshape.cxx @@ -426,7 +426,7 @@ void PPTShape::addShape( Reference< XShape > xShape( createAndInsert( rFilterBase, sServiceName, pTheme, rxShapes, bClearText, bool(mpPlaceholder), aTransformation, getFillProperties() ) ); // if exists and not duplicated, try to use the title text as slide name to help its re-use on UI - if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && mnSubType == XML_title) + if (!rSlidePersist.isMasterPage() && rSlidePersist.getPage().is() && (mnSubType == XML_title || mnSubType == XML_ctrTitle)) { try { diff --git a/sd/qa/unit/data/pptx/tdf142645.pptx b/sd/qa/unit/data/pptx/tdf142645.pptx Binary files differnew file mode 100644 index 000000000000..e57bd9ee176e --- /dev/null +++ b/sd/qa/unit/data/pptx/tdf142645.pptx diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index 79122bb60afa..482520908849 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -122,6 +122,7 @@ public: virtual void setUp() override; void testDocumentLayout(); + void testTdf142645(); void testTdf142915(); void testTdf142913(); void testTdf142590(); @@ -244,6 +245,7 @@ public: CPPUNIT_TEST_SUITE(SdImportTest); CPPUNIT_TEST(testDocumentLayout); + CPPUNIT_TEST(testTdf142645); CPPUNIT_TEST(testTdf142915); CPPUNIT_TEST(testTdf142913); CPPUNIT_TEST(testTdf142590); @@ -442,6 +444,20 @@ void SdImportTest::testDocumentLayout() } } +void SdImportTest::testTdf142645() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/pptx/tdf142645.pptx"), PPTX); + uno::Reference<drawing::XDrawPagesSupplier> xDoc(xDocShRef->GetDoc()->getUnoModel(), + uno::UNO_QUERY_THROW); + + uno::Reference<drawing::XDrawPage> xPage1(xDoc->getDrawPages()->getByIndex(0), uno::UNO_QUERY); + uno::Reference<container::XNamed> xNamed1(xPage1, uno::UNO_QUERY_THROW); + CPPUNIT_ASSERT_EQUAL(OUString("Hello"), xNamed1->getName()); + + xDocShRef->DoClose(); +} + void SdImportTest::testTdf142915() { ::sd::DrawDocShellRef xDocShRef |