summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/ppt/pptshape.cxx1
-rw-r--r--sd/qa/unit/data/pptx/bnc584721_1.pptxbin0 -> 15008 bytes
-rw-r--r--sd/qa/unit/import-tests.cxx20
3 files changed, 21 insertions, 0 deletions
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index f454f4487fe9..a9ed0b945388 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -139,6 +139,7 @@ void PPTShape::addShape(
{
sServiceName = "com.sun.star.presentation.TitleTextShape";
aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
+ bClearText = true;
}
break;
case XML_subTitle :
diff --git a/sd/qa/unit/data/pptx/bnc584721_1.pptx b/sd/qa/unit/data/pptx/bnc584721_1.pptx
new file mode 100644
index 000000000000..dbbcabddcbbb
--- /dev/null
+++ b/sd/qa/unit/data/pptx/bnc584721_1.pptx
Binary files differ
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index f49d6aa19550..3036a58ad9b3 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -78,6 +78,7 @@ public:
void testBnc887225();
void testBnc480256();
void testCreationDate();
+ void testBnc584721_1();
CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout);
@@ -100,6 +101,7 @@ public:
CPPUNIT_TEST(testBnc887225);
CPPUNIT_TEST(testBnc480256);
CPPUNIT_TEST(testCreationDate);
+ CPPUNIT_TEST(testBnc584721_1);
CPPUNIT_TEST_SUITE_END();
};
@@ -709,6 +711,24 @@ void SdFiltersTest::testBnc480256()
xDocShRef->DoClose();
}
+void SdFiltersTest::testBnc584721_1()
+{
+ // Title text shape on the master page contained wrong text.
+
+ ::sd::DrawDocShellRef xDocShRef = loadURL(getURLFromSrc("/sd/qa/unit/data/pptx/bnc584721_1.pptx"), PPTX);
+
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ CPPUNIT_ASSERT_MESSAGE( "no document", pDoc != NULL );
+ const SdrPage *pPage = &(pDoc->GetPage (1)->TRG_GetMasterPage());
+ CPPUNIT_ASSERT_MESSAGE( "no page", pPage != NULL );
+ SdrObject *pObj = pPage->GetObj(0);
+ SdrTextObj *pTxtObj = dynamic_cast<SdrTextObj *>( pObj );
+ CPPUNIT_ASSERT_MESSAGE( "no text object", pTxtObj != NULL);
+ const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject();
+ CPPUNIT_ASSERT_EQUAL(OUString("Click to edit Master title style"), aEdit.GetText(0));
+ xDocShRef->DoClose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdFiltersTest);
CPPUNIT_PLUGIN_IMPLEMENT();