diff options
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/globalfilter/globalfilter.cxx | 6 | ||||
-rw-r--r-- | sw/qa/extras/htmlimport/htmlimport.cxx | 12 | ||||
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 12 | ||||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 34 | ||||
-rw-r--r-- | sw/qa/extras/odfimport/odfimport.cxx | 74 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/tiledrendering/tiledrendering.cxx | 8 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 134 |
10 files changed, 143 insertions, 143 deletions
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx b/sw/qa/extras/globalfilter/globalfilter.cxx index 0126b711d4d3..b1abdec46fd8 100644 --- a/sw/qa/extras/globalfilter/globalfilter.cxx +++ b/sw/qa/extras/globalfilter/globalfilter.cxx @@ -164,9 +164,9 @@ void Test::testLinkedGraphicRT() xComponent->dispose(); mxComponent = loadFromDesktop(aTempFile.GetURL(), "com.sun.star.text.TextDocument"); - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pTxtDoc); - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pTextDoc); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); CPPUNIT_ASSERT_MESSAGE(sFailedMessage.getStr(), pDoc); SwNodes& aNodes = pDoc->GetNodes(); diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 52a29e2fdb91..973b8304bda1 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -28,10 +28,10 @@ class HtmlImportTest : public SwModelTestBase DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html") { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); // The document contains two pictures stored as a link. - sfx2::LinkManager& rLinkManager = pTxtDoc->GetDocShell()->GetDoc()->GetEditShell()->GetLinkManager(); + sfx2::LinkManager& rLinkManager = pTextDoc->GetDocShell()->GetDoc()->GetEditShell()->GetLinkManager(); CPPUNIT_ASSERT_EQUAL(size_t(2), rLinkManager.GetLinks().size()); rLinkManager.Remove(0,2); CPPUNIT_ASSERT_EQUAL(size_t(0), rLinkManager.GetLinks().size()); @@ -44,11 +44,11 @@ DECLARE_HTMLIMPORT_TEST(testPictureImport, "picture.html") DECLARE_HTMLIMPORT_TEST(testInlinedImage, "inlined_image.html") { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); // The document contains only one embedded picture inlined in img's src attribute. - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); SwEditShell* pEditShell = pDoc->GetEditShell(); CPPUNIT_ASSERT(pEditShell); diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index fd9472624c6c..a3bda095bf37 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -304,9 +304,9 @@ private: xmlTextWriterStartDocument(pXmlWriter, NULL, NULL, NULL); // create the dump - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); SwRootFrm* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); pLayout->dumpAsXml(pXmlWriter); @@ -327,9 +327,9 @@ protected: void calcLayout() { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwDoc* pDoc = pTxtDoc->GetDocShell()->GetDoc(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwDoc* pDoc = pTextDoc->GetDocShell()->GetDoc(); pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout(); } diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index 2c9e164bea24..42d2385387a1 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -47,9 +47,9 @@ public: { if (mnCurOutputType == text::MailMergeType::SHELL) { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument*>(mxMMComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - pTxtDoc->GetDocShell()->DoClose(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxMMComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + pTextDoc->GetDocShell()->DoClose(); } else mxMMComponent->dispose(); @@ -235,9 +235,9 @@ protected: int MMTest::documentStartPageNumber( int document ) const { // See SwMailMergeOutputPage::documentStartPageNumber() . - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* shell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* shell = pTextDoc->GetDocShell()->GetWrtShell(); IDocumentMarkAccess* marks = shell->GetDoc()->getIDocumentMarkAccess(); // Unfortunately, the pages are marked using UNO bookmarks, which have internals names, so they cannot be referred to by their names. // Assume that there are no other UNO bookmarks than the ones used by mail merge, and that they are in the sorted order. @@ -266,9 +266,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testMultiPageAnchoredDraws, "multiple-page-anchored { executeMailMerge(); - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - sal_uInt16 nPhysPages = pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + sal_uInt16 nPhysPages = pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum(); CPPUNIT_ASSERT_EQUAL(sal_uInt16(8), nPhysPages); uno::Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(mxMMComponent, uno::UNO_QUERY); @@ -303,8 +303,8 @@ DECLARE_FILE_MAILMERGE_TEST(testMissingDefaultLineColor, "missing-default-line-c uno::Reference<beans::XPropertySet> xPropertySet(xDraws->getByIndex(0), uno::UNO_QUERY); // Lines do not have a line color. CPPUNIT_ASSERT( !xPropertySet->getPropertySetInfo()->hasPropertyByName( "LineColor" )); - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); uno::Reference< lang::XMultiServiceFactory > xFact( mxComponent, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xDefaults( xFact->createInstance( "com.sun.star.drawing.Defaults" ), uno::UNO_QUERY ); CPPUNIT_ASSERT( xDefaults.is()); @@ -369,9 +369,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundariesSimpleMailMerge, "simple-mail-mer // SwMailMergeOutputPage::documentStartPageNumber() ). executeMailMerge(); // Here getPages() works on the source document, so get pages of the resulting one. - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - CPPUNIT_ASSERT_EQUAL( sal_uInt16( 19 ), pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 10 pages, but each sub-document starts on odd page number + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + CPPUNIT_ASSERT_EQUAL( sal_uInt16( 19 ), pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 10 pages, but each sub-document starts on odd page number for( int doc = 0; doc < 10; ++doc ) @@ -383,9 +383,9 @@ DECLARE_SHELL_MAILMERGE_TEST(testPageBoundariesSimpleMailMerge, "simple-mail-mer DECLARE_SHELL_MAILMERGE_TEST(testPageBoundaries2Pages, "simple-mail-merge-2pages.odt", "10-testing-addresses.ods", "testing-addresses") { executeMailMerge(); - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - CPPUNIT_ASSERT_EQUAL( sal_uInt16( 20 ), pTxtDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 20 pages, each sub-document starts on odd page number + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxMMComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + CPPUNIT_ASSERT_EQUAL( sal_uInt16( 20 ), pTextDoc->GetDocShell()->GetWrtShell()->GetPhyPageNum()); // 20 pages, each sub-document starts on odd page number for( int doc = 0; doc < 10; ++doc ) diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 625905da206e..4ed43afa89b4 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -331,9 +331,9 @@ DECLARE_ODFIMPORT_TEST(testFdo56272, "fdo56272.odt") CPPUNIT_ASSERT_EQUAL(sal_Int32(422), xShape->getPosition().Y); // Was -2371 } -DECLARE_ODFIMPORT_TEST(testCalcFtnCntnt, "ooo32780-1.odt") +DECLARE_ODFIMPORT_TEST(testCalcFootnoteContent, "ooo32780-1.odt") { - //this was a CalcFtnCntnt crash + //this was a CalcFootnoteContent crash } DECLARE_ODFIMPORT_TEST(testMoveSubTree, "ooo77837-1.odt") @@ -431,36 +431,36 @@ DECLARE_ODFIMPORT_TEST(testTdf89802, "tdf89802.fodt") DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt") { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); { pWrtShell->SelAll(); // Selects A1. - SwTxtNode& rCellEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); // fdo#72486 This was "Hello.", i.e. a single select-all selected the whole document, not just the cell only. - CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("A1"), rCellEnd.GetText()); pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode()); - CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); + CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); // This was "A1", i.e. Ctrl-A only selected the A1 cell of the table, not the whole document. - CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } { pWrtShell->SttEndDoc(false); // Go to the end of the doc. pWrtShell->SelAll(); // And now that we're outside of the table, try Ctrl-A again. - SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); // This was "Hello", i.e. Ctrl-A did not select the starting table. - CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); - CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } { @@ -468,17 +468,17 @@ DECLARE_ODFIMPORT_TEST(testFdo37606, "fdo37606.odt") // And make sure the table got deleted as well. SwNodes& rNodes = pWrtShell->GetDoc()->GetNodes(); SwNodeIndex nNode(rNodes.GetEndOfExtras()); - SwCntntNode* pCntntNode = rNodes.GoNext(&nNode); + SwContentNode* pContentNode = rNodes.GoNext(&nNode); // First content node was in a table -> table wasn't deleted. - CPPUNIT_ASSERT(!pCntntNode->FindTableNode()); + CPPUNIT_ASSERT(!pContentNode->FindTableNode()); } } DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt") { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); // Ctrl-A pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. @@ -506,46 +506,46 @@ DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt") DECLARE_ODFIMPORT_TEST(testFdo69862, "fdo69862.odt") { // The test doc is special in that it starts with a table and it also has a footnote. - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); // This was "Footnote.", as Ctrl-A also selected footnotes, but it should not. - CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); - CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetTxt()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetText()); } DECLARE_ODFIMPORT_TEST(testFdo69979, "fdo69979.odt") { // The test doc is special in that it starts with a table and it also has a header. - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTxtNode& rStart = dynamic_cast<SwTxtNode&>(pShellCrsr->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCrsr->Start()->nNode.GetNode()); // This was "", as Ctrl-A also selected headers, but it should not. - CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); - CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetTxt()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); + CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt") { - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - SwWrtShell* pWrtShell = pTxtDoc->GetDocShell()->GetWrtShell(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell(); OUString aParaText; uno::Reference<linguistic2::XSpellAlternatives> xAlt; SwSpellPopup aPopup(pWrtShell, xAlt, aParaText); diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index 19c079ede5ef..2f45f74bd6d1 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -79,7 +79,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo68418, "fdo68418.docx") { // The problem was that in 'MSWordExportBase::SectionProperties' function in 'wrt8sty.cxx' // it checked if it 'IsPlausableSingleWordSection'. - // The 'IsPlausableSingleWordSection' compared different aspects of 2 'SwFrmFmt' objects. + // The 'IsPlausableSingleWordSection' compared different aspects of 2 'SwFrameFormat' objects. // One of the checks was 'do both formats have the same distance from the top and bottom ?' // This check is correct if both have headers or both don't have headers. // However - if one has a header, and the other one has an empty header (no header) - it is not correct to compare diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index a7f6078c6f7d..47589f6dafc0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -761,7 +761,7 @@ DECLARE_OOXMLEXPORT_TEST(testHeaderBorder, "header-border.docx") } } -DECLARE_OOXMLEXPORT_TEST(testTblpprShape, "tblppr-shape.docx") +DECLARE_OOXMLEXPORT_TEST(testTablepprShape, "tblppr-shape.docx") { // Unhandled exception due to unexpected w:tblpPr resulted in not importing page size, either. uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName(DEFAULT_STYLE), uno::UNO_QUERY); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 2014bc870df4..66b844005f03 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1366,7 +1366,7 @@ DECLARE_OOXMLIMPORT_TEST(testTableWidth, "table_width.docx") CPPUNIT_ASSERT_EQUAL(sal_Int32(100), getProperty<sal_Int32>(xFrames->getByIndex(0), "FrameWidthPercent")); } -DECLARE_OOXMLIMPORT_TEST(testConditionalstylesTbllook, "conditionalstyles-tbllook.docx") +DECLARE_OOXMLIMPORT_TEST(testConditionalstylesTablelook, "conditionalstyles-tbllook.docx") { uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index b42f05cd3f56..da6fdb5235ec 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -125,7 +125,7 @@ void SwTiledRenderingTest::testPostKeyEvent() pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); // Did we manage to insert the character after the first one? - CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCrsr->GetPoint()->nNode.GetNode().GetTxtNode()->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCrsr->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); } void SwTiledRenderingTest::testPostMouseEvent() @@ -155,19 +155,19 @@ void SwTiledRenderingTest::testSetTextSelection() pWrtShell->SelWrd(); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); // Did we indeed manage to select the second word? - CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("bbb"), pShellCrsr->GetText()); // Now use setTextSelection() to move the start of the selection 1000 twips left. Point aStart = pShellCrsr->GetSttPos(); aStart.setX(aStart.getX() - 1000); pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_START, aStart.getX(), aStart.getY()); // The new selection must include the first word, too -- but not the ending dot. - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb"), pShellCrsr->GetText()); // Next: test that LOK_SETTEXTSELECTION_RESET + LOK_SETTEXTSELECTION_END can be used to create a selection. pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_RESET, aStart.getX(), aStart.getY()); pXTextDocument->setTextSelection(LOK_SETTEXTSELECTION_END, aStart.getX() + 1000, aStart.getY()); - CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa b"), pShellCrsr->GetText()); } void SwTiledRenderingTest::testSetGraphicSelection() diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index e8ffdd78b976..43aeb6317661 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -143,18 +143,18 @@ SwDoc* SwUiWriterTest::createDoc(const char* pName) pName = "empty.odt"; load(DATA_DIRECTORY, pName); - SwXTextDocument* pTxtDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); - CPPUNIT_ASSERT(pTxtDoc); - return pTxtDoc->GetDocShell()->GetDoc(); + SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get()); + CPPUNIT_ASSERT(pTextDoc); + return pTextDoc->GetDocShell()->GetDoc(); } //Replacement tests static void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end) { - rPaM.GetPoint()->nContent.Assign(rPaM.GetCntntNode(), first); + rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first); rPaM.SetMark(); - rPaM.GetPoint()->nContent.Assign(rPaM.GetCntntNode(), end); + rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end); } static const OUString ORIGINAL_REPLACE_CONTENT("toto titi tutu"); @@ -171,15 +171,15 @@ void SwUiWriterTest::testReplaceForward() pDoc->getIDocumentContentOperations().InsertString(aPaM, ORIGINAL_REPLACE_CONTENT); - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); lcl_selectCharacters(aPaM, 5, 9); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false); - CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTxtNode->GetTxt()); + CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); rUndoManager.Undo(); - CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTxtNode->GetTxt()); + CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText()); } void SwUiWriterTest::testFdo75110() @@ -220,16 +220,16 @@ void SwUiWriterTest::testReplaceBackward() SwPaM aPaM(aIdx); pDoc->getIDocumentContentOperations().InsertString(aPaM, OUString("toto titi tutu")); - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); lcl_selectCharacters(aPaM, 9, 5); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, OUString("toto"), false); - CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTxtNode->GetTxt()); + CPPUNIT_ASSERT_EQUAL(EXPECTED_REPLACE_CONTENT, pTextNode->GetText()); rUndoManager.Undo(); - CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTxtNode->GetTxt()); + CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTextNode->GetText()); } void SwUiWriterTest::testFdo69893() @@ -241,9 +241,9 @@ void SwUiWriterTest::testFdo69893() pWrtShell->SelAll(); // Selects the whole document. SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false); - SwTxtNode& rEnd = dynamic_cast<SwTxtNode&>(pShellCrsr->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCrsr->End()->nNode.GetNode()); // Selection did not include the para after table, this was "B1". - CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetText()); } void SwUiWriterTest::testFdo70807() @@ -292,8 +292,8 @@ void SwUiWriterTest::testImportRTF() CPPUNIT_ASSERT_EQUAL(sal_uLong(0), aReader.Read(*pRTFReader)); sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); - CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTxtNode()->GetTxt()); - CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTxtNode()->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTextNode()->GetText()); } void SwUiWriterTest::testExportRTF() @@ -339,13 +339,13 @@ void SwUiWriterTest::testFdo74981() // create a document with an input field SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFldType(0, RES_INPUTFLD)), OUString("foo"), OUString("bar"), 0, 0); + SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, RES_INPUTFLD)), OUString("foo"), OUString("bar"), 0, 0); pWrtShell->Insert(aField); // expect hints SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); - SwTxtNode* pTxtNode = aIdx.GetNode().GetTxtNode(); - CPPUNIT_ASSERT(pTxtNode->HasHints()); + SwTextNode* pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(pTextNode->HasHints()); // go to the begin of the paragraph and split this node pWrtShell->Left(CRSR_SKIP_CHARS, false, 100, false); @@ -353,11 +353,11 @@ void SwUiWriterTest::testFdo74981() // expect only the second paragraph to have hints aIdx = SwNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1); - pTxtNode = aIdx.GetNode().GetTxtNode(); - CPPUNIT_ASSERT(pTxtNode->HasHints()); + pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(pTextNode->HasHints()); --aIdx; - pTxtNode = aIdx.GetNode().GetTxtNode(); - CPPUNIT_ASSERT(!pTxtNode->HasHints()); + pTextNode = aIdx.GetNode().GetTextNode(); + CPPUNIT_ASSERT(!pTextNode->HasHints()); } void SwUiWriterTest::testShapeTextboxSelect() @@ -368,14 +368,14 @@ void SwUiWriterTest::testShapeTextboxSelect() SdrObject* pObject = pPage->GetObj(1); SwContact* pTextBox = static_cast<SwContact*>(pObject->GetUserCall()); // First, make sure that pTextBox is a fly frame (textbox of a shape). - CPPUNIT_ASSERT_EQUAL(RES_FLYFRMFMT, static_cast<RES_FMT>(pTextBox->GetFmt()->Which())); + CPPUNIT_ASSERT_EQUAL(RES_FLYFRMFMT, static_cast<RES_FMT>(pTextBox->GetFormat()->Which())); // Then select it. pWrtShell->SelectObj(Point(), 0, pObject); const SdrMarkList& rMarkList = pWrtShell->GetDrawView()->GetMarkedObjectList(); SwDrawContact* pShape = static_cast<SwDrawContact*>(rMarkList.GetMark(0)->GetMarkedSdrObj()->GetUserCall()); // And finally make sure the shape got selected, not just the textbox itself. - CPPUNIT_ASSERT_EQUAL(RES_DRAWFRMFMT, static_cast<RES_FMT>(pShape->GetFmt()->Which())); + CPPUNIT_ASSERT_EQUAL(RES_DRAWFRMFMT, static_cast<RES_FMT>(pShape->GetFormat()->Which())); } void SwUiWriterTest::testShapeTextboxDelete() @@ -400,22 +400,22 @@ void SwUiWriterTest::testCp1000071() SwDoc* pDoc = createDoc("cp1000071.odt"); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - const SwRedlineTbl& rTbl = pDoc->getIDocumentRedlineAccess().GetRedlineTbl(); - CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTbl.size()); - sal_uLong redlineStart0NodeIndex = rTbl[ 0 ]->Start()->nNode.GetIndex(); - sal_Int32 redlineStart0Index = rTbl[ 0 ]->Start()->nContent.GetIndex(); - sal_uLong redlineEnd0NodeIndex = rTbl[ 0 ]->End()->nNode.GetIndex(); - sal_Int32 redlineEnd0Index = rTbl[ 0 ]->End()->nContent.GetIndex(); - sal_uLong redlineStart1NodeIndex = rTbl[ 1 ]->Start()->nNode.GetIndex(); - sal_Int32 redlineStart1Index = rTbl[ 1 ]->Start()->nContent.GetIndex(); - sal_uLong redlineEnd1NodeIndex = rTbl[ 1 ]->End()->nNode.GetIndex(); - sal_Int32 redlineEnd1Index = rTbl[ 1 ]->End()->nContent.GetIndex(); + const SwRedlineTable& rTable = pDoc->getIDocumentRedlineAccess().GetRedlineTable(); + CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTable.size()); + sal_uLong redlineStart0NodeIndex = rTable[ 0 ]->Start()->nNode.GetIndex(); + sal_Int32 redlineStart0Index = rTable[ 0 ]->Start()->nContent.GetIndex(); + sal_uLong redlineEnd0NodeIndex = rTable[ 0 ]->End()->nNode.GetIndex(); + sal_Int32 redlineEnd0Index = rTable[ 0 ]->End()->nContent.GetIndex(); + sal_uLong redlineStart1NodeIndex = rTable[ 1 ]->Start()->nNode.GetIndex(); + sal_Int32 redlineStart1Index = rTable[ 1 ]->Start()->nContent.GetIndex(); + sal_uLong redlineEnd1NodeIndex = rTable[ 1 ]->End()->nNode.GetIndex(); + sal_Int32 redlineEnd1Index = rTable[ 1 ]->End()->nContent.GetIndex(); // Change the document layout to be 2 columns, and then undo. pWrtShell->SelAll(); SwSectionData section(CONTENT_SECTION, pWrtShell->GetUniqueSectionName()); SfxItemSet set( pDoc->GetDocShell()->GetPool(), RES_COL, RES_COL, 0 ); - SwFmtCol col; + SwFormatCol col; col.Init( 2, 0, 10000 ); set.Put( col ); pWrtShell->InsertSection( section, &set ); @@ -423,15 +423,15 @@ void SwUiWriterTest::testCp1000071() rUndoManager.Undo(); // Check that redlines are the same like at the beginning. - CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTbl.size()); - CPPUNIT_ASSERT_EQUAL( redlineStart0NodeIndex, rTbl[ 0 ]->Start()->nNode.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineStart0Index, rTbl[ 0 ]->Start()->nContent.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineEnd0NodeIndex, rTbl[ 0 ]->End()->nNode.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineEnd0Index, rTbl[ 0 ]->End()->nContent.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineStart1NodeIndex, rTbl[ 1 ]->Start()->nNode.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineStart1Index, rTbl[ 1 ]->Start()->nContent.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineEnd1NodeIndex, rTbl[ 1 ]->End()->nNode.GetIndex()); - CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTbl[ 1 ]->End()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL( size_t( 2 ), rTable.size()); + CPPUNIT_ASSERT_EQUAL( redlineStart0NodeIndex, rTable[ 0 ]->Start()->nNode.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineStart0Index, rTable[ 0 ]->Start()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineEnd0NodeIndex, rTable[ 0 ]->End()->nNode.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineEnd0Index, rTable[ 0 ]->End()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineStart1NodeIndex, rTable[ 1 ]->Start()->nNode.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineStart1Index, rTable[ 1 ]->Start()->nContent.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineEnd1NodeIndex, rTable[ 1 ]->End()->nNode.GetIndex()); + CPPUNIT_ASSERT_EQUAL( redlineEnd1Index, rTable[ 1 ]->End()->nContent.GetIndex()); } void SwUiWriterTest::testShapeTextboxVertadjust() @@ -439,9 +439,9 @@ void SwUiWriterTest::testShapeTextboxVertadjust() SwDoc* pDoc = createDoc("shape-textbox-vertadjust.odt"); SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); SdrObject* pObject = pPage->GetObj(1); - SwFrmFmt* pFmt = static_cast<SwContact*>(pObject->GetUserCall())->GetFmt(); + SwFrameFormat* pFormat = static_cast<SwContact*>(pObject->GetUserCall())->GetFormat(); // This was SDRTEXTVERTADJUST_TOP. - CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFmt->GetTextVertAdjust().GetValue()); + CPPUNIT_ASSERT_EQUAL(SDRTEXTVERTADJUST_CENTER, pFormat->GetTextVertAdjust().GetValue()); } void SwUiWriterTest::testShapeTextboxAutosize() @@ -464,7 +464,7 @@ void SwUiWriterTest::testFdo82191() { SwDoc* pDoc = createDoc("fdo82191.odt"); SdrPage* pPage = pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0); - std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc); + std::set<const SwFrameFormat*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc); // Make sure we have a single draw shape. CPPUNIT_ASSERT_EQUAL(sal_Int32(1), SwTextBoxHelper::getCount(pPage, aTextBoxes)); @@ -531,8 +531,8 @@ void SwUiWriterTest::testChineseConversionBlank() // Then - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); - CPPUNIT_ASSERT_EQUAL(OUString(), pTxtNode->GetTxt()); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + CPPUNIT_ASSERT_EQUAL(OUString(), pTextNode->GetText()); } @@ -557,8 +557,8 @@ void SwUiWriterTest::testChineseConversionNonChineseText() // Then - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); - CPPUNIT_ASSERT_EQUAL(NON_CHINESE_CONTENT, pTxtNode->GetTxt()); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + CPPUNIT_ASSERT_EQUAL(NON_CHINESE_CONTENT, pTextNode->GetText()); } @@ -583,8 +583,8 @@ void SwUiWriterTest::testChineseConversionTraditionalToSimplified() // Then - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); - CPPUNIT_ASSERT_EQUAL(CHINESE_SIMPLIFIED_CONTENT, pTxtNode->GetTxt()); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + CPPUNIT_ASSERT_EQUAL(CHINESE_SIMPLIFIED_CONTENT, pTextNode->GetText()); } @@ -609,8 +609,8 @@ void SwUiWriterTest::testChineseConversionSimplifiedToTraditional() // Then - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); - CPPUNIT_ASSERT_EQUAL(CHINESE_TRADITIONAL_CONTENT, pTxtNode->GetTxt()); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + CPPUNIT_ASSERT_EQUAL(CHINESE_TRADITIONAL_CONTENT, pTextNode->GetText()); } @@ -648,7 +648,7 @@ void SwUiWriterTest::testAutoCorr() pWrtShell->Insert("tset"); pWrtShell->AutoCorrect(corr, cIns); sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex(); - CPPUNIT_ASSERT_EQUAL(OUString("Test "), static_cast<SwTxtNode*>(pDoc->GetNodes()[nIndex])->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("Test "), static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); //AutoCorrect with change style to bolt pWrtShell->Insert("Bolt"); @@ -830,8 +830,8 @@ void SwUiWriterTest::testTdf68183() SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - SwTxtNode* pTxtNode = aPaM.GetNode().GetTxtNode(); - CPPUNIT_ASSERT_EQUAL(false, pTxtNode->GetSwAttrSet().HasItem(RES_PARATR_RSID)); + SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + CPPUNIT_ASSERT_EQUAL(false, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID)); // Then enable storing of RSID and make sure that the attribute is inserted. SW_MOD()->GetModuleConfig()->SetStoreRsid(true); @@ -839,7 +839,7 @@ void SwUiWriterTest::testTdf68183() pWrtShell->DelToStartOfLine(); pWrtShell->Insert2("X"); - CPPUNIT_ASSERT_EQUAL(true, pTxtNode->GetSwAttrSet().HasItem(RES_PARATR_RSID)); + CPPUNIT_ASSERT_EQUAL(true, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID)); } void SwUiWriterTest::testCp1000115() @@ -888,14 +888,14 @@ void SwUiWriterTest::testSearchWithTransliterate() //transliteration option set so that at least one of the search strings is not found sal_uLong case1 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END,FND_IN_BODY,false); SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true); - CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString(""),pShellCrsr->GetText()); CPPUNIT_ASSERT_EQUAL(0,(int)case1); SearchOpt.searchString = "paragraph"; SearchOpt.transliterateFlags = com::sun::star::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL; //transliteration option set so that all search strings are found sal_uLong case2 = pWrtShell->SearchPattern(SearchOpt,true,DOCPOS_START,DOCPOS_END,FND_IN_BODY,false); pShellCrsr = pWrtShell->getShellCrsr(true); - CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("paragraph"),pShellCrsr->GetText()); CPPUNIT_ASSERT_EQUAL(1,(int)case2); } @@ -933,13 +933,13 @@ void SwUiWriterTest::testUndoCharAttribute() pCrsr->Move(fnMoveBackward); } // Check that correct text was selected - CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCrsr->GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("be bolded"), pCrsr->GetText()); // Apply a "Bold" attribute to selection SvxWeightItem aWeightItem(WEIGHT_BOLD, RES_CHRATR_WEIGHT); rIDCO.InsertPoolItem(*pCrsr, aWeightItem); SfxItemSet aSet( pDoc->GetAttrPool(), RES_CHRATR_WEIGHT, RES_CHRATR_WEIGHT); // Adds selected text's attributes to aSet - pCrsr->GetNode().GetTxtNode()->GetAttr(aSet, 10, 19); + pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); SfxPoolItem const * aPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); SfxPoolItem& ampPoolItem = aWeightItem; // Check that bold is active on the selection; checks if it's in aSet @@ -948,7 +948,7 @@ void SwUiWriterTest::testUndoCharAttribute() rUndoManager.Undo(); // Check that bold is no longer active aSet.ClearItem(RES_CHRATR_WEIGHT); - pCrsr->GetNode().GetTxtNode()->GetAttr(aSet, 10, 19); + pCrsr->GetNode().GetTextNode()->GetAttr(aSet, 10, 19); aPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); CPPUNIT_ASSERT_EQUAL((*aPoolItem == ampPoolItem), false); } @@ -957,8 +957,8 @@ void SwUiWriterTest::testTdf86639() { SwDoc* pDoc = createDoc("tdf86639.rtf"); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTxtFmtColl* pColl = pDoc->FindTxtFmtCollByName("Heading"); - pWrtShell->SetTxtFmtColl(pColl); + SwTextFormatColl* pColl = pDoc->FindTextFormatCollByName("Heading"); + pWrtShell->SetTextFormatColl(pColl); OUString aExpected = pColl->GetAttrSet().GetFont().GetFamilyName(); // This was Calibri, should be Liberation Sans. CPPUNIT_ASSERT_EQUAL(aExpected, getProperty<OUString>(getRun(getParagraph(1), 1), "CharFontName")); @@ -970,7 +970,7 @@ void SwUiWriterTest::testTdf90883TableBoxGetCoordinates() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); pWrtShell->Down(true); SwSelBoxes aBoxes; - ::GetTblSel( *pWrtShell, aBoxes ); + ::GetTableSel( *pWrtShell, aBoxes ); CPPUNIT_ASSERT_EQUAL( 2, (int)aBoxes.size() ); Point pos ( aBoxes[0]->GetCoordinates() ); CPPUNIT_ASSERT_EQUAL( 1, (int)pos.X() ); |