From 25fb9471552c3b17eb7e9ae622b3ac89e7e997d0 Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Sat, 13 Sep 2014 21:01:18 +0200 Subject: bnc#584721: Right text inside the title area on master page With setting bClearText to true the default text used inside LO will be removed. Before that change the imported text was appended to the end of the LO default text. Now it contains only the imported text. Change-Id: I9f5eb0e20468a35c64130a433367cd3845ac7e3c --- sd/qa/unit/data/pptx/bnc584721_1.pptx | Bin 0 -> 15008 bytes sd/qa/unit/import-tests.cxx | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 sd/qa/unit/data/pptx/bnc584721_1.pptx (limited to 'sd') 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 Binary files /dev/null and b/sd/qa/unit/data/pptx/bnc584721_1.pptx 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( 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(); -- cgit