sw/inc/pam.hxx | 2 sw/qa/core/crsr/crsr.cxx | 2 sw/qa/core/doc/doc.cxx | 2 sw/qa/core/macros-test.cxx | 6 sw/qa/core/txtnode/txtnode.cxx | 2 sw/qa/extras/htmlexport/htmlexport.cxx | 30 +-- sw/qa/extras/layout/layout2.cxx | 2 sw/qa/extras/odfimport/odfimport.cxx | 22 +- sw/qa/extras/tiledrendering/tiledrendering.cxx | 28 +-- sw/qa/extras/uiwriter/uiwriter.cxx | 8 sw/qa/extras/uiwriter/uiwriter2.cxx | 12 - sw/qa/extras/uiwriter/uiwriter4.cxx | 2 sw/qa/uibase/wrtsh/wrtsh.cxx | 2 sw/source/core/access/accdoc.cxx | 2 sw/source/core/access/accframebase.cxx | 4 sw/source/core/access/accmap.cxx | 8 sw/source/core/access/accpara.cxx | 2 sw/source/core/access/acctable.cxx | 2 sw/source/core/crsr/annotationmark.cxx | 2 sw/source/core/crsr/bookmark.cxx | 18 - sw/source/core/crsr/callnk.cxx | 2 sw/source/core/crsr/crbm.cxx | 4 sw/source/core/crsr/crossrefbookmark.cxx | 2 sw/source/core/crsr/crsrsh.cxx | 48 ++--- sw/source/core/crsr/crstrvl.cxx | 32 +-- sw/source/core/crsr/findattr.cxx | 4 sw/source/core/crsr/findfmt.cxx | 2 sw/source/core/crsr/findtxt.cxx | 10 - sw/source/core/crsr/pam.cxx | 56 +++--- sw/source/core/crsr/swcrsr.cxx | 62 +++--- sw/source/core/crsr/trvlfnfl.cxx | 4 sw/source/core/crsr/trvlreg.cxx | 2 sw/source/core/crsr/trvltbl.cxx | 16 - sw/source/core/crsr/viscrs.cxx | 16 - sw/source/core/doc/DocumentContentOperationsManager.cxx | 128 +++++++------- sw/source/core/doc/DocumentFieldsManager.cxx | 2 sw/source/core/doc/DocumentLayoutManager.cxx | 4 sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 2 sw/source/core/doc/DocumentRedlineManager.cxx | 88 ++++----- sw/source/core/doc/dbgoutsw.cxx | 2 sw/source/core/doc/doc.cxx | 2 sw/source/core/doc/docbm.cxx | 36 +-- sw/source/core/doc/doccomp.cxx | 6 sw/source/core/doc/doccorr.cxx | 10 - sw/source/core/doc/docedt.cxx | 46 ++--- sw/source/core/doc/docfld.cxx | 8 sw/source/core/doc/docfly.cxx | 14 - sw/source/core/doc/docfmt.cxx | 14 - sw/source/core/doc/docglos.cxx | 2 sw/source/core/doc/doclay.cxx | 14 - sw/source/core/doc/docnew.cxx | 2 sw/source/core/doc/docnum.cxx | 70 +++---- sw/source/core/doc/docredln.cxx | 50 ++--- sw/source/core/doc/docruby.cxx | 2 sw/source/core/doc/docsort.cxx | 4 sw/source/core/doc/doctxm.cxx | 4 sw/source/core/doc/extinput.cxx | 6 sw/source/core/doc/list.cxx | 4 sw/source/core/doc/notxtfrm.cxx | 2 sw/source/core/doc/textboxhelper.cxx | 12 - sw/source/core/docnode/ndsect.cxx | 28 +-- sw/source/core/docnode/ndtbl.cxx | 24 +- sw/source/core/docnode/ndtbl1.cxx | 32 +-- sw/source/core/docnode/node.cxx | 8 sw/source/core/docnode/nodes.cxx | 14 - sw/source/core/docnode/swbaslnk.cxx | 4 sw/source/core/draw/dcontact.cxx | 2 sw/source/core/edit/acorrect.cxx | 6 sw/source/core/edit/autofmt.cxx | 10 - sw/source/core/edit/edatmisc.cxx | 2 sw/source/core/edit/edattr.cxx | 6 sw/source/core/edit/eddel.cxx | 4 sw/source/core/edit/edfcol.cxx | 18 - sw/source/core/edit/edglbldc.cxx | 6 sw/source/core/edit/edglss.cxx | 4 sw/source/core/edit/editsh.cxx | 10 - sw/source/core/edit/edlingu.cxx | 14 - sw/source/core/edit/ednumber.cxx | 8 sw/source/core/edit/edsect.cxx | 10 - sw/source/core/fields/expfld.cxx | 8 sw/source/core/fields/postithelper.cxx | 2 sw/source/core/fields/reffld.cxx | 2 sw/source/core/frmedt/fecopy.cxx | 16 - sw/source/core/frmedt/fefly1.cxx | 14 - sw/source/core/frmedt/feshview.cxx | 12 - sw/source/core/frmedt/fetab.cxx | 10 - sw/source/core/frmedt/fews.cxx | 4 sw/source/core/layout/atrfrm.cxx | 38 ++-- sw/source/core/layout/fly.cxx | 4 sw/source/core/layout/flycnt.cxx | 2 sw/source/core/layout/frmtool.cxx | 8 sw/source/core/layout/trvlfrm.cxx | 18 - sw/source/core/layout/wsfrm.cxx | 2 sw/source/core/ole/ndole.cxx | 2 sw/source/core/table/swnewtable.cxx | 8 sw/source/core/table/swtable.cxx | 4 sw/source/core/text/EnhancedPDFExportHelper.cxx | 2 sw/source/core/text/frmform.cxx | 4 sw/source/core/text/itratr.cxx | 26 +- sw/source/core/text/porlay.cxx | 22 +- sw/source/core/text/redlnitr.cxx | 12 - sw/source/core/text/txtfrm.cxx | 10 - sw/source/core/txtnode/SwGrammarContact.cxx | 2 sw/source/core/txtnode/atrflyin.cxx | 6 sw/source/core/txtnode/modeltoviewhelper.cxx | 4 sw/source/core/txtnode/ndtxt.cxx | 20 +- sw/source/core/txtnode/txtedt.cxx | 2 sw/source/core/undo/unattr.cxx | 8 sw/source/core/undo/undel.cxx | 22 +- sw/source/core/undo/undobj.cxx | 50 ++--- sw/source/core/undo/undobj1.cxx | 10 - sw/source/core/undo/unins.cxx | 20 +- sw/source/core/undo/unmove.cxx | 6 sw/source/core/undo/unnum.cxx | 4 sw/source/core/undo/unovwr.cxx | 4 sw/source/core/undo/unsect.cxx | 2 sw/source/core/undo/unspnd.cxx | 4 sw/source/core/undo/untbl.cxx | 18 - sw/source/core/undo/untblk.cxx | 10 - sw/source/core/unocore/unochart.cxx | 12 - sw/source/core/unocore/unocrsr.cxx | 6 sw/source/core/unocore/unocrsrhelper.cxx | 6 sw/source/core/unocore/unodraw.cxx | 6 sw/source/core/unocore/unoframe.cxx | 4 sw/source/core/unocore/unoobj.cxx | 12 - sw/source/core/unocore/unoobj2.cxx | 12 - sw/source/core/unocore/unoparagraph.cxx | 2 sw/source/core/unocore/unoportenum.cxx | 14 - sw/source/core/unocore/unorefmk.cxx | 4 sw/source/core/unocore/unosect.cxx | 8 sw/source/core/unocore/unotbl.cxx | 4 sw/source/core/unocore/unotext.cxx | 22 +- sw/source/core/view/vprint.cxx | 2 sw/source/filter/ascii/wrtasc.cxx | 2 sw/source/filter/basflt/fltshell.cxx | 8 sw/source/filter/html/css1atr.cxx | 2 sw/source/filter/html/htmlcss1.cxx | 2 sw/source/filter/html/htmldrawreader.cxx | 4 sw/source/filter/html/htmlflywriter.cxx | 2 sw/source/filter/html/htmlform.cxx | 4 sw/source/filter/html/htmlsect.cxx | 4 sw/source/filter/html/htmltab.cxx | 18 - sw/source/filter/html/swhtml.cxx | 14 - sw/source/filter/ww8/WW8TableInfo.cxx | 6 sw/source/filter/ww8/docxattributeoutput.cxx | 2 sw/source/filter/ww8/writerhelper.cxx | 8 sw/source/filter/ww8/writerhelper.hxx | 2 sw/source/filter/ww8/wrtw8esh.cxx | 4 sw/source/filter/ww8/wrtw8nds.cxx | 12 - sw/source/filter/ww8/wrtww8.cxx | 6 sw/source/filter/ww8/ww8par.cxx | 14 - sw/source/filter/ww8/ww8par2.cxx | 4 sw/source/filter/ww8/ww8par5.cxx | 12 - sw/source/filter/ww8/ww8par6.cxx | 6 sw/source/filter/xml/XMLRedlineImportHelper.cxx | 2 sw/source/filter/xml/xmlimp.cxx | 4 sw/source/ui/misc/contentcontroldlg.cxx | 2 sw/source/uibase/app/docsh2.cxx | 2 sw/source/uibase/dochdl/swdtflvr.cxx | 2 sw/source/uibase/docvw/PostItMgr.cxx | 4 sw/source/uibase/docvw/edtwin.cxx | 18 - sw/source/uibase/docvw/edtwin2.cxx | 2 sw/source/uibase/lingu/hhcwrp.cxx | 10 - sw/source/uibase/misc/redlndlg.cxx | 2 sw/source/uibase/shells/tabsh.cxx | 2 sw/source/uibase/shells/textfld.cxx | 2 sw/source/uibase/uitest/uiobject.cxx | 2 sw/source/uibase/uiview/view2.cxx | 4 sw/source/uibase/uiview/viewling.cxx | 4 sw/source/uibase/uiview/viewstat.cxx | 2 sw/source/uibase/uno/unotxdoc.cxx | 4 sw/source/uibase/wrtsh/delete.cxx | 2 sw/source/uibase/wrtsh/wrtsh2.cxx | 2 173 files changed, 953 insertions(+), 953 deletions(-)
New commits: commit c1c195afab72794a1f0d5ed63c2e3fe6f65bfa84 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Aug 1 10:01:59 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Aug 2 13:57:14 2022 +0200 introduce SwPosition::GetNode as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetNode' | xargs perl -pi -e 's/nNode\.GetNode/GetNode/g' Change-Id: Id1937df1bd5a54677c2c1bbfb2d693a4e22a7b98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137671 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 606aebb9bea9..fde6d69da065 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -74,6 +74,8 @@ struct SAL_WARN_UNUSED SW_DLLPUBLIC SwPosition // Gets pointer on NodesArray. const SwNodes& GetNodes() const { return nNode.GetNodes(); } SwNodes& GetNodes() { return nNode.GetNodes(); } + + SwNode& GetNode() const { return nNode.GetNode(); } }; SW_DLLPUBLIC std::ostream &operator <<(std::ostream& s, const SwPosition& position); diff --git a/sw/qa/core/crsr/crsr.cxx b/sw/qa/core/crsr/crsr.cxx index 4a1a4c2c8479..c0713389bec3 100644 --- a/sw/qa/core/crsr/crsr.cxx +++ b/sw/qa/core/crsr/crsr.cxx @@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreCrsrTest, testContentControlLineBreak) dispatchCommand(mxComponent, ".uno:InsertPara", {}); // Then make sure that we only insert a line break, not a new paragraph: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->GetNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: t\nest // - Actual : est diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 520041f44562..30bb1ffbf264 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -247,7 +247,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testContentControlDelete) // Then make sure that we only enter the content control, to be consistent with the start dummy // character: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetMark()->GetNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: ^Atest^A // - Actual : ^Atest diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index ec151596e328..8d768a24ee1c 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -200,7 +200,7 @@ void SwMacrosTest::testBookmarkDeleteAndJoin() { // problem was that the nContent was pointing at deleted node CPPUNIT_ASSERT_EQUAL((*i)->GetMarkStart().nContent.GetContentNode(), - static_cast<const SwContentNode*>((*i)->GetMarkStart().nNode.GetNode().GetContentNode())); + static_cast<const SwContentNode*>((*i)->GetMarkStart().GetNode().GetContentNode())); } } @@ -552,10 +552,10 @@ void SwMacrosTest::testFindReplace() // problem was that after the 2nd Find, the wrong newline was selected CPPUNIT_ASSERT_EQUAL(OUString("foo bar"), - pPaM->Start()->nNode.GetNode().GetTextNode()->GetText()); + pPaM->Start()->GetNode().GetTextNode()->GetText()); pPaM->Move(fnMoveForward, GoInNode); CPPUNIT_ASSERT_EQUAL(OUString("baz"), - pPaM->End()->nNode.GetNode().GetTextNode()->GetText()); + pPaM->End()->GetNode().GetTextNode()->GetText()); } SwMacrosTest::SwMacrosTest() diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx index b60e3d48b60e..69feba758a7c 100644 --- a/sw/qa/core/txtnode/txtnode.cxx +++ b/sw/qa/core/txtnode/txtnode.cxx @@ -282,7 +282,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testPictureContentControlKeyboard) const SwFrameFormat* pFlyFormat = pWrtShell->GetFlyFrameFormat(); const SwFormatAnchor& rFormatAnchor = pFlyFormat->GetAnchor(); const SwPosition* pAnchorPos = rFormatAnchor.GetContentAnchor(); - SwTextNode* pTextNode = pAnchorPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchorPos->GetNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrAt(pAnchorPos->nContent.GetIndex(), RES_TXTATR_CONTENTCONTROL, SwTextNode::PARENT); auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr); diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index ac613142c639..d5fabe41245c 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -1321,7 +1321,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testMultiParaListItem) // Enable numbering. sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); } @@ -1331,7 +1331,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testMultiParaListItem) pWrtShell->Insert("C"); { // C is in the same list item as B. - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetCountedInList(false); } @@ -1466,7 +1466,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListHeading) SwDoc* pDoc = pWrtShell->GetDoc(); sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); @@ -1498,7 +1498,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testPartiallyNumberedList) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); } @@ -1506,7 +1506,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testPartiallyNumberedList) pWrtShell->SplitNode(); pWrtShell->Insert2("not numbered"); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); @@ -1540,7 +1540,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListHeaderAndItem) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); @@ -1548,7 +1548,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListHeaderAndItem) pWrtShell->SplitNode(); pWrtShell->Insert2("numbered"); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); } @@ -2025,14 +2025,14 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListsHeading) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); } pWrtShell->Down(false, 1); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); @@ -2043,13 +2043,13 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListsHeading) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); } pWrtShell->Down(false, 1); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); } @@ -2059,14 +2059,14 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testListsHeading) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); } pWrtShell->Down(false, 1); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetCountedInList(false); @@ -2119,7 +2119,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testNestedBullets) sal_uInt16 nPos = pDoc->MakeNumRule(pDoc->GetUniqueNumRuleName()); SwNumRule* pNumRule = pDoc->GetNumRuleTable()[nPos]; { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetAttrListLevel(0); @@ -2127,7 +2127,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testNestedBullets) pWrtShell->SplitNode(); pWrtShell->Insert("second"); { - SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->nNode.GetNode(); + SwNode& rNode = pWrtShell->GetCursor()->GetPoint()->GetNode(); SwTextNode& rTextNode = *rNode.GetTextNode(); rTextNode.SetAttr(SwNumRuleItem(pNumRule->GetName())); rTextNode.SetAttrListLevel(1); diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 88813154a323..8ab2149b861c 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -2141,7 +2141,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf121509) bool bFlyInFlyFound = false; for (auto secondformat : *pSecondFormats) { - auto& pNd = secondformat->GetAnchor().GetContentAnchor()->nNode.GetNode(); + auto& pNd = secondformat->GetAnchor().GetContentAnchor()->GetNode(); if (pNd.FindFlyStartNode()) { // So there is a fly inside another -> problem. diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index c46061a5f30c..e703e9a8924c 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -704,16 +704,16 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo37606) { pWrtShell->SelAll(); // Selects A1. - SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rCellEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->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.GetText()); pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->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.GetText()); } @@ -721,11 +721,11 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo37606) { 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. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->GetNode()); // This was "Hello", i.e. Ctrl-A did not select the starting table. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } @@ -781,11 +781,11 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo69862) pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->GetNode()); // This was "Footnote.", as Ctrl-A also selected footnotes, but it should not. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("H" "\x01" "ello."), rEnd.GetText()); } @@ -801,11 +801,11 @@ CPPUNIT_TEST_FIXTURE(Test, testFdo69979) pWrtShell->SelAll(); // Selects A1. pWrtShell->SelAll(); // Selects the whole table. pWrtShell->SelAll(); // Selects the whole document. - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->GetNode()); // This was "", as Ctrl-A also selected headers, but it should not. CPPUNIT_ASSERT_EQUAL(OUString("A1"), rStart.GetText()); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->GetNode()); CPPUNIT_ASSERT_EQUAL(OUString("Hello."), rEnd.GetText()); } @@ -1132,7 +1132,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf123968) SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); pWrtShell->SelAll(); - SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->nNode.GetNode()); + SwTextNode& rStart = dynamic_cast<SwTextNode&>(pShellCursor->Start()->GetNode()); // The field is now editable like any text, thus the field content "New value" shows up for the cursor. CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) @@ -1247,7 +1247,7 @@ CPPUNIT_TEST_FIXTURE(Test, testVerticallyMergedCellBorder) SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); pWrtShell->Down(/*bSelect=*/false, /*nCount=*/1); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(/*bBlock=*/false); - SwStartNode* pA1 = pShellCursor->Start()->nNode.GetNode().StartOfSectionNode(); + SwStartNode* pA1 = pShellCursor->Start()->GetNode().StartOfSectionNode(); const SwAttrSet& rA1Set = pA1->GetTableBox()->GetFrameFormat()->GetAttrSet(); CPPUNIT_ASSERT(rA1Set.GetBox().GetRight()); SwNodeIndex aA2(*pA1->EndOfSectionNode(), 1); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 2c7cff5ec867..d6020fef6f58 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -325,7 +325,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testPostKeyEvent) pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); Scheduler::ProcessEventsToIdle(); // Did we manage to insert the character after the first one? - CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Axaa bbb."), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testPostMouseEvent) @@ -510,12 +510,12 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSearch) SwXTextDocument* pXTextDocument = createDoc("search.odt"); SwWrtShell* pWrtShell = pXTextDocument->GetDocShell()->GetWrtShell(); setupLibreOfficeKitViewCallback(pWrtShell->GetSfxViewShell()); - SwNodeOffset nNode = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); + SwNodeOffset nNode = pWrtShell->getShellCursor(false)->Start()->GetNode().GetIndex(); // First hit, in the second paragraph, before the shape. lcl_search(false); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - SwNodeOffset nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); + SwNodeOffset nActual = pWrtShell->getShellCursor(false)->Start()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 1, nActual); /// Make sure we get search result selection for normal find as well, not only find all. CPPUNIT_ASSERT(!m_aSearchResultSelection.empty()); @@ -531,7 +531,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSearch) // Last hit, in the last paragraph, after the shape. lcl_search(false); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); + nActual = pWrtShell->getShellCursor(false)->Start()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 7, nActual); // Now change direction and make sure that the first 2 hits are in the shape, but not the 3rd one. @@ -541,7 +541,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSearch) CPPUNIT_ASSERT(pWrtShell->GetDrawView()->GetTextEditObject()); lcl_search(true); CPPUNIT_ASSERT(!pWrtShell->GetDrawView()->GetTextEditObject()); - nActual = pWrtShell->getShellCursor(false)->Start()->nNode.GetNode().GetIndex(); + nActual = pWrtShell->getShellCursor(false)->Start()->GetNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(nNode + 1, nActual); } @@ -567,7 +567,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSearchViewArea) })); comphelper::dispatchCommand(".uno:ExecuteSearch", aPropertyValues); // This was just "Heading", i.e. SwView::SearchAndWrap() did not search from only the top of the second page. - CPPUNIT_ASSERT_EQUAL(OUString("Heading on second page"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Heading on second page"), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testSearchTextFrame) @@ -1140,7 +1140,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoInvalidations) // ProcessEventsToIdle resets the view; set it again SfxLokHelper::setView(nView1); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb.c"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb.c"), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); // Undo and assert that both views are invalidated. Scheduler::ProcessEventsToIdle(); @@ -1169,7 +1169,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoLimiting) pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'c', 0); Scheduler::ProcessEventsToIdle(); SwShellCursor* pShellCursor = pWrtShell2->getShellCursor(false); - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb.c"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb.c"), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); // Assert that the first view can't undo, but the second view can. CPPUNIT_ASSERT(!pWrtShell1->GetLastUndoInfo(nullptr, nullptr, &pWrtShell1->GetView())); @@ -1563,7 +1563,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testTrackChanges) // Assert that the reject was performed. SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); // This was 'Aaa bbb.zzz', the change wasn't rejected. - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb."), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testTrackChangesCallback) @@ -2039,7 +2039,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAllTrackedChanges) CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), rTable.size()); { SwShellCursor* pShellCursor = pWrtShell1->getShellCursor(false); - CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("Aaa bbb."), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } // Insert text and accept all @@ -2062,7 +2062,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testAllTrackedChanges) CPPUNIT_ASSERT_EQUAL(static_cast<SwRedlineTable::size_type>(0), rTable.size()); { SwShellCursor* pShellCursor = pWrtShell2->getShellCursor(false); - CPPUNIT_ASSERT_EQUAL(OUString("hyyAaa bbb.cyy"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("hyyAaa bbb.cyy"), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } SfxLokHelper::setView(nView1); @@ -2268,7 +2268,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMESupport) CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), pShellCursor->GetPoint()->nContent.GetIndex()); // content contains only the last IME composition, not all - CPPUNIT_ASSERT_EQUAL(OUString(aInputs[aInputs.size() - 1] + "Aaa bbb."), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(aInputs[aInputs.size() - 1] + "Aaa bbb."), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph) @@ -2373,7 +2373,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAtEndOfParagraph) CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(3), pShellCursor->GetPoint()->nContent.GetIndex()); // check the content - CPPUNIT_ASSERT_EQUAL(OUString("bab"), pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("bab"), pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testIMEFormattingAfterHeader) @@ -3623,7 +3623,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testPictureContentControl) const SwFrameFormat* pFlyFormat = pWrtShell->GetFlyFrameFormat(); const SwFormatAnchor& rFormatAnchor = pFlyFormat->GetAnchor(); const SwPosition* pAnchorPos = rFormatAnchor.GetContentAnchor(); - SwTextNode* pTextNode = pAnchorPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchorPos->GetNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr); auto& rFormatContentControl diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 0acd71a19121..27c861edf5c0 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -400,9 +400,9 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf147220) // currently the deleted text is before the replacement text, not sure if // that is really required CPPUNIT_ASSERT_EQUAL(OUString(u"élÉl"), - pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetText()); CPPUNIT_ASSERT_EQUAL(OUString(u"Él"), - static_cast<SwTextFrame const*>(pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(nullptr))->GetText()); + static_cast<SwTextFrame const*>(pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->getLayoutFrame(nullptr))->GetText()); SwRedlineTable const& rRedlines(pDoc->getIDocumentRedlineAccess().GetRedlineTable()); CPPUNIT_ASSERT_EQUAL(SwRedlineTable::size_type(2), rRedlines.size()); @@ -486,7 +486,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo75898) // Now check if the table has 3 lines. SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); - SwTableNode* pTableNode = pShellCursor->Start()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNode = pShellCursor->Start()->GetNode().FindTableNode(); // This was 1, when doing the same using the UI, Writer even crashed. CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pTableNode->GetTable().GetTabLines().size()); } @@ -524,7 +524,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testFdo69893) pWrtShell->SelAll(); // Selects the whole document. SwShellCursor* pShellCursor = pWrtShell->getShellCursor(false); - SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->nNode.GetNode()); + SwTextNode& rEnd = dynamic_cast<SwTextNode&>(pShellCursor->End()->GetNode()); // Selection did not include the para after table, this was "B1". CPPUNIT_ASSERT_EQUAL(OUString("Para after table."), rEnd.GetText()); } diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 6836fb8d9f22..91a1446259e6 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -194,13 +194,11 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineMoveInsertInDelete) // hiding used to copy the 2nd delete redline "foo", but not delete it pWrtShell->SetRedlineFlags(mode & ~RedlineFlags::ShowDelete); // hide - CPPUNIT_ASSERT_EQUAL( - OUString(" "), - pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(" "), + pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetText()); pWrtShell->SetRedlineFlags(mode); // show again - CPPUNIT_ASSERT_EQUAL( - OUString(u"\u0001 foo"), - pWrtShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(u"\u0001 foo"), + pWrtShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testRedlineInHiddenSection) @@ -1770,7 +1768,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147414) pWrtShell->getShellCursor(false)->GetPoint()->nContent.GetIndex()); CPPUNIT_ASSERT_EQUAL( OUString("Ab c"), - pWrtShell->getShellCursor(false)->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + pWrtShell->getShellCursor(false)->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf147310) diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index 22fa2baadf1c..ae2c66471f14 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -1299,7 +1299,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineParam) // This was 'middlezzz', the uno command rejected the redline under the // cursor, instead of the requested one. CPPUNIT_ASSERT_EQUAL(OUString("aaamiddle"), - pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->GetText()); + pShellCursor->GetPoint()->GetNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineViewAuthor) diff --git a/sw/qa/uibase/wrtsh/wrtsh.cxx b/sw/qa/uibase/wrtsh/wrtsh.cxx index 1caeb749906f..0d43bb6a3651 100644 --- a/sw/qa/uibase/wrtsh/wrtsh.cxx +++ b/sw/qa/uibase/wrtsh/wrtsh.cxx @@ -271,7 +271,7 @@ CPPUNIT_TEST_FIXTURE(Test, testReplacePictureContentControl) const SwFrameFormat* pFlyFormat = pWrtShell->GetFlyFrameFormat(); const SwFormatAnchor& rFormatAnchor = pFlyFormat->GetAnchor(); const SwPosition* pAnchorPos = rFormatAnchor.GetContentAnchor(); - SwTextNode* pTextNode = pAnchorPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchorPos->GetNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr); auto& rFormatContentControl diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 1933be88a62b..e0a0bc983784 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -605,7 +605,7 @@ uno::Any SAL_CALL SwAccessibleDocument::getExtendedAttributes() SwFlyFrame *pFlyFrame = pCurrTextFrame->FindFlyFrame(); const SwFormatAnchor& rAnchor = pFlyFrame->GetFormat()->GetAnchor(); pPoint = rAnchor.GetContentAnchor(); - SwContentNode *const pNode(pPoint->nNode.GetNode().GetContentNode()); + SwContentNode *const pNode(pPoint->GetNode().GetContentNode()); pCurrTextFrame = pNode ? static_cast<SwTextFrame*>(pNode->getLayoutFrame( pCurrTextFrame->getRootFrame(), pPoint)) diff --git a/sw/source/core/access/accframebase.cxx b/sw/source/core/access/accframebase.cxx index 493050bb4a5f..540bfdc55ec3 100644 --- a/sw/source/core/access/accframebase.cxx +++ b/sw/source/core/access/accframebase.cxx @@ -286,12 +286,12 @@ bool SwAccessibleFrameBase::GetSelectedState( ) if( !pPos ) return false; int nIndex = pPos->nContent.GetIndex(); - if( pPos->nNode.GetNode().GetTextNode() ) + if( pPos->GetNode().GetTextNode() ) { SwPaM* pCursor = GetCursor(); if( pCursor != nullptr ) { - const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pNode = pPos->GetNode().GetTextNode(); SwNodeOffset nHere = pNode->GetIndex(); // iterate over ring diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index acd5c3fc7d9b..16c50deb2cb8 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1193,13 +1193,13 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() ++aIter; continue; } - if( pPos->nNode.GetNode().GetTextNode() ) + if( pPos->GetNode().GetTextNode() ) { int nIndex = pPos->nContent.GetIndex(); bool bMarked = false; if( pCursor != nullptr ) { - const SwTextNode* pNode = pPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pNode = pPos->GetNode().GetTextNode(); SwTextFrame const*const pFrame(static_cast<SwTextFrame*>(pNode->getLayoutFrame(pVSh->GetLayout()))); SwNodeOffset nFirstNode(pFrame->GetTextNodeFirst()->GetIndex()); SwNodeOffset nLastNode; @@ -3274,8 +3274,8 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa // for a selection the cursor has to have a mark. // for safety reasons assure that point and mark are in text nodes if ( pCursor->HasMark() && - pCursor->GetPoint()->nNode.GetNode().IsTextNode() && - pCursor->GetMark()->nNode.GetNode().IsTextNode() ) + pCursor->GetPoint()->GetNode().IsTextNode() && + pCursor->GetMark()->GetNode().IsTextNode() ) { auto [pStartPos, pEndPos] = pCursor->StartEnd(); // SwPosition* // loop on all text nodes inside the selection diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index a12044e8496e..8ffde591db74 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -1632,7 +1632,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl( const TextFrameIndex nCorePos(GetPortionData().GetCoreViewPosition(nIndex)); SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(GetFrame())); SwPosition const aModelPos(pFrame->MapViewToModelPos(nCorePos)); - SwTextNode *const pTextNode(aModelPos.nNode.GetNode().GetTextNode()); + SwTextNode *const pTextNode(aModelPos.GetNode().GetTextNode()); { SwPosition const aEndPos(*pTextNode, aModelPos.nContent.GetIndex() == pTextNode->Len() diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index fd20fd26a5f4..75257baa5ca1 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -1462,7 +1462,7 @@ void SAL_CALL SwAccessibleTable::deselectAccessibleChild( : pCursorShell->GetCursor(); bool bDeselectPoint = pBox->GetSttNd() == - pPaM->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pPaM->GetPoint()->GetNode().FindTableBoxStartNode(); SwPaM aPaM( bDeselectPoint ? *pPaM->GetMark() : *pPaM->GetPoint() ); diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx index ce7c03675e14..2fbbb6cf1d8e 100644 --- a/sw/source/core/crsr/annotationmark.cxx +++ b/sw/source/core/crsr/annotationmark.cxx @@ -51,7 +51,7 @@ namespace sw::mark void AnnotationMark::InitDoc(SwDoc& io_rDoc, sw::mark::InsertMode const, SwPosition const*const) { - SwTextNode *pTextNode = GetMarkEnd().nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = GetMarkEnd().GetNode().GetTextNode(); assert(pTextNode); SwTextField *const pTextField = pTextNode->GetFieldTextAttrAt( GetMarkEnd().nContent.GetIndex()-1, true); diff --git a/sw/source/core/crsr/bookmark.cxx b/sw/source/core/crsr/bookmark.cxx index 37b6b611a8b5..6f4d249dd22b 100644 --- a/sw/source/core/crsr/bookmark.cxx +++ b/sw/source/core/crsr/bookmark.cxx @@ -124,7 +124,7 @@ namespace void lcl_FixPosition(SwPosition& rPos) { // make sure the position has 1) the proper node, and 2) a proper index - SwTextNode* pTextNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = rPos.GetNode().GetTextNode(); if(pTextNode == nullptr && rPos.nContent.GetIndex() > 0) { SAL_INFO( @@ -150,16 +150,16 @@ namespace if (aEndMark != CH_TXT_ATR_FORMELEMENT) { SwPosition const& rStart(rField.GetMarkStart()); - assert(rStart.nNode.GetNode().GetTextNode()->GetText()[rStart.nContent.GetIndex()] == aStartMark); (void) rStart; (void) aStartMark; + assert(rStart.GetNode().GetTextNode()->GetText()[rStart.nContent.GetIndex()] == aStartMark); (void) rStart; (void) aStartMark; SwPosition const sepPos(sw::mark::FindFieldSep(rField)); - assert(sepPos.nNode.GetNode().GetTextNode()->GetText()[sepPos.nContent.GetIndex()] == CH_TXT_ATR_FIELDSEP); (void) sepPos; + assert(sepPos.GetNode().GetTextNode()->GetText()[sepPos.nContent.GetIndex()] == CH_TXT_ATR_FIELDSEP); (void) sepPos; } else { // must be m_pPos1 < m_pPos2 because of asymmetric SplitNode update assert(rField.GetMarkPos().nContent.GetIndex() + 1 == rField.GetOtherMarkPos().nContent.GetIndex()); } SwPosition const& rEnd(rField.GetMarkEnd()); - assert(rEnd.nNode.GetNode().GetTextNode()->GetText()[rEnd.nContent.GetIndex() - 1] == aEndMark); (void) rEnd; + assert(rEnd.GetNode().GetTextNode()->GetText()[rEnd.nContent.GetIndex() - 1] == aEndMark); (void) rEnd; } void lcl_SetFieldMarks(Fieldmark& rField, @@ -233,7 +233,7 @@ namespace io_rDoc.GetIDocumentUndoRedo().StartUndo(SwUndoId::UI_REPLACE, nullptr); const SwPosition& rStart = rField.GetMarkStart(); - SwTextNode const*const pStartTextNode = rStart.nNode.GetNode().GetTextNode(); + SwTextNode const*const pStartTextNode = rStart.GetNode().GetTextNode(); assert(pStartTextNode); if (aEndMark != CH_TXT_ATR_FORMELEMENT) { @@ -245,7 +245,7 @@ namespace } const SwPosition& rEnd = rField.GetMarkEnd(); - SwTextNode *const pEndTextNode = rEnd.nNode.GetNode().GetTextNode(); + SwTextNode *const pEndTextNode = rEnd.GetNode().GetTextNode(); assert(pEndTextNode); const sal_Int32 nEndPos = (rEnd == rStart) ? rEnd.nContent.GetIndex() @@ -260,7 +260,7 @@ namespace auto InvalidatePosition(SwPosition const& rPos) -> void { SwUpdateAttr const aHint(rPos.nContent.GetIndex(), rPos.nContent.GetIndex(), 0); - rPos.nNode.GetNode().GetTextNode()->CallSwClientNotify(sw::LegacyModifyHint(&aHint, &aHint)); + rPos.GetNode().GetTextNode()->CallSwClientNotify(sw::LegacyModifyHint(&aHint, &aHint)); } } @@ -827,7 +827,7 @@ namespace sw::mark OUString DateFieldmark::GetContent() const { - const SwTextNode* const pTextNode = GetMarkEnd().nNode.GetNode().GetTextNode(); + const SwTextNode* const pTextNode = GetMarkEnd().GetNode().GetTextNode(); SwPosition const sepPos(sw::mark::FindFieldSep(*this)); const sal_Int32 nStart(sepPos.nContent.GetIndex()); const sal_Int32 nEnd (GetMarkEnd().nContent.GetIndex()); @@ -844,7 +844,7 @@ namespace sw::mark if(!m_pDocumentContentOperationsManager) return; - const SwTextNode* const pTextNode = GetMarkEnd().nNode.GetNode().GetTextNode(); + const SwTextNode* const pTextNode = GetMarkEnd().GetNode().GetTextNode(); SwPosition const sepPos(sw::mark::FindFieldSep(*this)); const sal_Int32 nStart(sepPos.nContent.GetIndex()); const sal_Int32 nEnd (GetMarkEnd().nContent.GetIndex()); diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index c4f2ccdff10e..ce1f89e47ad0 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -38,7 +38,7 @@ SwCallLink::SwCallLink( SwCursorShell & rSh ) { // remember SPoint-values of current cursor SwPaM* pCursor = m_rShell.IsTableMode() ? m_rShell.GetTableCrs() : m_rShell.GetCursor(); - SwNode& rNd = pCursor->GetPoint()->nNode.GetNode(); + SwNode& rNd = pCursor->GetPoint()->GetNode(); m_nNode = rNd.GetIndex(); m_nContent = pCursor->GetPoint()->nContent.GetIndex(); m_nNodeType = rNd.GetNodeType(); diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx index 02f554014568..b19f85af1cb9 100644 --- a/sw/source/core/crsr/crbm.cxx +++ b/sw/source/core/crsr/crbm.cxx @@ -128,7 +128,7 @@ bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark) { return false; } - SwNode const& rNode(rMark.GetMarkPos().nNode.GetNode()); + SwNode const& rNode(rMark.GetMarkPos().GetNode()); SwTextNode const*const pTextNode(rNode.GetTextNode()); if (pTextNode == nullptr) { // UNO_BOOKMARK may point to table node @@ -143,7 +143,7 @@ bool IsMarkHidden(SwRootFrame const& rLayout, ::sw::mark::IMark const& rMark) if (rMark.IsExpanded()) { SwTextFrame const*const pOtherFrame(static_cast<SwTextFrame const*>( - rMark.GetOtherMarkPos().nNode.GetNode().GetTextNode()->getLayoutFrame(&rLayout))); + rMark.GetOtherMarkPos().GetNode().GetTextNode()->getLayoutFrame(&rLayout))); return pFrame == pOtherFrame && pFrame->MapModelToViewPos(rMark.GetMarkPos()) == pFrame->MapModelToViewPos(rMark.GetOtherMarkPos()); diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx index f5754ee19fd3..ca5bd2c9ad28 100644 --- a/sw/source/core/crsr/crossrefbookmark.cxx +++ b/sw/source/core/crsr/crossrefbookmark.cxx @@ -51,7 +51,7 @@ namespace sw::mark void CrossRefBookmark::SetMarkPos(const SwPosition& rNewPos) { - assert(rNewPos.nNode.GetNode().GetTextNode() && + assert(rNewPos.GetNode().GetTextNode() && "<sw::mark::CrossRefBookmark::SetMarkPos(..)>" " - new bookmark position for cross-reference bookmark doesn't mark text node"); assert(rNewPos.nContent.GetIndex() == 0 && diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2a860387b160..7a6a905278b7 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -227,7 +227,7 @@ void SwCursorShell::StartAction() if( !ActionPend() ) { // save for update of the ribbon bar - const SwNode& rNd = m_pCurrentCursor->GetPoint()->nNode.GetNode(); + const SwNode& rNd = m_pCurrentCursor->GetPoint()->GetNode(); m_nCurrentNode = rNd.GetIndex(); m_nCurrentContent = m_pCurrentCursor->GetPoint()->nContent.GetIndex(); m_nCurrentNdTyp = rNd.GetNodeType(); @@ -345,9 +345,9 @@ bool SwCursorShell::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMo // 2. CASE: Cursor is at beginning of numbered paragraph. A move // to the left will simply set the bInFrontOfLabel flag: else if (bLeft - && pShellCursor->GetPoint()->nNode.GetNode().IsTextNode() + && pShellCursor->GetPoint()->GetNode().IsTextNode() && static_cast<SwTextFrame const*>( - pShellCursor->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(GetLayout()) + pShellCursor->GetPoint()->GetNode().GetTextNode()->getLayoutFrame(GetLayout()) )->MapModelToViewPos(*pShellCursor->GetPoint()) == TextFrameIndex(0) && !pShellCursor->IsInFrontOfLabel() && !pShellCursor->HasMark() @@ -795,8 +795,8 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) m_eMvState = CursorMoveState::RightMargin; // is the new position in header or footer? SwFrame* pFrame = lcl_IsInHeaderFooter( aPos.nNode, aPt ); - if( IsTableMode() && !pFrame && aPos.nNode.GetNode().StartOfSectionNode() == - pCursor->GetPoint()->nNode.GetNode().StartOfSectionNode() ) + if( IsTableMode() && !pFrame && aPos.GetNode().StartOfSectionNode() == + pCursor->GetPoint()->GetNode().StartOfSectionNode() ) // same table column and not in header/footer -> back return bRet; @@ -819,14 +819,14 @@ int SwCursorShell::SetCursor( const Point &rLPt, bool bOnlyText, bool bBlock ) if( pFrame->getFrameArea().Contains( rCurrentCursorPt )) return bRet; } - else if( aPos.nNode.GetNode().IsContentNode() ) + else if( aPos.GetNode().IsContentNode() ) { // in the same frame? std::pair<Point, bool> tmp(m_aCharRect.Pos(), false); - SwFrame* pOld = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrame( + SwFrame* pOld = static_cast<SwContentNode&>(aPos.GetNode()).getLayoutFrame( GetLayout(), nullptr, &tmp); tmp.first = aPt; - SwFrame* pNew = static_cast<SwContentNode&>(aPos.nNode.GetNode()).getLayoutFrame( + SwFrame* pNew = static_cast<SwContentNode&>(aPos.GetNode()).getLayoutFrame( GetLayout(), nullptr, &tmp); if( pNew == pOld ) return bRet; @@ -1094,7 +1094,7 @@ bool SwCursorShell::IsSttPara() const { if (GetLayout()->HasMergedParas()) { - SwTextNode const*const pNode(m_pCurrentCursor->GetPoint()->nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(m_pCurrentCursor->GetPoint()->GetNode().GetTextNode()); if (pNode) { SwTextFrame const*const pFrame(static_cast<SwTextFrame*>( @@ -1113,7 +1113,7 @@ bool SwCursorShell::IsEndPara() const { if (GetLayout()->HasMergedParas()) { - SwTextNode const*const pNode(m_pCurrentCursor->GetPoint()->nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(m_pCurrentCursor->GetPoint()->GetNode().GetTextNode()); if (pNode) { SwTextFrame const*const pFrame(static_cast<SwTextFrame*>( @@ -1622,7 +1622,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) } std::pair<Point, bool> const tmp(aTmpPt, false); - SwContentFrame *pTableFrame = pPos->nNode.GetNode().GetContentNode()-> + SwContentFrame *pTableFrame = pPos->GetNode().GetContentNode()-> getLayoutFrame( GetLayout(), pPos, &tmp); OSL_ENSURE( pTableFrame, "Table Cursor not in Content ??" ); @@ -1829,14 +1829,14 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) bool bPointIsStart = ( rCmp.Start() == rCmp.GetPoint() ); // move point; forward if it's the start, backwards if it's the end - if( ! rCmp.GetPoint()->nNode.GetNode().IsContentNode() ) + if( ! rCmp.GetPoint()->GetNode().IsContentNode() ) rCmp.Move( bPointIsStart ? fnMoveForward : fnMoveBackward, GoInContent ); // move mark (if exists); forward if it's the start, else backwards if( rCmp.HasMark() ) { - if( ! rCmp.GetMark()->nNode.GetNode().IsContentNode() ) + if( ! rCmp.GetMark()->GetNode().IsContentNode() ) { rCmp.Exchange(); rCmp.Move( !bPointIsStart ? fnMoveForward : fnMoveBackward, @@ -2610,7 +2610,7 @@ sal_Unicode SwCursorShell::GetChar( bool bEnd, tools::Long nOffset ) const SwPosition* pPos = !m_pCurrentCursor->HasMark() ? m_pCurrentCursor->GetPoint() : bEnd ? m_pCurrentCursor->End() : m_pCurrentCursor->Start(); - SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = pPos->GetNode().GetTextNode(); if( !pTextNd ) return 0; @@ -2635,7 +2635,7 @@ bool SwCursorShell::ExtendSelection( bool bEnd, sal_Int32 nCount ) return false; // no selection SwPosition* pPos = bEnd ? m_pCurrentCursor->End() : m_pCurrentCursor->Start(); - SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = pPos->GetNode().GetTextNode(); assert(pTextNd); sal_Int32 nPos = pPos->nContent.GetIndex(); @@ -2678,7 +2678,7 @@ bool SwCursorShell::SetVisibleCursor( const Point &rPt ) SetInFrontOfLabel( false ); // #i27615# // show only in TextNodes - SwTextNode* pTextNd = aPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = aPos.GetNode().GetTextNode(); if( !pTextNd ) return false; @@ -2914,7 +2914,7 @@ void SwCursorShell::ParkCursor( const SwNodeIndex &rIdx ) // set table cursor always to 0 and the current one always to // the beginning of the table SwPaM* pTCursor = pSh->GetTableCrs(); - SwNode* pTableNd = pTCursor->GetPoint()->nNode.GetNode().FindTableNode(); + SwNode* pTableNd = pTCursor->GetPoint()->GetNode().FindTableNode(); if ( pTableNd ) { pTCursor->GetPoint()->nContent.Assign(nullptr, 0); @@ -3361,8 +3361,8 @@ bool SwCursorShell::HasReadonlySel() const { SwPaM aPaM(*rPaM.GetMark(), *rPaM.GetPoint()); aPaM.Normalize(); - SwNodeIndex aPointIdx(aPaM.GetPoint()->nNode.GetNode()); - SwNodeIndex aMarkIdx(aPaM.GetMark()->nNode.GetNode()); + SwNodeIndex aPointIdx(aPaM.GetPoint()->GetNode()); + SwNodeIndex aMarkIdx(aPaM.GetMark()->GetNode()); if (aPointIdx == aMarkIdx) continue; // If any nodes in PaM are folded outline content nodes, then set read-only. @@ -3461,7 +3461,7 @@ bool SwCursorShell::SelectHiddenRange() if ( !GetViewOptions()->IsShowHiddenChar() && !m_pCurrentCursor->HasMark() ) { SwPosition& rPt = *m_pCurrentCursor->GetPoint(); - const SwTextNode* pNode = rPt.nNode.GetNode().GetTextNode(); + const SwTextNode* pNode = rPt.GetNode().GetTextNode(); if ( pNode ) { const sal_Int32 nPos = rPt.nContent.GetIndex(); @@ -3588,7 +3588,7 @@ static const SwStartNode* lcl_NodeContext( const SwNode& rNode ) */ bool sw_PosOk(const SwPosition & aPos) { - return nullptr != aPos.nNode.GetNode().GetContentNode() && + return nullptr != aPos.GetNode().GetContentNode() && aPos.nContent.GetContentNode(); } @@ -3634,7 +3634,7 @@ void SwCursorShell::ClearUpCursors() if( !sw_PosOk( *pStartCursor->GetPoint() ) ) { SwNodes & aNodes = GetDoc()->GetNodes(); - const SwNode* pStart = lcl_NodeContext( pStartCursor->GetPoint()->nNode.GetNode() ); + const SwNode* pStart = lcl_NodeContext( pStartCursor->GetPoint()->GetNode() ); SwNodeIndex aIdx( pStartCursor->GetPoint()->nNode ); SwNode * pNode = SwNodes::GoPrevious(&aIdx); if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart ) @@ -3747,7 +3747,7 @@ void SwCursorShell::GetSmartTagTerm( std::vector< OUString >& rSmartTagTypes, SwPaM* pCursor = GetCursor(); SwPosition aPos( *pCursor->GetPoint() ); - SwTextNode *pNode = aPos.nNode.GetNode().GetTextNode(); + SwTextNode *pNode = aPos.GetNode().GetTextNode(); if ( !pNode || pNode->IsInProtectSect() ) return; @@ -3788,7 +3788,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect ) if( !GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &eTmpState ) ) return; - pNode = aPos.nNode.GetNode().GetTextNode(); + pNode = aPos.GetNode().GetTextNode(); if( !pNode ) return; pSmartTagList = pNode->GetSmartTags(); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 8effeef1fc4f..2de83faccc67 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -405,7 +405,7 @@ bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) SetGetExpField aFndGEF( aFndPos ), aCurGEF( rPos ); { - const SwNode* pSttNd = rPos.nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pSttNd = rPos.GetNode().FindTableBoxStartNode(); if( pSttNd ) { const SwTableBox* pTBox = pSttNd->FindTableNode()->GetTable(). @@ -419,7 +419,7 @@ bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) { // also at collection use only the first frame std::pair<Point, bool> const tmp(aPt, false); - aCurGEF.SetBodyPos( *rPos.nNode.GetNode().GetContentNode()->getLayoutFrame( GetLayout(), + aCurGEF.SetBodyPos( *rPos.GetNode().GetContentNode()->getLayoutFrame( GetLayout(), &rPos, &tmp) ); } { @@ -526,7 +526,7 @@ bool SwCursorShell::GotoNxtPrvTOXMark( bool bNext ) { // also at collection use only the first frame std::pair<Point, bool> const tmp(aPt, false); - aCurGEF.SetBodyPos( *rPos.nNode.GetNode(). + aCurGEF.SetBodyPos( *rPos.GetNode(). GetContentNode()->getLayoutFrame(GetLayout(), &rPos, &tmp)); } @@ -615,7 +615,7 @@ const SwTOXMark& SwCursorShell::GotoTOXMark( const SwTOXMark& rStart, // set position SwPosition& rPos = *GetCursor()->GetPoint(); rPos.nNode = rNewMark.GetTextTOXMark()->GetTextNode(); - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), rNewMark.GetTextTOXMark()->GetStart() ); if( !m_pCurrentCursor->IsSelOvr() ) @@ -674,7 +674,7 @@ lcl_FindField(bool & o_rFound, SetGetExpFields const& rSrtLst, } else { - pIndex.reset(new SwContentIndex(rPos.nNode.GetNode().GetContentNode(), nContentOffset)); + pIndex.reset(new SwContentIndex(rPos.GetNode().GetContentNode(), nContentOffset)); pSrch.reset(new SetGetExpField(rPos.nNode, pTextField, pIndex.get())); } @@ -753,7 +753,7 @@ bool SwCursorShell::MoveFieldType( // field const SwPosition& rPos = *pCursor->GetPoint(); - SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = rPos.GetNode().GetTextNode(); OSL_ENSURE( pTNd, "No ContentNode" ); SwTextField * pTextField = pTNd->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true ); @@ -929,7 +929,7 @@ SwTextField * SwCursorShell::GetTextFieldAtPos( { SwTextField* pTextField = nullptr; - SwTextNode * const pNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode * const pNode = pPos->GetNode().GetTextNode(); if ( pNode != nullptr ) { pTextField = pNode->GetFieldTextAttrAt( pPos->nContent.GetIndex(), bIncludeInputFieldAtStart ); @@ -1007,7 +1007,7 @@ SwTextContentControl* SwCursorShell::CursorInsideContentControl() const for (SwPaM& rCursor : GetCursor()->GetRingContainer()) { const SwPosition* pStart = rCursor.Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (!pTextNode) { continue; @@ -1364,7 +1364,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, &aSpecialPos : nullptr; const bool bCursorFoundExact = GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aTmpState ); - pTextNd = aPos.nNode.GetNode().GetTextNode(); + pTextNd = aPos.GetNode().GetTextNode(); const SwNodes& rNds = GetDoc()->GetNodes(); if( pTextNd @@ -1990,7 +1990,7 @@ const SwPostItField* SwCursorShell::GetPostItFieldAtCursor() const if ( !IsTableMode() ) { const SwPosition* pCursorPos = GetCursor_()->GetPoint(); - const SwTextNode* pTextNd = pCursorPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNd = pCursorPos->GetNode().GetTextNode(); if ( pTextNd ) { SwTextAttr* pTextAttr = pTextNd->GetFieldTextAttrAt( pCursorPos->nContent.GetIndex() ); @@ -2101,7 +2101,7 @@ bool SwCursorShell::SelectTextModel( const sal_Int32 nStart, TextFrameIndex SwCursorShell::GetCursorPointAsViewIndex() const { SwPosition const*const pPos(GetCursor()->GetPoint()); - SwTextNode const*const pTextNode(pPos->nNode.GetNode().GetTextNode()); + SwTextNode const*const pTextNode(pPos->GetNode().GetTextNode()); assert(pTextNode); SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pTextNode->getLayoutFrame(GetLayout()))); assert(pFrame); @@ -2120,7 +2120,7 @@ bool SwCursorShell::SelectTextView(TextFrameIndex const nStart, SwPosition& rPos = *m_pCurrentCursor->GetPoint(); m_pCurrentCursor->DeleteMark(); // indexes must correspond to cursor point! - SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(m_pCurrentCursor->GetPoint()->nNode.GetNode().GetTextNode()->getLayoutFrame(GetLayout()))); + SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(m_pCurrentCursor->GetPoint()->GetNode().GetTextNode()->getLayoutFrame(GetLayout()))); assert(pFrame); rPos = pFrame->MapViewToModelPos(nStart); m_pCurrentCursor->SetMark(); @@ -2147,7 +2147,7 @@ bool SwCursorShell::SelectTextAttr( sal_uInt16 nWhich, if( !pTextAttr ) { SwPosition& rPos = *m_pCurrentCursor->GetPoint(); - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); pTextAttr = pTextNd ? pTextNd->GetTextAttrAt(rPos.nContent.GetIndex(), nWhich, @@ -2206,7 +2206,7 @@ bool SwCursorShell::GetShadowCursorPos( const Point& rPt, SwFillMode eFillMode, SwCursorMoveState aTmpState( &aFPos ); if( GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aTmpState ) && - !aPos.nNode.GetNode().IsProtect()) + !aPos.GetNode().IsProtect()) { // start position in protected section? rRect = aFPos.aCursor; @@ -2236,7 +2236,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) SwCallLink aLk( *this ); // watch Cursor-Moves StartAction(); - SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = aPos.GetNode().GetContentNode(); SwUndoId nUndoId = SwUndoId::INS_FROM_SHADOWCRSR; // If only the paragraph attributes "Adjust" or "LRSpace" are set, // then the following should not delete those again. @@ -2288,7 +2288,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) switch( aFPos.eMode ) { case SwFillMode::Indent: - if( nullptr != (pCNd = aPos.nNode.GetNode().GetContentNode() )) + if( nullptr != (pCNd = aPos.GetNode().GetContentNode() )) { SfxItemSetFixed< RES_PARATR_ADJUST, RES_PARATR_ADJUST, diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 1e89850ab4e8..6342416972ad 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -1132,14 +1132,14 @@ static bool FindAttrsImpl(SwPaM & rSearchPam, { continue; } - sal_Int32 const nStart(rExtent.pNode == &rStart.nNode.GetNode() + sal_Int32 const nStart(rExtent.pNode == &rStart.GetNode() ? rStart.nContent.GetIndex() : 0); if (rExtent.nEnd <= nStart) { continue; } - sal_Int32 const nEnd(rExtent.pNode == &rEnd.nNode.GetNode() + sal_Int32 const nEnd(rExtent.pNode == &rEnd.GetNode() ? rEnd.nContent.GetIndex() : rExtent.pNode->Len()); if (nEnd < rExtent.nStart diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx index a04850284433..020a277efdd9 100644 --- a/sw/source/core/crsr/findfmt.cxx +++ b/sw/source/core/crsr/findfmt.cxx @@ -43,7 +43,7 @@ bool FindFormatImpl(SwPaM & rSearchPam, { return false; } - SwContentNode *pNd = pPam->GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode *pNd = pPam->GetPoint()->GetNode().GetContentNode(); pPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() ); } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index fb44e7b95c97..8f16efc9ed8f 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -562,7 +562,7 @@ bool FindTextImpl(SwPaM & rSearchPam, { aPaM.GetPoint()->nNode = rTextNode; aPaM.GetPoint()->nContent.Assign( - aPaM.GetPoint()->nNode.GetNode().GetTextNode(), + aPaM.GetPoint()->GetNode().GetTextNode(), nStart.GetModelIndex()); } aPaM.SetMark(); @@ -577,7 +577,7 @@ bool FindTextImpl(SwPaM & rSearchPam, { aPaM.GetMark()->nNode = rTextNode.GetIndex() + 1; } - aPaM.GetMark()->nContent.Assign(aPaM.GetMark()->nNode.GetNode().GetTextNode(), 0); + aPaM.GetMark()->nContent.Assign(aPaM.GetMark()->GetNode().GetTextNode(), 0); if (pNode->GetDoc().getIDocumentDrawModelAccess().Search(aPaM, *xSearchItem) && pSdrView) { if (SdrObject* pObject = pSdrView->GetTextEditObject()) @@ -589,7 +589,7 @@ bool FindTextImpl(SwPaM & rSearchPam, { // Set search position to the shape's anchor point. *rSearchPam.GetPoint() = *pPosition; - rSearchPam.GetPoint()->nContent.Assign(pPosition->nNode.GetNode().GetContentNode(), 0); + rSearchPam.GetPoint()->nContent.Assign(pPosition->GetNode().GetContentNode(), 0); rSearchPam.SetMark(); bFound = true; break; @@ -891,14 +891,14 @@ bool DoSearch(SwPaM & rSearchPam, } rSearchPam.SetMark(); const SwNode *const pSttNd = bSrchForward - ? &rSearchPam.GetPoint()->nNode.GetNode() // end of the frame + ? &rSearchPam.GetPoint()->GetNode() // end of the frame : &rNdIdx.GetNode(); // keep the bug as-is for now... /* FIXME: this condition does not work for !bSrchForward backward * search, it probably never did. (pSttNd != &rNdIdx.GetNode()) * is never true in this case. */ if( (bSrchForward || pSttNd != &rNdIdx.GetNode()) && rSearchPam.Move(fnMoveForward, GoInContent) && - (!bSrchForward || pSttNd != &rSearchPam.GetPoint()->nNode.GetNode()) && + (!bSrchForward || pSttNd != &rSearchPam.GetPoint()->GetNode()) && SwNodeOffset(1) == abs(rSearchPam.GetPoint()->nNode.GetIndex() - rSearchPam.GetMark()->nNode.GetIndex())) { diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index cb1265c5be4f..efef4aa2dcec 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -75,17 +75,17 @@ SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, SwNodeOffset nDiff, cons } SwPosition::SwPosition( const SwNodeIndex & rNodeIndex, SwNodeOffset nDiff ) - : nNode( rNodeIndex, nDiff ), nContent( nNode.GetNode().GetContentNode() ) + : nNode( rNodeIndex, nDiff ), nContent( GetNode().GetContentNode() ) { } SwPosition::SwPosition( const SwNode& rNode, SwNodeOffset nDiff ) - : nNode( rNode, nDiff ), nContent( nNode.GetNode().GetContentNode() ) + : nNode( rNode, nDiff ), nContent( GetNode().GetContentNode() ) { } SwPosition::SwPosition( SwNodes& rNodes, SwNodeOffset nIndex ) - : nNode( rNodes, nIndex ), nContent( nNode.GetNode().GetContentNode() ) + : nNode( rNodes, nIndex ), nContent( GetNode().GetContentNode() ) { } @@ -197,7 +197,7 @@ bool SwPosition::operator!=(const SwPosition &rPos) const SwDoc& SwPosition::GetDoc() const { - return nNode.GetNode().GetDoc(); + return GetNode().GetDoc(); } void SwPosition::dumpAsXml(xmlTextWriterPtr pWriter) const @@ -352,7 +352,7 @@ SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk ) SwPaM::SwPaM( const SwPosition& rPos, SwPaM* pRing ) : Ring( pRing ) , m_Bound1( rPos ) - , m_Bound2( rPos.nNode.GetNode().GetNodes() ) // default initialize + , m_Bound2( rPos.GetNode().GetNodes() ) // default initialize , m_pPoint( &m_Bound1 ) , m_pMark( m_pPoint ) , m_bIsInFrontOfLabel( false ) @@ -386,8 +386,8 @@ SwPaM::SwPaM( const SwNodeIndex& rMark, const SwNodeIndex& rPoint, { m_pPoint->nNode += nPointOffset; } - m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetContentNode(), 0 ); - m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetContentNode(), 0 ); + m_Bound1.nContent.Assign( m_Bound1.GetNode().GetContentNode(), 0 ); + m_Bound2.nContent.Assign( m_Bound2.GetNode().GetContentNode(), 0 ); } SwPaM::SwPaM( const SwNode& rMark, const SwNode& rPoint, @@ -407,8 +407,8 @@ SwPaM::SwPaM( const SwNode& rMark, const SwNode& rPoint, { m_pPoint->nNode += nPointOffset; } - m_Bound1.nContent.Assign( m_Bound1.nNode.GetNode().GetContentNode(), 0 ); - m_Bound2.nContent.Assign( m_Bound2.nNode.GetNode().GetContentNode(), 0 ); + m_Bound1.nContent.Assign( m_Bound1.GetNode().GetContentNode(), 0 ); + m_Bound2.nContent.Assign( m_Bound2.GetNode().GetContentNode(), 0 ); } SwPaM::SwPaM( const SwNodeIndex& rMark, sal_Int32 nMarkContent, @@ -433,21 +433,21 @@ SwPaM::SwPaM( const SwNode& rMark, sal_Int32 nMarkContent, , m_pMark( &m_Bound1 ) , m_bIsInFrontOfLabel( false ) { - m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetContentNode(), + m_pPoint->nContent.Assign( m_pPoint->GetNode().GetContentNode(), nPointContent); - m_pMark ->nContent.Assign( m_pMark ->nNode.GetNode().GetContentNode(), + m_pMark ->nContent.Assign( m_pMark ->GetNode().GetContentNode(), nMarkContent ); } SwPaM::SwPaM( const SwNode& rNode, sal_Int32 nContent, SwPaM* pRing ) : Ring( pRing ) , m_Bound1( rNode ) - , m_Bound2( m_Bound1.nNode.GetNode().GetNodes() ) // default initialize + , m_Bound2( m_Bound1.GetNode().GetNodes() ) // default initialize , m_pPoint( &m_Bound1 ) , m_pMark( &m_Bound1 ) , m_bIsInFrontOfLabel( false ) { - m_pPoint->nContent.Assign( m_pPoint->nNode.GetNode().GetContentNode(), + m_pPoint->nContent.Assign( m_pPoint->GetNode().GetContentNode(), nContent ); } @@ -579,7 +579,7 @@ sal_uInt16 SwPaM::GetPageNum( bool bAtPoint, const Point* pLayPos ) tmp.first = *pLayPos; tmp.second = false; } - if( nullptr != ( pNd = pPos->nNode.GetNode().GetContentNode() ) && + if( nullptr != ( pNd = pPos->GetNode().GetContentNode() ) && nullptr != (pCFrame = pNd->getLayoutFrame(pNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), pPos, pLayPos ? &tmp : nullptr)) && nullptr != ( pPg = pCFrame->FindPageFrame() )) return pPg->GetPhyPageNum(); @@ -616,7 +616,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const { bool bRet = false; - const SwContentNode* pNd = GetPoint()->nNode.GetNode().GetContentNode(); + const SwContentNode* pNd = GetPoint()->GetNode().GetContentNode(); const SwContentFrame *pFrame = nullptr; if ( pNd != nullptr ) { @@ -662,7 +662,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const && HasMark() && GetPoint()->nNode != GetMark()->nNode ) { - pNd = GetMark()->nNode.GetNode().GetContentNode(); + pNd = GetMark()->GetNode().GetContentNode(); pFrame = nullptr; if ( pNd != nullptr ) { @@ -834,7 +834,7 @@ bool SwPaM::HasReadonlySel( bool bFormView ) const { // See if we're inside a read-only content control. const SwPosition* pStart = Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (pTextNode) { sal_Int32 nIndex = pStart->nContent.GetIndex(); @@ -903,7 +903,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const & // go to next/previous ContentNode while( true ) { - if (i_pLayout && aPos.nNode.GetNode().IsTextNode()) + if (i_pLayout && aPos.GetNode().IsTextNode()) { auto const fal(sw::GetFirstAndLastNode(*pLayout, aPos.nNode)); aPos.nNode = bSrchForward ? *fal.second : *fal.first; @@ -970,7 +970,7 @@ void GoStartSection( SwPosition * pPos ) do { SwNodes::GoStartOfSection( &pPos->nNode ); } while( nLevel-- ); // already on a ContentNode - pPos->nNode.GetNode().GetContentNode()->MakeStartIndex( &pPos->nContent ); + pPos->GetNode().GetContentNode()->MakeStartIndex( &pPos->nContent ); } /// go to the end of the current base section @@ -985,7 +985,7 @@ void GoEndSection( SwPosition * pPos ) // now on an EndNode, thus to the previous ContentNode if( GoPreviousNds( &pPos->nNode, true ) ) - pPos->nNode.GetNode().GetContentNode()->MakeEndIndex( &pPos->nContent ); + pPos->GetNode().GetContentNode()->MakeEndIndex( &pPos->nContent ); } bool GoInDoc( SwPaM & rPam, SwMoveFnCollection const & fnMove ) @@ -1011,7 +1011,7 @@ bool GoInNode( SwPaM & rPam, SwMoveFnCollection const & fnMove ) bool GoInContent( SwPaM & rPam, SwMoveFnCollection const & fnMove ) { - if( (*fnMove.fnNd)( &rPam.GetPoint()->nNode.GetNode(), + if( (*fnMove.fnNd)( &rPam.GetPoint()->GetNode(), &rPam.GetPoint()->nContent, SwCursorSkipMode::Chars )) return true; return GoInNode( rPam, fnMove ); @@ -1019,7 +1019,7 @@ bool GoInContent( SwPaM & rPam, SwMoveFnCollection const & fnMove ) bool GoInContentCells( SwPaM & rPam, SwMoveFnCollection const & fnMove ) { - if( (*fnMove.fnNd)( &rPam.GetPoint()->nNode.GetNode(), + if( (*fnMove.fnNd)( &rPam.GetPoint()->GetNode(), &rPam.GetPoint()->nContent, SwCursorSkipMode::Cells )) return true; return GoInNode( rPam, fnMove ); @@ -1027,7 +1027,7 @@ bool GoInContentCells( SwPaM & rPam, SwMoveFnCollection const & fnMove ) bool GoInContentSkipHidden( SwPaM & rPam, SwMoveFnCollection const & fnMove ) { - if( (*fnMove.fnNd)( &rPam.GetPoint()->nNode.GetNode(), + if( (*fnMove.fnNd)( &rPam.GetPoint()->GetNode(), &rPam.GetPoint()->nContent, SwCursorSkipMode::Chars | SwCursorSkipMode::Hidden ) ) return true; return GoInNode( rPam, fnMove ); @@ -1035,7 +1035,7 @@ bool GoInContentSkipHidden( SwPaM & rPam, SwMoveFnCollection const & fnMove ) bool GoInContentCellsSkipHidden( SwPaM & rPam, SwMoveFnCollection const & fnMove ) { - if( (*fnMove.fnNd)( &rPam.GetPoint()->nNode.GetNode(), + if( (*fnMove.fnNd)( &rPam.GetPoint()->GetNode(), &rPam.GetPoint()->nContent, SwCursorSkipMode::Cells | SwCursorSkipMode::Hidden ) ) return true; return GoInNode( rPam, fnMove ); @@ -1047,7 +1047,7 @@ bool GoPrevPara( SwPaM & rPam, SwMoveFnCollection const & aPosPara ) { // always on a ContentNode SwPosition& rPos = *rPam.GetPoint(); - SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode * pNd = rPos.GetNode().GetContentNode(); rPos.nContent.Assign( pNd, ::GetSttOrEnd( &aPosPara == &fnMoveForward, *pNd ) ); return true; @@ -1058,7 +1058,7 @@ bool GoPrevPara( SwPaM & rPam, SwMoveFnCollection const & aPosPara ) bool GoCurrPara( SwPaM & rPam, SwMoveFnCollection const & aPosPara ) { SwPosition& rPos = *rPam.GetPoint(); - SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode * pNd = rPos.GetNode().GetContentNode(); if( pNd ) { const sal_Int32 nOld = rPos.nContent.GetIndex(); @@ -1089,7 +1089,7 @@ bool GoNextPara( SwPaM & rPam, SwMoveFnCollection const & aPosPara ) { // always on a ContentNode SwPosition& rPos = *rPam.GetPoint(); - SwContentNode * pNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode * pNd = rPos.GetNode().GetContentNode(); rPos.nContent.Assign( pNd, ::GetSttOrEnd( &aPosPara == &fnMoveForward, *pNd ) ); return true; @@ -1103,7 +1103,7 @@ bool GoCurrSection( SwPaM & rPam, SwMoveFnCollection const & fnMove ) SwPosition aSavePos( rPos ); // position for comparison (fnMove.fnSection)( &rPos.nNode ); SwContentNode *pNd; - if( nullptr == ( pNd = rPos.nNode.GetNode().GetContentNode()) && + if( nullptr == ( pNd = rPos.GetNode().GetContentNode()) && nullptr == ( pNd = (*fnMove.fnNds)( &rPos.nNode, true )) ) { rPos = aSavePos; // do not change cursor diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 03d746bd7c8e..2d9cafd2005f 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -216,7 +216,7 @@ namespace { const SwTextAttr* InputFieldAtPos(SwPosition const *pPos) { - SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = pPos->GetNode().GetTextNode(); if (!pTextNd) return nullptr; return pTextNd->GetTextAttrAt(pPos->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT); @@ -335,7 +335,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) } } - const SwNode* pNd = &GetPoint()->nNode.GetNode(); + const SwNode* pNd = &GetPoint()->GetNode(); if( pNd->IsContentNode() && !dynamic_cast<SwUnoCursor*>(this) ) { const SwContentFrame* pFrame = static_cast<const SwContentNode*>(pNd)->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ); @@ -434,7 +434,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) return true; // we need a frame } - pNd = &GetMark()->nNode.GetNode(); + pNd = &GetMark()->GetNode(); if( pNd->IsContentNode() && !static_cast<const SwContentNode*>(pNd)->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ) && !dynamic_cast<SwUnoCursor*>(this) ) @@ -468,7 +468,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) { const sal_Int32 nNewPointPos = bIsForwardSelection ? *(pInputFieldTextAttrAtPoint->End()) : pInputFieldTextAttrAtPoint->GetStart(); - SwTextNode* pTextNdAtPoint = GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNdAtPoint = GetPoint()->GetNode().GetTextNode(); GetPoint()->nContent.Assign( pTextNdAtPoint, nNewPointPos ); } @@ -476,14 +476,14 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) { const sal_Int32 nNewMarkPos = bIsForwardSelection ? pInputFieldTextAttrAtMark->GetStart() : *(pInputFieldTextAttrAtMark->End()); - SwTextNode* pTextNdAtMark = GetMark()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNdAtMark = GetMark()->GetNode().GetTextNode(); GetMark()->nContent.Assign( pTextNdAtMark, nNewMarkPos ); } } } - const SwTableNode* pPtNd = GetPoint()->nNode.GetNode().FindTableNode(); - const SwTableNode* pMrkNd = GetMark()->nNode.GetNode().FindTableNode(); + const SwTableNode* pPtNd = GetPoint()->GetNode().FindTableNode(); + const SwTableNode* pMrkNd = GetMark()->GetNode().FindTableNode(); // both in no or in same table node if( ( !pMrkNd && !pPtNd ) || pPtNd == pMrkNd ) return false; @@ -721,7 +721,7 @@ bool SwCursor::IsAtValidPos( bool bPoint ) const { const SwDoc& rDoc = GetDoc(); const SwPosition* pPos = bPoint ? GetPoint() : GetMark(); - const SwNode* pNd = &pPos->nNode.GetNode(); + const SwNode* pNd = &pPos->GetNode(); if( pNd->IsContentNode() && !static_cast<const SwContentNode*>(pNd)->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ) && !dynamic_cast<const SwUnoCursor*>(this) ) @@ -1628,8 +1628,8 @@ bool SwCursor::GoSentence(SentenceMoveType eMoveType, SwRootFrame const*const pL void SwCursor::ExpandToSentenceBorders(SwRootFrame const*const pLayout) { - SwTextNode* pStartNd = Start()->nNode.GetNode().GetTextNode(); - SwTextNode* pEndNd = End()->nNode.GetNode().GetTextNode(); + SwTextNode* pStartNd = Start()->GetNode().GetTextNode(); + SwTextNode* pEndNd = End()->GetNode().GetTextNode(); if (!pStartNd || !pEndNd) return; @@ -1685,7 +1685,7 @@ SwCursor::DoSetBidiLevelLeftRight( { // calculate cursor bidi level const SwContentFrame* pSttFrame = nullptr; - SwNode& rNode = GetPoint()->nNode.GetNode(); + SwNode& rNode = GetPoint()->GetNode(); if( rNode.IsTextNode() ) { @@ -1741,7 +1741,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, SwRootFrame const*const pLayout, bool isFieldNames) { // calculate cursor bidi level - SwNode& rNode = GetPoint()->nNode.GetNode(); + SwNode& rNode = GetPoint()->GetNode(); const SwContentFrame* pSttFrame = // may side-effect bLeft! DoSetBidiLevelLeftRight(bLeft, bVisualAllowed, bInsertCursor); @@ -1780,7 +1780,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, if (!bLeft && pLayout && pLayout->GetFieldmarkMode() == sw::FieldmarkMode::ShowResult) { - SwTextNode const*const pNode(GetPoint()->nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode()); assert(pNode); if (pNode->Len() != GetPoint()->nContent.GetIndex() && pNode->GetText()[GetPoint()->nContent.GetIndex()] == CH_TXT_ATR_FIELDSTART) @@ -1810,7 +1810,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, if (pFrame) { SwTextFrame const* pNewFrame(static_cast<SwTextFrame const*>( - GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrame(pLayout))); + GetPoint()->GetNode().GetContentNode()->getLayoutFrame(pLayout))); if (pNewFrame) { while (pNewFrame->GetPrecede()) @@ -1836,7 +1836,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, if (bLeft && pLayout && pLayout->GetFieldmarkMode() == sw::FieldmarkMode::ShowCommand) { - SwTextNode const*const pNode(GetPoint()->nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode()); assert(pNode); if (pNode->Len() != GetPoint()->nContent.GetIndex() && pNode->GetText()[GetPoint()->nContent.GetIndex()] == CH_TXT_ATR_FIELDEND) @@ -1850,7 +1850,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, if (isFieldNames) { - SwTextNode const*const pNode(GetPoint()->nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(GetPoint()->GetNode().GetTextNode()); assert(pNode); SwTextAttr const*const pInputField(pNode->GetTextAttrAt( GetPoint()->nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT)); @@ -1868,7 +1868,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, { const SwNode* pOldTabBoxSttNode = aOldNodeIdx.GetNode().FindTableBoxStartNode(); const SwTableNode* pOldTabSttNode = pOldTabBoxSttNode ? pOldTabBoxSttNode->FindTableNode() : nullptr; - const SwNode* pNewTabBoxSttNode = GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pNewTabBoxSttNode = GetPoint()->GetNode().FindTableBoxStartNode(); const SwTableNode* pNewTabSttNode = pNewTabBoxSttNode ? pNewTabBoxSttNode->FindTableNode() : nullptr; const bool bCellChanged = pOldTabSttNode && pNewTabSttNode && @@ -1906,7 +1906,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, // Check if I'm inside a covered cell. Correct cursor if necessary and // store covered cell: - const SwNode* pTableBoxStartNode = GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pTableBoxStartNode = GetPoint()->GetNode().FindTableBoxStartNode(); if ( pTableBoxStartNode ) { const SwTableBox* pTableBox = pTableBoxStartNode->GetTableBox(); @@ -1936,7 +1936,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, // here come some special rules for visual cursor travelling if ( pSttFrame ) { - SwNode& rTmpNode = GetPoint()->nNode.GetNode(); + SwNode& rTmpNode = GetPoint()->GetNode(); if ( &rTmpNode != &rNode && rTmpNode.IsTextNode() ) { Point aPt; @@ -1965,7 +1965,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, // calculate cursor bidi level: extracted from UpDown() void SwCursor::DoSetBidiLevelUpDown() { - SwNode& rNode = GetPoint()->nNode.GetNode(); + SwNode& rNode = GetPoint()->GetNode(); if ( !rNode.IsTextNode() ) return; @@ -2104,7 +2104,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, // Jump to beginning or end of line when the cursor at first or last line. if(!bUp) { - SwTextNode* pTextNd = GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPoint()->GetNode().GetTextNode(); if (pTextNd) nOffset = pTextNd->GetText().getLength(); } @@ -2184,7 +2184,7 @@ bool SwCursor::SttEndDoc( bool bStt ) bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt ) { - const SwTableNode* pTableNd = GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTableNd = GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return false; @@ -2274,7 +2274,7 @@ bool SwCursor::GotoTable( const OUString& rName ) bool SwCursor::GotoTableBox( const OUString& rName ) { bool bRet = false; - const SwTableNode* pTableNd = GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTableNd = GetPoint()->GetNode().FindTableNode(); if( pTableNd ) { // retrieve box by name @@ -2295,7 +2295,7 @@ bool SwCursor::GotoTableBox( const OUString& rName ) bool SwCursor::MovePara(SwWhichPara fnWhichPara, SwMoveFnCollection const & fnPosPara ) { // for optimization test something before - const SwNode* pNd = &GetPoint()->nNode.GetNode(); + const SwNode* pNd = &GetPoint()->GetNode(); bool bShortCut = false; if ( fnWhichPara == GoCurrPara ) { @@ -2438,9 +2438,9 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) do { size_t nPos; bool bDel = false; - pSttNd = pCur->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pSttNd = pCur->GetPoint()->GetNode().FindTableBoxStartNode(); if( !pCur->HasMark() || !pSttNd || - pSttNd != pCur->GetMark()->nNode.GetNode().FindTableBoxStartNode() ) + pSttNd != pCur->GetMark()->GetNode().FindTableBoxStartNode() ) bDel = true; else if( lcl_SeekEntry( aTmp, pSttNd, nPos )) @@ -2451,7 +2451,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) pNd = rNds.GoNextSection( &aIdx, true, false ); SwPosition* pPos = pCur->GetMark(); - if( pNd != &pPos->nNode.GetNode() ) + if( pNd != &pPos->GetNode() ) pPos->nNode = *pNd; pPos->nContent.Assign( static_cast<const SwContentNode*>(pNd), 0 ); @@ -2461,7 +2461,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) pNd = SwNodes::GoPrevSection( &aIdx, true, false ); pPos = pCur->GetPoint(); - if (pNd && pNd != &pPos->nNode.GetNode()) + if (pNd && pNd != &pPos->GetNode()) pPos->nNode = *pNd; pPos->nContent.Assign( static_cast<const SwContentNode*>(pNd), pNd ? static_cast<const SwContentNode*>(pNd)->Len() : 0); @@ -2504,7 +2504,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) SwPosition* pPos = pNew->GetPoint(); pPos->nNode.Assign( *pSttNd->EndOfSectionNode(), - 1 ); - pNd = &pPos->nNode.GetNode(); + pNd = &pPos->GetNode(); if( !pNd->IsContentNode() ) pNd = SwNodes::GoPrevSection( &pPos->nNode, true, false ); @@ -2599,13 +2599,13 @@ bool SwTableCursor::IsCursorMovedUpdate() void SwTableCursor::ParkCursor() { // de-register index from text node - SwNode* pNd = &GetPoint()->nNode.GetNode(); + SwNode* pNd = &GetPoint()->GetNode(); if( !pNd->IsStartNode() ) pNd = pNd->StartOfSectionNode(); GetPoint()->nNode = *pNd; GetPoint()->nContent.Assign( nullptr, 0 ); - pNd = &GetMark()->nNode.GetNode(); + pNd = &GetMark()->GetNode(); if( !pNd->IsStartNode() ) pNd = pNd->StartOfSectionNode(); GetMark()->nNode = *pNd; diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index b6477cc60247..47bcf5b903e0 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -63,7 +63,7 @@ bool SwCursor::GotoFootnoteText() { // jump from content to footnote bool bRet = false; - SwTextNode* pTextNd = GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPoint()->GetNode().GetTextNode(); SwTextAttr *const pFootnote( pTextNd ? pTextNd->GetTextAttrForCharAt( @@ -93,7 +93,7 @@ bool SwCursorShell::GotoFootnoteText() if( !bRet ) { SwTextNode* pTextNd = GetCursor_() ? - GetCursor_()->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; + GetCursor_()->GetPoint()->GetNode().GetTextNode() : nullptr; if( pTextNd ) { std::pair<Point, bool> const tmp(GetCursor_()->GetSttPos(), true); diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 7d5617886800..7de5695869d7 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -211,7 +211,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwMoveFnCollection const & fn pPos->nContent.Assign( pCNd, bMoveBackward ? pCNd->Len() : 0 ); - if( &pPos->nNode.GetNode() != &rCurrNd || + if( &pPos->GetNode() != &rCurrNd || pPos->nContent.GetIndex() != nCurrCnt ) // there was a change return true; diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 12b8eae08a78..abe4a09f55d8 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -79,7 +79,7 @@ bool SwCursorShell::GoNextCell( bool bAppendLine ) // if there is no list anymore then create new one if ( !pTableBox ) pTableBox = pTableNd->GetTable().GetTableBox( - pCursor->GetPoint()->nNode.GetNode(). + pCursor->GetPoint()->GetNode(). StartOfSectionIndex() ); OSL_ENSURE( pTableBox, "Box is not in this table" ); @@ -290,7 +290,7 @@ bool SwCursorShell::SelTableBox() // search for start node of our table box. If not found, exit really const SwStartNode* pStartNode = - m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + m_pCurrentCursor->GetPoint()->GetNode().FindTableBoxStartNode(); #if OSL_DEBUG_LEVEL > 0 // the old code checks whether we're in a table by asking the @@ -633,7 +633,7 @@ bool GotoNextTable( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosTable bool GotoCurrTable( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosTable, bool bInReadOnly ) { - SwTableNode* pTableNd = rCurrentCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCurrentCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return false; @@ -729,7 +729,7 @@ bool SwCursorShell::IsTableComplexForChart() // Here we may trigger table formatting so we better do that inside an action StartAction(); - const SwTableNode* pTNd = m_pCurrentCursor->GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTNd = m_pCurrentCursor->GetPoint()->GetNode().FindTableNode(); if( pTNd ) { // in a table; check if table or section is balanced @@ -751,7 +751,7 @@ OUString SwCursorShell::GetBoxNms() const if( IsTableMode() ) { - SwContentNode *pCNd = m_pTableCursor->Start()->nNode.GetNode().GetContentNode(); + SwContentNode *pCNd = m_pTableCursor->Start()->GetNode().GetContentNode(); pFrame = pCNd ? pCNd->getLayoutFrame( GetLayout() ) : nullptr; if( !pFrame ) return sNm; @@ -776,7 +776,7 @@ OUString SwCursorShell::GetBoxNms() const pPos = GetCursor()->GetPoint(); } - SwContentNode* pCNd = pPos->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = pPos->GetNode().GetContentNode(); pFrame = pCNd ? pCNd->getLayoutFrame( GetLayout() ) : nullptr; if( pFrame ) @@ -823,7 +823,7 @@ bool SwCursorShell::CheckTableBoxContent( const SwPosition* pPos ) } else { - pSttNd = pPos->nNode.GetNode().FindSttNodeByType( SwTableBoxStartNode ); + pSttNd = pPos->GetNode().FindSttNodeByType( SwTableBoxStartNode ); if( pSttNd) pChkBox = pSttNd->FindTableNode()->GetTable().GetTableBox( pSttNd->GetIndex() ); } @@ -875,7 +875,7 @@ void SwCursorShell::SaveTableBoxContent( const SwPosition* pPos ) if( !pPos ) pPos = m_pCurrentCursor->GetPoint(); - SwStartNode* pSttNd = pPos->nNode.GetNode().FindSttNodeByType( SwTableBoxStartNode ); + SwStartNode* pSttNd = pPos->GetNode().FindSttNodeByType( SwTableBoxStartNode ); bool bCheckBox = false; if( pSttNd && m_pBoxIdx ) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 86878ad50c82..cb9db2a4364d 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -160,7 +160,7 @@ void SwVisibleCursor::SetPosAndShow(SfxViewShell const * pViewShell) if ( pTmpCursor && !m_pCursorShell->IsOverwriteCursor() ) { - SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode(); + SwNode& rNode = pTmpCursor->GetPoint()->GetNode(); if( rNode.IsTextNode() ) { const SwTextNode& rTNd = *rNode.GetTextNode(); @@ -299,7 +299,7 @@ OString SwVisibleCursor::getLOKPayload(int nType, int nViewId, bool*) const SwCursorMoveState eTmpState(CursorMoveState::SetOnlyText); SwTextNode *pNode = nullptr; if (m_pCursorShell->GetLayout()->GetModelPositionForViewPoint(&aPos, aPt, &eTmpState)) - pNode = aPos.nNode.GetNode().GetTextNode(); + pNode = aPos.GetNode().GetTextNode(); if (pNode && !pNode->IsInProtectSect()) { sal_Int32 nBegin = aPos.nContent.GetIndex(); @@ -401,7 +401,7 @@ void SwSelPaintRects::Hide() */ static SwRect lcl_getLayoutRect(const Point& rPoint, const SwPosition& rPosition) { - const SwContentNode* pNode = rPosition.nNode.GetNode().GetContentNode(); + const SwContentNode* pNode = rPosition.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(rPoint, true); const SwContentFrame* pFrame = pNode->getLayoutFrame( pNode->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), @@ -646,7 +646,7 @@ void SwSelPaintRects::HighlightContentControl() if (m_bShowContentControlOverlay) { const SwPosition* pStart = GetShell()->GetCursor()->Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); SwTextContentControl* pCurContentControlAtCursor = nullptr; if (pTextNode) { @@ -909,11 +909,11 @@ void SwShellCursor::FillRects() { // calculate the new rectangles if( HasMark() && - GetPoint()->nNode.GetNode().IsContentNode() && - GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) && + GetPoint()->GetNode().IsContentNode() && + GetPoint()->GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) && (GetMark()->nNode == GetPoint()->nNode || - (GetMark()->nNode.GetNode().IsContentNode() && - GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) ) )) + (GetMark()->GetNode().IsContentNode() && + GetMark()->GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) ) )) GetShell()->GetLayout()->CalcFrameRects( *this ); } diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index a0e5c11fecfd..05487f9a63fc 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -222,7 +222,7 @@ namespace nContentPos = 0; nContentPos += rCpyStt.nContent.GetIndex(); } - rChgPos.nContent.Assign( rChgPos.nNode.GetNode().GetContentNode(), nContentPos ); + rChgPos.nContent.Assign( rChgPos.GetNode().GetContentNode(), nContentPos ); } } @@ -259,8 +259,8 @@ namespace sw && rCpyPam.nContent.GetIndex() == 0) || rMarkStart != rStt); bool const isIncludeEnd( - (rEnd.nNode.GetNode().IsTextNode() // paragraph end selected? - && rEnd.nContent.GetIndex() == rEnd.nNode.GetNode().GetTextNode()->Len()) + (rEnd.GetNode().IsTextNode() // paragraph end selected? + && rEnd.nContent.GetIndex() == rEnd.GetNode().GetTextNode()->Len()) || rMarkEnd != rEnd); const bool bIsNotOnBoundary = pMark->IsExpanded() @@ -469,8 +469,8 @@ namespace { bool bRet = false; - const SwTextNode* pTextNd = rPam.Start()->nNode.GetNode().GetTextNode(); - const SwTextNode* pEndTextNd = rPam.End()->nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNd = rPam.Start()->GetNode().GetTextNode(); + const SwTextNode* pEndTextNd = rPam.End()->GetNode().GetTextNode(); if ( pTextNd && pTextNd->IsInList() && pEndTextNd && pEndTextNd->IsInList() ) { @@ -500,8 +500,8 @@ namespace if (nullptr != pStt && nullptr != pEnd) { - const SwTextNode* pSttNd = pStt->nNode.GetNode().GetTextNode(); - const SwTextNode* pEndNd = pEnd->nNode.GetNode().GetTextNode(); + const SwTextNode* pSttNd = pStt->GetNode().GetTextNode(); + const SwTextNode* pEndNd = pEnd->GetNode().GetTextNode(); if (nullptr != pSttNd && nullptr != pEndNd && pStt->nContent.GetIndex() == 0 && @@ -704,8 +704,8 @@ namespace if( rPam.GetPoint()->nNode != rPam.GetMark()->nNode ) { auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition* - const SwTextNode* pEndNd = pEnd->nNode.GetNode().GetTextNode(); - if( (nullptr != pEndNd) && pStt->nNode.GetNode().IsTextNode() ) + const SwTextNode* pEndNd = pEnd->GetNode().GetTextNode(); + if( (nullptr != pEndNd) && pStt->GetNode().IsTextNode() ) { const sal_uInt64 nSum = pStt->nContent.GetIndex() + pEndNd->GetText().getLength() - pEnd->nContent.GetIndex(); @@ -877,7 +877,7 @@ namespace SwDoc& rDoc = rRg.aStart.GetNode().GetDoc(); SwRedlineTable::size_type nRedlPos; SwPosition aSrchPos( rRg.aStart ); aSrchPos.nNode--; - aSrchPos.nContent.Assign( aSrchPos.nNode.GetNode().GetContentNode(), 0 ); + aSrchPos.nContent.Assign( aSrchPos.GetNode().GetContentNode(), 0 ); if( rDoc.getIDocumentRedlineAccess().GetRedline( aSrchPos, &nRedlPos ) && nRedlPos ) --nRedlPos; else if( nRedlPos >= rDoc.getIDocumentRedlineAccess().GetRedlineTable().size() ) @@ -902,21 +902,21 @@ namespace SwPosition* pTmpPos = pNewRedl->Start(); pTmpPos->nNode = rRg.aStart; pTmpPos->nContent.Assign( - pTmpPos->nNode.GetNode().GetContentNode(), 0 ); + pTmpPos->GetNode().GetContentNode(), 0 ); rArr.emplace_back(pNewRedl, rRg.aStart); pTmpPos = pTmp->End(); pTmpPos->nNode = rRg.aEnd; pTmpPos->nContent.Assign( - pTmpPos->nNode.GetNode().GetContentNode(), 0 ); + pTmpPos->GetNode().GetContentNode(), 0 ); } else if( pREnd->nNode == rRg.aStart ) { SwPosition* pTmpPos = pTmp->End(); ... etc. - the rest is truncated