diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-09-13 21:01:18 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-09-17 09:59:49 +0200 |
commit | 25fb9471552c3b17eb7e9ae622b3ac89e7e997d0 (patch) | |
tree | 042dd1cb6a4cc6e30d048f8e01d11f4e6d8dc078 /sd | |
parent | df9145abe89ae698287facdeb41c0dd3b7758190 (diff) |
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
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/bnc584721_1.pptx | bin | 0 -> 15008 bytes | |||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 20 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/bnc584721_1.pptx b/sd/qa/unit/data/pptx/bnc584721_1.pptx Binary files differnew file mode 100644 index 000000000000..dbbcabddcbbb --- /dev/null +++ b/sd/qa/unit/data/pptx/bnc584721_1.pptx 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(); |