Kaydet (Commit) 25fb9471 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

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
üst df9145ab
...@@ -139,6 +139,7 @@ void PPTShape::addShape( ...@@ -139,6 +139,7 @@ void PPTShape::addShape(
{ {
sServiceName = "com.sun.star.presentation.TitleTextShape"; sServiceName = "com.sun.star.presentation.TitleTextShape";
aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle(); aMasterTextListStyle = rSlidePersist.getMasterPersist().get() ? rSlidePersist.getMasterPersist()->getTitleTextStyle() : rSlidePersist.getTitleTextStyle();
bClearText = true;
} }
break; break;
case XML_subTitle : case XML_subTitle :
......
...@@ -78,6 +78,7 @@ public: ...@@ -78,6 +78,7 @@ public:
void testBnc887225(); void testBnc887225();
void testBnc480256(); void testBnc480256();
void testCreationDate(); void testCreationDate();
void testBnc584721_1();
CPPUNIT_TEST_SUITE(SdFiltersTest); CPPUNIT_TEST_SUITE(SdFiltersTest);
CPPUNIT_TEST(testDocumentLayout); CPPUNIT_TEST(testDocumentLayout);
...@@ -100,6 +101,7 @@ public: ...@@ -100,6 +101,7 @@ public:
CPPUNIT_TEST(testBnc887225); CPPUNIT_TEST(testBnc887225);
CPPUNIT_TEST(testBnc480256); CPPUNIT_TEST(testBnc480256);
CPPUNIT_TEST(testCreationDate); CPPUNIT_TEST(testCreationDate);
CPPUNIT_TEST(testBnc584721_1);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
}; };
...@@ -709,6 +711,24 @@ void SdFiltersTest::testBnc480256() ...@@ -709,6 +711,24 @@ void SdFiltersTest::testBnc480256()
xDocShRef->DoClose(); 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_TEST_SUITE_REGISTRATION(SdFiltersTest);
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment