diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-01 10:01:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-02 13:57:14 +0200 |
commit | c1c195afab72794a1f0d5ed63c2e3fe6f65bfa84 (patch) | |
tree | e64b047be56d1079ba1976456c5df70bb957b157 | |
parent | d11f2e00593300dc68bcd11e23ad05116465adba (diff) |
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.grandin@collabora.co.uk>
173 files changed, 953 insertions, 953 deletions
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(); pTmpPos->nNode = rRg.aEnd; pTmpPos->nContent.Assign( - pTmpPos->nNode.GetNode().GetContentNode(), 0 ); + pTmpPos->GetNode().GetContentNode(), 0 ); } } else if( pRStt->nNode < rRg.aEnd ) @@ -935,14 +935,14 @@ namespace SwPosition* pTmpPos = pNewRedl->End(); pTmpPos->nNode = rRg.aEnd; pTmpPos->nContent.Assign( - pTmpPos->nNode.GetNode().GetContentNode(), 0 ); + pTmpPos->GetNode().GetContentNode(), 0 ); rArr.emplace_back( pNewRedl, rRg.aStart ); pTmpPos = pTmp->Start(); pTmpPos->nNode = rRg.aEnd; pTmpPos->nContent.Assign( - pTmpPos->nNode.GetNode().GetContentNode(), 0 ); + pTmpPos->GetNode().GetContentNode(), 0 ); rDoc.getIDocumentRedlineAccess().AppendRedline( pTmp, true ); } } @@ -1244,7 +1244,7 @@ namespace //local functions originally from docfmt.cxx // check existing redline on the same range, and use its extra data, if it exists SwRedlineTable::size_type nRedlPos = rDoc.getIDocumentRedlineAccess().GetRedlinePos( - rRg.Start()->nNode.GetNode(), RedlineType::Format ); + rRg.Start()->GetNode(), RedlineType::Format ); if( SwRedlineTable::npos != nRedlPos ) { const SwPosition *pRStt, *pREnd; @@ -1285,7 +1285,7 @@ namespace //local functions originally from docfmt.cxx // Apply the first character's attributes to the ReplaceText SfxItemSetFixed<RES_CHRATR_BEGIN, RES_TXTATR_WITHEND_END - 1, RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1> aSet( rDoc.GetAttrPool() ); - SwTextNode * pNode = rRg.Start()->nNode.GetNode().GetTextNode(); + SwTextNode * pNode = rRg.Start()->GetNode().GetTextNode(); pNode->GetParaAttr( aSet, rRg.Start()->nContent.GetIndex() + 1, rRg.End()->nContent.GetIndex() ); aSet.ClearItem( RES_TXTATR_REFMARK ); @@ -1460,7 +1460,7 @@ namespace //local functions originally from docfmt.cxx SwHistory* pHistory = pUndo ? &pUndo->GetHistory() : nullptr; bool bRet = false; const SwPosition *pStt = rRg.Start(), *pEnd = rRg.End(); - SwContentNode* pNode = pStt->nNode.GetNode().GetContentNode(); + SwContentNode* pNode = pStt->GetNode().GetContentNode(); if( pNode && pNode->IsTextNode() ) { @@ -1468,11 +1468,11 @@ namespace //local functions originally from docfmt.cxx if (pLayout && pNode->GetTextNode()->getIDocumentSettingAccess()-> get(DocumentSettingId::APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING )) { - SwContentNode* pEndNode = pEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pEndNode = pEnd->GetNode().GetContentNode(); SwContentNode* pCurrentNode = pEndNode; auto nStartIndex = pNode->GetIndex(); auto nEndIndex = pEndNode->GetIndex(); - SwNodeIndex aIdx( pEnd->nNode.GetNode() ); + SwNodeIndex aIdx( pEnd->GetNode() ); while ( pCurrentNode != nullptr && nStartIndex <= pCurrentNode->GetIndex() ) { if (pCurrentNode->GetSwAttrSet().HasItem(RES_PARATR_LIST_AUTOFMT) && @@ -1852,14 +1852,14 @@ namespace //local functions originally from docfmt.cxx return bRet; } ++nNodes; - aSt.Assign( pStt->nNode.GetNode(), +1 ); + aSt.Assign( pStt->GetNode(), +1 ); } else aSt = pStt->nNode; aCntEnd = pEnd->nContent; // aEnd was changed! } else - aSt.Assign( pStt->nNode.GetNode(), +1 ); + aSt.Assign( pStt->GetNode(), +1 ); // aSt points to the first full Node now @@ -1868,7 +1868,7 @@ namespace //local functions originally from docfmt.cxx */ if( pStt->nNode < pEnd->nNode ) { - pNode = pEnd->nNode.GetNode().GetContentNode(); + pNode = pEnd->GetNode().GetContentNode(); if(pNode) { if( aCntEnd.GetIndex() != pNode->Len() ) @@ -1890,13 +1890,13 @@ namespace //local functions originally from docfmt.cxx aEnd = pEnd->nNode; } else - aEnd.Assign( pEnd->nNode.GetNode(), +1 ); + aEnd.Assign( pEnd->GetNode(), +1 ); } else aEnd = pEnd->nNode; } else - aEnd.Assign( pEnd->nNode.GetNode(), +1 ); + aEnd.Assign( pEnd->GetNode(), +1 ); // aEnd points BEHIND the last full node now @@ -2016,7 +2016,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, { const SwPosition *pStt = rPam.Start(), *pEnd = rPam.End(); - SwDoc& rDoc = rPos.nNode.GetNode().GetDoc(); + SwDoc& rDoc = rPos.GetNode().GetDoc(); bool bColumnSel = rDoc.IsClipBoard() && rDoc.IsColumnSelection(); // Catch if there's no copy to do @@ -2064,7 +2064,7 @@ DocumentContentOperationsManager::CopyRange( SwPaM& rPam, SwPosition& rPos, } else if( ! ( *pStt <= rPos && rPos < *pEnd && ( pStt->nNode != pEnd->nNode || - !pStt->nNode.GetNode().IsTextNode() )) ) + !pStt->GetNode().IsTextNode() )) ) { // Copy to a position outside of the area, or copy a single TextNode // Do an ordinary copy @@ -2144,7 +2144,7 @@ void DocumentContentOperationsManager::DeleteRange( SwPaM & rPam ) bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) { const SwPosition &rStt = *rPam.Start(), &rEnd = *rPam.End(); - const SwNode* pNd = &rStt.nNode.GetNode(); + const SwNode* pNd = &rStt.GetNode(); SwNodeOffset nSectDiff = pNd->StartOfSectionNode()->EndOfSectionIndex() - pNd->StartOfSectionIndex(); SwNodeOffset nNodeDiff = rEnd.nNode.GetIndex() - rStt.nNode.GetIndex(); @@ -2162,11 +2162,11 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) { temp.SetMark(); } - if (SwTextNode *const pNode = temp.Start()->nNode.GetNode().GetTextNode()) + if (SwTextNode *const pNode = temp.Start()->GetNode().GetTextNode()) { // rPam may not have nContent set but IsFieldmarkOverlap requires it pNode->MakeStartIndex(&temp.Start()->nContent); } - if (SwTextNode *const pNode = temp.End()->nNode.GetNode().GetTextNode()) + if (SwTextNode *const pNode = temp.End()->GetNode().GetTextNode()) { pNode->MakeEndIndex(&temp.End()->nContent); } @@ -2216,10 +2216,10 @@ bool DocumentContentOperationsManager::DelFullPara( SwPaM& rPam ) rPam.Exchange(); rPam.GetPoint()->nNode++; - SwContentNode *pTmpNode = rPam.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode *pTmpNode = rPam.GetPoint()->GetNode().GetContentNode(); rPam.GetPoint()->nContent.Assign( pTmpNode, 0 ); bool bGoNext = (nullptr == pTmpNode); - pTmpNode = rPam.GetMark()->nNode.GetNode().GetContentNode(); + pTmpNode = rPam.GetMark()->GetNode().GetContentNode(); rPam.GetMark()->nContent.Assign( pTmpNode, 0 ); m_rDoc.GetIDocumentUndoRedo().ClearRedo(); @@ -2401,13 +2401,13 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, rPaM.Exchange(); // If there is a TextNode before and after the Move, create a JoinNext in the EditShell. - SwTextNode* pSrcNd = rPaM.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pSrcNd = rPaM.GetPoint()->GetNode().GetTextNode(); bool bCorrSavePam = pSrcNd && pStt->nNode != pEnd->nNode; // If one or more TextNodes are moved, SwNodes::Move will do a SplitNode. // However, this does not update the cursor. So we create a TextNode to keep // updating the indices. After the Move the Node is optionally deleted. - SwTextNode * pTNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * pTNd = rPos.GetNode().GetTextNode(); if( pTNd && rPaM.GetPoint()->nNode != rPaM.GetMark()->nNode && ( rPos.nContent.GetIndex() || ( pTNd->Len() && bCorrSavePam )) ) { @@ -2505,7 +2505,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, rPaM.DeleteMark(); OSL_ENSURE( *aSavePam.GetMark() == rPos || - ( aSavePam.GetMark()->nNode.GetNode().GetContentNode() == nullptr ), + ( aSavePam.GetMark()->GetNode().GetContentNode() == nullptr ), "PaM was not moved. Aren't there ContentNodes at the beginning/end?" ); *aSavePam.GetMark() = rPos; @@ -2742,7 +2742,7 @@ bool DocumentContentOperationsManager::Overwrite( const SwPaM &rRg, const OUStri m_rDoc.DeleteAutoCorrExceptWord(); } - SwTextNode *pNode = rPt.nNode.GetNode().GetTextNode(); + SwTextNode *pNode = rPt.GetNode().GetTextNode(); if (!pNode || rStr.getLength() > pNode->GetSpaceLeft()) // worst case: no erase { return false; @@ -2862,7 +2862,7 @@ bool DocumentContentOperationsManager::InsertString( const SwPaM &rRg, const OUS m_rDoc.DeleteAutoCorrExceptWord(); } - SwTextNode *const pNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *const pNode = rPos.GetNode().GetTextNode(); if(!pNode) return false; @@ -2963,7 +2963,7 @@ void DocumentContentOperationsManager::TransliterateText( sal_Int32 nSttCnt = pStt->nContent.GetIndex(); sal_Int32 nEndCnt = pEnd->nContent.GetIndex(); - SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = pStt->GetNode().GetTextNode(); if( (pStt == pEnd) && pTNd ) // no selection? { /* Check if cursor is inside of a word */ @@ -3060,7 +3060,7 @@ void DocumentContentOperationsManager::TransliterateText( } } - if( nEndCnt && nullptr != ( pTNd = pEnd->nNode.GetNode().GetTextNode() )) + if( nEndCnt && nullptr != ( pTNd = pEnd->GetNode().GetTextNode() )) { pTNd->TransliterateText( rTrans, 0, nEndCnt, pUndo.get(), bUseRedlining ); } @@ -3158,7 +3158,7 @@ void DocumentContentOperationsManager::ReRead( SwPaM& rPam, const OUString& rGrf SwGrfNode *pGrfNd; if( !(( !rPam.HasMark() || rPam.GetPoint()->nNode.GetIndex() == rPam.GetMark()->nNode.GetIndex() ) - && nullptr != ( pGrfNd = rPam.GetPoint()->nNode.GetNode().GetGrfNode() )) ) + && nullptr != ( pGrfNd = rPam.GetPoint()->GetNode().GetGrfNode() )) ) return; if (m_rDoc.GetIDocumentUndoRedo().DoesUndo()) @@ -3245,7 +3245,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj( if ( rDrawObjAnchorFormat.GetContentAnchor() != nullptr ) { SwTextNode* pAnchorTextNode = - rDrawObjAnchorFormat.GetContentAnchor()->nNode.GetNode().GetTextNode(); + rDrawObjAnchorFormat.GetContentAnchor()->GetNode().GetTextNode(); if ( pAnchorTextNode != nullptr ) { const sal_Int32 nStt = rDrawObjAnchorFormat.GetContentAnchor()->nContent.GetIndex(); @@ -3289,7 +3289,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj( bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool bChkTableStart ) { - SwContentNode *pNode = rPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNode = rPos.GetNode().GetContentNode(); if(nullptr == pNode) return false; @@ -3313,7 +3313,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b // Update the rsid of the old and the new node unless // the old node is split at the beginning or at the end - SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = rPos.GetNode().GetTextNode(); const sal_Int32 nPos = rPos.nContent.GetIndex(); if( pTextNode && nPos && nPos != pTextNode->Len() ) { @@ -3432,7 +3432,7 @@ bool DocumentContentOperationsManager::SplitNode( const SwPosition &rPos, bool b bool DocumentContentOperationsManager::AppendTextNode( SwPosition& rPos ) { // create new node before EndOfContent - SwTextNode * pCurNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * pCurNode = rPos.GetNode().GetTextNode(); if( !pCurNode ) { // so then one can be created! @@ -3605,7 +3605,7 @@ void DocumentContentOperationsManager::InsertItemSet ( const SwPaM &rRg, const S void DocumentContentOperationsManager::RemoveLeadingWhiteSpace(const SwPosition & rPos ) { - const SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = rPos.GetNode().GetTextNode(); if ( !pTNd ) return; @@ -3969,13 +3969,13 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( } // Set the character bound Flys back at the original character if ((RndStdIds::FLY_AT_CHAR == aAnchor.GetAnchorId()) && - newPos.nNode.GetNode().IsTextNode() ) + newPos.GetNode().IsTextNode() ) { // only if pCopiedPaM: care about partially selected start node sal_Int32 const nContent = pCopiedPaM && pCopiedPaM->Start()->nNode == aAnchor.GetContentAnchor()->nNode ? newPos.nContent.GetIndex() - pCopiedPaM->Start()->nContent.GetIndex() : newPos.nContent.GetIndex(); - newPos.nContent.Assign(newPos.nNode.GetNode().GetTextNode(), nContent); + newPos.nContent.Assign(newPos.GetNode().GetTextNode(), nContent); } else { @@ -4067,11 +4067,11 @@ bool DocumentContentOperationsManager::lcl_RstTextAttr( SwNode* pNd, void* pArgs SwContentIndex aSt( pTextNode, 0 ); sal_Int32 nEnd = pTextNode->Len(); - if( &pPara->pSttNd->nNode.GetNode() == pTextNode && + if( &pPara->pSttNd->GetNode() == pTextNode && pPara->pSttNd->nContent.GetIndex() ) aSt = pPara->pSttNd->nContent.GetIndex(); - if( &pPara->pEndNd->nNode.GetNode() == pNd ) + if( &pPara->pEndNd->GetNode() == pNd ) nEnd = pPara->pEndNd->nContent.GetIndex(); if( pPara->pHistory ) @@ -4298,7 +4298,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet { // Delete all empty TextHints at the Mark's position - SwTextNode* pTextNd = rPam.GetMark()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPam.GetMark()->GetNode().GetTextNode(); SwpHints* pHts; if( pTextNd && nullptr != ( pHts = pTextNd->GetpSwpHints()) && pHts->Count() ) { @@ -4406,7 +4406,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet } } - pCNd = pEnd->nNode.GetNode().GetContentNode(); + pCNd = pEnd->GetNode().GetContentNode(); if( pCNd ) { SwTextNode * pEndTextNode( pCNd->GetTextNode() ); @@ -4459,7 +4459,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet // If the Node that contained the Cursor has been deleted, // the Content has to be assigned to the current Content. - pStt->nContent.Assign( pStt->nNode.GetNode().GetContentNode(), + pStt->nContent.Assign( pStt->GetNode().GetContentNode(), pStt->nContent.GetIndex() ); // If we deleted across Node boundaries we have to correct the PaM, @@ -4498,7 +4498,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt // Own Undo? OUString sRepl( rStr ); - SwTextNode* pTextNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = pStt->GetNode().GetTextNode(); sal_Int32 nStt = pStt->nContent.GetIndex(); sal_Int32 nEnd; @@ -4529,7 +4529,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt *aDelPam.GetMark() = pBkmk->GetOtherMarkPos(); m_rDoc.getIDocumentMarkAccess()->deleteMark(pBkmk); pStt = aDelPam.Start(); - pTextNd = pStt->nNode.GetNode().GetTextNode(); + pTextNd = pStt->GetNode().GetTextNode(); nStt = pStt->nContent.GetIndex(); } @@ -4884,7 +4884,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo SwCopyFlags const flags, SwPaM *const pCpyRange) const { - SwDoc& rDoc = rPos.nNode.GetNode().GetDoc(); + SwDoc& rDoc = rPos.GetNode().GetDoc(); const bool bColumnSel = rDoc.IsClipBoard() && rDoc.IsColumnSelection(); auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition* @@ -4948,8 +4948,8 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo SwNodeRange aRg( pStt->nNode, pEnd->nNode ); SwNodeIndex aInsPos( rPos.nNode ); const bool bOneNode = pStt->nNode == pEnd->nNode; - SwTextNode* pSttTextNd = pStt->nNode.GetNode().GetTextNode(); - SwTextNode* pEndTextNd = pEnd->nNode.GetNode().GetTextNode(); + SwTextNode* pSttTextNd = pStt->GetNode().GetTextNode(); + SwTextNode* pEndTextNd = pEnd->GetNode().GetTextNode(); SwTextNode* pDestTextNd = aInsPos.GetNode().GetTextNode(); bool bCopyCollFormat = !rDoc.IsInsOnlyTextGlossary() && ( (pDestTextNd && !pDestTextNd->GetText().getLength()) || @@ -5049,7 +5049,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo } // tdf#63022 always reset pEndTextNd after SplitNode aRg.aEnd = pEnd->nNode; - pEndTextNd = pEnd->nNode.GetNode().GetTextNode(); + pEndTextNd = pEnd->GetNode().GetTextNode(); } NUMRULE_STATE @@ -5126,7 +5126,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo else if( rPos == *pEnd ) { rPos.nNode-=SwNodeOffset(2); - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), nContentEnd ); rPos.nNode++; aRg.aEnd--; @@ -5206,7 +5206,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo temp.Move(fnMoveForward, GoInContent); startPos = *temp.GetPoint(); } - assert(startPos.nNode.GetNode().IsContentNode()); + assert(startPos.GetNode().IsContentNode()); std::pair<SwPaM const&, SwPosition const&> tmp(rPam, startPos); if( aInsPos == pEnd->nNode ) { @@ -5238,7 +5238,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo temp.Move(fnMoveForward, GoInContent); startPos = *temp.GetPoint(); } - assert(startPos.nNode.GetNode().IsContentNode()); + assert(startPos.GetNode().IsContentNode()); SwPosition startPosAtPara(startPos); startPosAtPara.nContent.Assign(nullptr, 0); @@ -5289,7 +5289,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo // Adjust position (in case it was moved / in another node) - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), rPos.nContent.GetIndex() ); if( rPos.nNode != aInsPos ) @@ -5315,10 +5315,10 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo pCopyPam->GetPoint()->nNode++; // Reset the offset to 0 as it was before the insertion - pCopyPam->GetPoint()->nContent.Assign(pCopyPam->GetPoint()->nNode.GetNode().GetContentNode(), 0); + pCopyPam->GetPoint()->nContent.Assign(pCopyPam->GetPoint()->GetNode().GetContentNode(), 0); // If the next node is a start node, then step back: the start node // has been copied and needs to be in the selection for the undo - if (pCopyPam->GetPoint()->nNode.GetNode().IsStartNode()) + if (pCopyPam->GetPoint()->GetNode().IsStartNode()) pCopyPam->GetPoint()->nNode--; } diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index bc492046572f..842e526dd2c9 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -1723,7 +1723,7 @@ SwField * DocumentFieldsManager::GetFieldAtPos(const SwPosition & rPos) SwTextField * DocumentFieldsManager::GetTextFieldAtPos(const SwPosition & rPos) { - SwTextNode * const pNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * const pNode = rPos.GetNode().GetTextNode(); return (pNode != nullptr) ? pNode->GetFieldTextAttrAt( rPos.nContent.GetIndex(), true ) diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx b/sw/source/core/doc/DocumentLayoutManager.cxx index 5f097deadb42..f2d936f4b094 100644 --- a/sw/source/core/doc/DocumentLayoutManager.cxx +++ b/sw/source/core/doc/DocumentLayoutManager.cxx @@ -290,7 +290,7 @@ void DocumentLayoutManager::DelLayoutFormat( SwFrameFormat *pFormat ) if ((RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId()) && rAnchor.GetContentAnchor()) { const SwPosition* pPos = rAnchor.GetContentAnchor(); - SwTextNode *pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNd = pPos->GetNode().GetTextNode(); // attribute is still in text node, delete it if ( pTextNd ) @@ -456,7 +456,7 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat( { const SwPosition* pPos = rNewAnchor.GetContentAnchor(); SwFormatFlyCnt aFormat( pDest ); - pPos->nNode.GetNode().GetTextNode()->InsertItem( + pPos->GetNode().GetTextNode()->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 ); } diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index 2d7d6059dd7b..eb52f7c22f45 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -508,7 +508,7 @@ bool DocumentLinksAdministrationManager::SelectServerObj( std::u16string_view rS SwPosition aPos( m_rDoc.GetNodes() ); if (m_rDoc.GotoOutline(aPos, sName, nullptr)) { - SwNode* pNd = &aPos.nNode.GetNode(); + SwNode* pNd = &aPos.GetNode(); const int nLvl = pNd->GetTextNode()->GetAttrOutlineLevel()-1; const SwOutlineNodes& rOutlNds = m_rDoc.GetNodes().GetOutLineNds(); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 066481c76bb6..d5c3f70114b6 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -53,10 +53,10 @@ using namespace com::sun::star; // 2. check that position is valid and doesn't point after text void lcl_CheckPosition( const SwPosition* pPos ) { - assert(dynamic_cast<SwContentIndexReg*>(&pPos->nNode.GetNode()) + assert(dynamic_cast<SwContentIndexReg*>(&pPos->GetNode()) == pPos->nContent.GetContentNode()); - SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pPos->GetNode().GetTextNode(); if( pTextNode == nullptr ) { assert(pPos->nContent == 0); @@ -147,14 +147,14 @@ void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) // the AppendFootnote/RemoveFootnote will do it by itself! rDoc.GetFootnoteIdxs().UpdateFootnote(rPam.Start()->nNode); SwPosition currentStart(*rPam.Start()); - SwTextNode * pStartNode(rPam.Start()->nNode.GetNode().GetTextNode()); + SwTextNode * pStartNode(rPam.Start()->GetNode().GetTextNode()); while (!pStartNode) { // note: branch only taken for redlines, not fieldmarks SwStartNode *const pTableOrSectionNode( - currentStart.nNode.GetNode().IsTableNode() - ? static_cast<SwStartNode*>(currentStart.nNode.GetNode().GetTableNode()) - : static_cast<SwStartNode*>(currentStart.nNode.GetNode().GetSectionNode())); + currentStart.GetNode().IsTableNode() + ? static_cast<SwStartNode*>(currentStart.GetNode().GetTableNode()) + : static_cast<SwStartNode*>(currentStart.GetNode().GetSectionNode())); if ( !pTableOrSectionNode ) { SAL_WARN("sw.core", "UpdateFramesForAddDeleteRedline:: known pathology (or ChangesInRedline mode)"); @@ -179,8 +179,8 @@ void UpdateFramesForAddDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) } } currentStart.nNode = pTableOrSectionNode->EndOfSectionIndex() + 1; - currentStart.nContent.Assign(currentStart.nNode.GetNode().GetContentNode(), 0); - pStartNode = currentStart.nNode.GetNode().GetTextNode(); + currentStart.nContent.Assign(currentStart.GetNode().GetContentNode(), 0); + pStartNode = currentStart.GetNode().GetTextNode(); } if (currentStart < *rPam.End()) { @@ -260,14 +260,14 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) bool isAppendObjsCalled(false); rDoc.GetFootnoteIdxs().UpdateFootnote(rPam.Start()->nNode); SwPosition currentStart(*rPam.Start()); - SwTextNode * pStartNode(rPam.Start()->nNode.GetNode().GetTextNode()); + SwTextNode * pStartNode(rPam.Start()->GetNode().GetTextNode()); while (!pStartNode) { // note: branch only taken for redlines, not fieldmarks SwStartNode const*const pTableOrSectionNode( - currentStart.nNode.GetNode().IsTableNode() - ? static_cast<SwStartNode*>(currentStart.nNode.GetNode().GetTableNode()) - : static_cast<SwStartNode*>(currentStart.nNode.GetNode().GetSectionNode())); + currentStart.GetNode().IsTableNode() + ? static_cast<SwStartNode*>(currentStart.GetNode().GetTableNode()) + : static_cast<SwStartNode*>(currentStart.GetNode().GetSectionNode())); assert(pTableOrSectionNode); // known pathology for (SwNodeOffset j = pTableOrSectionNode->GetIndex(); j <= pTableOrSectionNode->EndOfSectionIndex(); ++j) { @@ -282,8 +282,8 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) isAppendObjsCalled = true; } currentStart.nNode = pTableOrSectionNode->EndOfSectionIndex() + 1; - currentStart.nContent.Assign(currentStart.nNode.GetNode().GetContentNode(), 0); - pStartNode = currentStart.nNode.GetNode().GetTextNode(); + currentStart.nContent.Assign(currentStart.GetNode().GetContentNode(), 0); + pStartNode = currentStart.GetNode().GetTextNode(); } if (currentStart < *rPam.End()) { @@ -401,15 +401,15 @@ namespace return false; if( rPos2.nNode.GetIndex() - 1 != rPos1.nNode.GetIndex() ) return false; - pCNd = rPos1.nNode.GetNode().GetContentNode(); + pCNd = rPos1.GetNode().GetContentNode(); return pCNd && rPos1.nContent.GetIndex() == pCNd->Len(); } // copy style or return with SwRedlineExtra_FormatColl with reject data of the upcoming copy SwRedlineExtraData_FormatColl* lcl_CopyStyle( const SwPosition & rFrom, const SwPosition & rTo, bool bCopy = true ) { - SwTextNode* pToNode = rTo.nNode.GetNode().GetTextNode(); - SwTextNode* pFromNode = rFrom.nNode.GetNode().GetTextNode(); + SwTextNode* pToNode = rTo.GetNode().GetTextNode(); + SwTextNode* pFromNode = rFrom.GetNode().GetTextNode(); if (pToNode != nullptr && pFromNode != nullptr && pToNode != pFromNode) { const SwPaM aPam(*pToNode); @@ -456,7 +456,7 @@ namespace // delete the empty tracked table row (i.e. if it's last tracked deletion was accepted) void lcl_DeleteTrackedTableRow ( const SwPosition* pPos ) { - const SwTableBox* pBox = pPos->nNode.GetNode().GetTableBox(); + const SwTableBox* pBox = pPos->GetNode().GetTableBox(); if ( !pBox ) return; @@ -484,7 +484,7 @@ namespace // (also at accepting the last redline insertion of a tracked table row insertion) void lcl_RemoveTrackingOfTableRow( const SwPosition* pPos, bool bRejectDeletion ) { - const SwTableBox* pBox = pPos->nNode.GetNode().GetTableBox(); + const SwTableBox* pBox = pPos->GetNode().GetTableBox(); if ( !pBox ) return; @@ -639,8 +639,8 @@ namespace if( pDelStt && pDelEnd ) { SwPaM aPam( *pDelStt, *pDelEnd ); - SwContentNode* pCSttNd = pDelStt->nNode.GetNode().GetContentNode(); - SwContentNode* pCEndNd = pDelEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCSttNd = pDelStt->GetNode().GetContentNode(); + SwContentNode* pCEndNd = pDelEnd->GetNode().GetContentNode(); pRStt = pRedl->Start(); pREnd = pRedl->End(); @@ -760,8 +760,8 @@ namespace { SwPaM aPam( *pDelStt, *pDelEnd ); - SwContentNode* pCSttNd = pDelStt->nNode.GetNode().GetContentNode(); - SwContentNode* pCEndNd = pDelEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCSttNd = pDelStt->GetNode().GetContentNode(); + SwContentNode* pCEndNd = pDelEnd->GetNode().GetContentNode(); if( bDelRedl ) delete pRedl; @@ -778,11 +778,11 @@ namespace { aPam.GetBound().nContent.Assign( nullptr, 0 ); aPam.GetBound( false ).nContent.Assign( nullptr, 0 ); - if (aPam.End()->nNode.GetNode().IsStartNode()) + if (aPam.End()->GetNode().IsStartNode()) { // end node will be deleted too! see nNodeDiff+1 --aPam.End()->nNode; } - assert(!aPam.End()->nNode.GetNode().IsStartNode()); + assert(!aPam.End()->GetNode().IsStartNode()); rDoc.getIDocumentContentOperations().DelFullPara( aPam ); } else @@ -914,7 +914,7 @@ namespace // handle paragraph formatting changes // (range is only a full paragraph or a part of it) const SwPosition* pStt = pRedl->Start(); - SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = pStt->GetNode().GetTextNode(); if( pTNd ) { // expand range to the whole paragraph @@ -1037,9 +1037,9 @@ namespace *pStt = *pRStt; } } - if( pEnd->nNode.GetNode().IsContentNode() && + if( pEnd->GetNode().IsContentNode() && !rDoc.GetNodes()[ pEnd->nNode.GetIndex() + 1 ]->IsContentNode() && - pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetContentNode()->Len() ) + pEnd->nContent.GetIndex() == pEnd->GetNode().GetContentNode()->Len() ) { const SwRangeRedline* pRedl = rDoc.getIDocumentRedlineAccess().GetRedline( *pEnd, nullptr ); if( pRedl ) @@ -1294,7 +1294,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall auto [pStt, pEnd] = pNewRedl->StartEnd(); // SwPosition* { - SwTextNode* pTextNode = pStt->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStt->GetNode().GetTextNode(); if( pTextNode == nullptr ) { if( pStt->nContent > 0 ) @@ -1311,7 +1311,7 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall pStt->nContent = pTextNode->Len(); } } - pTextNode = pEnd->nNode.GetNode().GetTextNode(); + pTextNode = pEnd->GetNode().GetTextNode(); if( pTextNode == nullptr ) { if( pEnd->nContent > 0 ) @@ -1759,11 +1759,11 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall // paragraphs (if, of course, we also start on // a paragraph boundary). if( (pStt->nContent == 0) && - pEnd->nNode.GetNode().IsEndNode() ) + pEnd->GetNode().IsEndNode() ) { pEnd->nNode--; pEnd->nContent.Assign( - pEnd->nNode.GetNode().GetTextNode(), 0); + pEnd->GetNode().GetTextNode(), 0); m_rDoc.getIDocumentContentOperations().DelFullPara( *pNewRedl ); } else @@ -2238,10 +2238,10 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall // to avoid text insertion with bad style in the deleted // area later (except paragraphs of the removed tables). - SwContentNode* pDelNd = pStt->nNode.GetNode().GetContentNode(); + SwContentNode* pDelNd = pStt->GetNode().GetContentNode(); // start copying the style of the first paragraph from the end of the range - SwContentNode* pTextNd = pEnd->nNode.GetNode().GetContentNode(); - SwNodeIndex aIdx( pEnd->nNode.GetNode() ); + SwContentNode* pTextNd = pEnd->GetNode().GetContentNode(); + SwNodeIndex aIdx( pEnd->GetNode() ); bool bFirst = true; while (pTextNd != nullptr && pDelNd->GetIndex() < pTextNd->GetIndex()) @@ -2328,8 +2328,8 @@ DocumentRedlineManager::AppendRedline(SwRangeRedline* pNewRedl, bool const bCall // this doesn't work for selections with multiple tables if ( m_rDoc.GetIDocumentUndoRedo().DoesUndo() ) { - SwNodeIndex aSttIdx( pStt->nNode.GetNode() ); - SwNodeIndex aEndIdx( pEnd->nNode.GetNode() ); + SwNodeIndex aSttIdx( pStt->GetNode() ); + SwNodeIndex aEndIdx( pEnd->GetNode() ); while ( aSttIdx < aEndIdx ) { if ( aSttIdx.GetNode().IsTableNode() ) @@ -2467,9 +2467,9 @@ void DocumentRedlineManager::CompressRedlines(size_t nStartIndex) auto [pCurStt, pCurEnd] = pCur->StartEnd(); if( *pPrevEnd == *pCurStt && pPrev->CanCombine( *pCur ) && - pPrevStt->nNode.GetNode().StartOfSectionNode() == - pCurEnd->nNode.GetNode().StartOfSectionNode() && - !pCurEnd->nNode.GetNode().StartOfSectionNode()->IsTableNode() ) + pPrevStt->GetNode().StartOfSectionNode() == + pCurEnd->GetNode().StartOfSectionNode() && + !pCurEnd->GetNode().StartOfSectionNode()->IsTableNode() ) { // we then can merge them SwRedlineTable::size_type nPrevIndex = n-1; @@ -2736,9 +2736,9 @@ bool DocumentRedlineManager::HasRedline( const SwPaM& rPam, RedlineType nType, b { SwPosition currentStart(*rPam.Start()); SwPosition currentEnd(*rPam.End()); - SwNodeIndex pEndNodeIndex(currentEnd.nNode.GetNode()); + SwNodeIndex pEndNodeIndex(currentEnd.GetNode()); - for( SwRedlineTable::size_type n = GetRedlinePos( rPam.Start()->nNode.GetNode(), nType ); + for( SwRedlineTable::size_type n = GetRedlinePos( rPam.Start()->GetNode(), nType ); n < maRedlineTable.size(); ++n ) { const SwRangeRedline* pTmp = maRedlineTable[ n ]; @@ -3139,7 +3139,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons if( pFnd ) { const SwPosition* pEnd = pFnd->End(); - if( !pEnd->nNode.GetNode().IsContentNode() ) + if( !pEnd->GetNode().IsContentNode() ) { SwNodeIndex aTmp( pEnd->nNode ); SwContentNode* pCNd = SwNodes::GoPrevSection( &aTmp ); @@ -3265,7 +3265,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons if( pFnd ) { const SwPosition* pStt = pFnd->Start(); - if( !pStt->nNode.GetNode().IsContentNode() ) + if( !pStt->GetNode().IsContentNode() ) { SwNodeIndex aTmp( pStt->nNode ); SwContentNode* pCNd = m_rDoc.GetNodes().GoNextSection( &aTmp ); diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index d8c870b24bb1..b7956df30cc9 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -423,7 +423,7 @@ static OUString lcl_AnchoredFrames(const SwNode & rNode) const SwFormatAnchor & rAnchor = (*i)->GetAnchor(); const SwPosition * pPos = rAnchor.GetContentAnchor(); - if (pPos && &pPos->nNode.GetNode() == &rNode) + if (pPos && &pPos->GetNode() == &rNode) { if (! bFirst) aResult.append(", "); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 3e2c57b2c4b8..7c6e62fd8ea2 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1704,7 +1704,7 @@ void SwDoc::AppendUndoForInsertFromDB( const SwPaM& rPam, bool bIsTable ) { if( bIsTable ) { - const SwTableNode* pTableNd = rPam.GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTableNd = rPam.GetPoint()->GetNode().FindTableNode(); if( pTableNd ) { std::unique_ptr<SwUndoCpyTable> pUndo(new SwUndoCpyTable(*this)); diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 5e3fab2f7550..e2c15c188d7c 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -361,8 +361,8 @@ namespace if ( ( bChangedPos || bChangedOPos ) && io_pMark->IsExpanded() - && io_pMark->GetOtherMarkPos().nNode.GetNode().FindTableBoxStartNode() != - io_pMark->GetMarkPos().nNode.GetNode().FindTableBoxStartNode() ) + && io_pMark->GetOtherMarkPos().GetNode().FindTableBoxStartNode() != + io_pMark->GetMarkPos().GetNode().FindTableBoxStartNode() ) { if ( !bChangedOPos ) { @@ -514,11 +514,11 @@ OUString IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix() bool IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark( const SwPaM& rPaM ) { - return rPaM.Start()->nNode.GetNode().IsTextNode() && + return rPaM.Start()->GetNode().IsTextNode() && rPaM.Start()->nContent.GetIndex() == 0 && ( !rPaM.HasMark() || ( rPaM.GetMark()->nNode == rPaM.GetPoint()->nNode && - rPaM.End()->nContent.GetIndex() == rPaM.End()->nNode.GetNode().GetTextNode()->Len() ) ); + rPaM.End()->nContent.GetIndex() == rPaM.End()->GetNode().GetTextNode()->Len() ) ); } void IDocumentMarkAccess::DeleteFieldmarkCommand(::sw::mark::IFieldmark const& rMark) @@ -559,13 +559,13 @@ namespace sw::mark pPos2->nContent.GetIndex()); } #endif - if ( (!rPaM.GetPoint()->nNode.GetNode().IsTextNode() + if ( (!rPaM.GetPoint()->GetNode().IsTextNode() && (eType != MarkType::UNO_BOOKMARK // SwXTextRange can be on table node or plain start node (FLY_AT_FLY) - || !rPaM.GetPoint()->nNode.GetNode().IsStartNode())) - || (!rPaM.GetMark()->nNode.GetNode().IsTextNode() + || !rPaM.GetPoint()->GetNode().IsStartNode())) + || (!rPaM.GetMark()->GetNode().IsTextNode() && (eType != MarkType::UNO_BOOKMARK - || !rPaM.GetMark()->nNode.GetNode().IsStartNode()))) + || !rPaM.GetMark()->GetNode().IsStartNode()))) { SAL_WARN("sw.core", "MarkManager::makeMark(..)" " - refusing to create mark on non-textnode"); @@ -593,8 +593,8 @@ namespace sw::mark } if ((eType == MarkType::TEXT_FIELDMARK || eType == MarkType::DATE_FIELDMARK) - && (rPaM.GetPoint()->nNode.GetNode().StartOfSectionNode() != rPaM.GetMark()->nNode.GetNode().StartOfSectionNode() - || (pSepPos && rPaM.GetPoint()->nNode.GetNode().StartOfSectionNode() != pSepPos->nNode.GetNode().StartOfSectionNode()))) + && (rPaM.GetPoint()->GetNode().StartOfSectionNode() != rPaM.GetMark()->GetNode().StartOfSectionNode() + || (pSepPos && rPaM.GetPoint()->GetNode().StartOfSectionNode() != pSepPos->GetNode().StartOfSectionNode()))) { SAL_WARN("sw.core", "MarkManager::makeMark(..)" " - invalid range on fieldmark, different nodes array sections"); @@ -896,7 +896,7 @@ namespace sw::mark assert(pMark); // is on position ?? bool bChangedPos = false; - if(&pMark->GetMarkPos().nNode.GetNode() == pOldNode) + if(&pMark->GetMarkPos().GetNode() == pOldNode) { pMark->SetMarkPos(aNewPos); bChangedPos = true; @@ -904,7 +904,7 @@ namespace sw::mark } bool bChangedOPos = false; if (pMark->IsExpanded() && - &pMark->GetOtherMarkPos().nNode.GetNode() == pOldNode) + &pMark->GetOtherMarkPos().GetNode() == pOldNode) { // shift the OtherMark to aNewPos pMark->SetOtherMarkPos(aNewPos); @@ -939,7 +939,7 @@ namespace sw::mark ::sw::mark::MarkBase* const pMark = *ppMark; // correction of non-existent non-MarkBase instances cannot be done assert(pMark); - if(&pMark->GetMarkPos().nNode.GetNode() == pOldNode) + if(&pMark->GetMarkPos().GetNode() == pOldNode) { SwPosition aNewPosRel(aNewPos); if (dynamic_cast< ::sw::mark::CrossRefBookmark *>(pMark)) @@ -953,7 +953,7 @@ namespace sw::mark bChangedPos = true; } if(pMark->IsExpanded() && - &pMark->GetOtherMarkPos().nNode.GetNode() == pOldNode) + &pMark->GetOtherMarkPos().GetNode() == pOldNode) { SwPosition aNewPosRel(aNewPos); aNewPosRel.nContent += pMark->GetOtherMarkPos().nContent.GetIndex(); @@ -1928,7 +1928,7 @@ void DelBookmarks( else { bool bStt = true; - SwContentNode* pCNd = pRStt->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = pRStt->GetNode().GetContentNode(); if( !pCNd ) pCNd = rDoc.GetNodes().GoNext( &pRStt->nNode ); if (!pCNd) @@ -1939,7 +1939,7 @@ void DelBookmarks( if( !pCNd ) { pRStt->nNode = pREnd->nNode; - pCNd = pRStt->nNode.GetNode().GetContentNode(); + pCNd = pRStt->GetNode().GetContentNode(); } } pRStt->nContent.Assign( pCNd, bStt ? 0 : pCNd->Len() ); @@ -1953,7 +1953,7 @@ void DelBookmarks( else { bool bStt = false; - SwContentNode* pCNd = pREnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = pREnd->GetNode().GetContentNode(); if( !pCNd ) pCNd = SwNodes::GoPrevious( &pREnd->nNode ); if( !pCNd ) @@ -1964,7 +1964,7 @@ void DelBookmarks( if( !pCNd ) { pREnd->nNode = pRStt->nNode; - pCNd = pREnd->nNode.GetNode().GetContentNode(); + pCNd = pREnd->GetNode().GetContentNode(); } } pREnd->nContent.Assign( pCNd, bStt ? 0 : pCNd->Len() ); diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 5b443e1895f2..97e1aa362117 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1671,7 +1671,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) // #i101009# // prevent redlines that end on structural end node if (& GetEndOfContent() == - & pTmp->GetPoint()->nNode.GetNode()) + & pTmp->GetPoint()->GetNode()) { --pTmp->GetPoint()->nNode; SwContentNode *const pContentNode( pTmp->GetContentNode() ); @@ -1715,7 +1715,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) // #i101009# // prevent redlines that end on structural end node if (& GetEndOfContent() == - & pTmp->GetPoint()->nNode.GetNode()) + & pTmp->GetPoint()->GetNode()) { --pTmp->GetPoint()->nNode; SwContentNode *const pContentNode( pTmp->GetContentNode() ); @@ -1747,7 +1747,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) if( rSttEnd == rEndStt || (!rEndStt.nContent.GetIndex() && rEndStt.nNode.GetIndex() - 1 == rSttEnd.nNode.GetIndex() && - nullptr != ( pCNd = rSttEnd.nNode.GetNode().GetContentNode() ) && + nullptr != ( pCNd = rSttEnd.GetNode().GetContentNode() ) && rSttEnd.nContent.GetIndex() == pCNd->Len())) { if( pTmp->GetNext() == m_pInsertRing.get() ) diff --git a/sw/source/core/doc/doccorr.cxx b/sw/source/core/doc/doccorr.cxx index b5b71ae6b9ae..ca618dcef877 100644 --- a/sw/source/core/doc/doccorr.cxx +++ b/sw/source/core/doc/doccorr.cxx @@ -73,11 +73,11 @@ namespace const sal_Int32 nCntIdx) { for(int nb = 0; nb < 2; ++nb) - if(&(pPam->GetBound(bool(nb)).nNode.GetNode()) == pOldNode) + if(&(pPam->GetBound(bool(nb)).GetNode()) == pOldNode) { pPam->GetBound(bool(nb)).nNode = rNewPos.nNode; pPam->GetBound(bool(nb)).nContent.Assign( - rNewPos.nNode.GetNode().GetContentNode(), + rNewPos.GetNode().GetContentNode(), nCntIdx + pPam->GetBound(bool(nb)).nContent.GetIndex()); } } @@ -89,7 +89,7 @@ void PaMCorrAbs( const SwPaM& rRange, SwPosition const aStart( *rRange.Start() ); SwPosition const aEnd( *rRange.End() ); SwPosition const aNewPos( rNewPos ); - SwDoc& rDoc = aStart.nNode.GetNode().GetDoc(); + SwDoc& rDoc = aStart.GetNode().GetDoc(); SwCursorShell *const pShell = rDoc.GetEditShell(); if( pShell ) @@ -134,9 +134,9 @@ void PaMCorrAbs( const SwPaM& rRange, // section bool const bLeaveSection = pUnoCursor->IsRemainInSection() && - ( lcl_FindUnoCursorSection( aNewPos.nNode.GetNode() ) != + ( lcl_FindUnoCursorSection( aNewPos.GetNode() ) != lcl_FindUnoCursorSection( - pUnoCursor->GetPoint()->nNode.GetNode() ) ); + pUnoCursor->GetPoint()->GetNode() ) ); for(SwPaM& rPaM : pUnoCursor->GetRingContainer()) { diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 2f13552c9106..e63d85050f11 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -67,8 +67,8 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos, if (aAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA) { aPos.nNode = *pInsertPos; - assert(aPos.nNode.GetNode().GetContentNode()); - aPos.nContent.Assign(aPos.nNode.GetNode().GetContentNode(), + assert(aPos.GetNode().GetContentNode()); + aPos.nContent.Assign(aPos.GetNode().GetContentNode(), rSave.nContentIndex); } else @@ -80,15 +80,15 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos, else { aPos.nNode = rStartPos.nNode; - assert(aPos.nNode.GetNode().GetContentNode()); - aPos.nContent.Assign(aPos.nNode.GetNode().GetContentNode(), 0); + assert(aPos.GetNode().GetContentNode()); + aPos.nContent.Assign(aPos.GetNode().GetContentNode(), 0); } } else { aPos.nNode = rStartPos.nNode.GetIndex() + rSave.nNdDiff; - assert(aPos.nNode.GetNode().GetContentNode()); - aPos.nContent.Assign(aPos.nNode.GetNode().GetContentNode(), + assert(aPos.GetNode().GetContentNode()); + aPos.nContent.Assign(aPos.GetNode().GetContentNode(), rSave.nNdDiff == SwNodeOffset(0) ? rStartPos.nContent.GetIndex() + rSave.nContentIndex : rSave.nContentIndex); @@ -98,11 +98,11 @@ void RestFlyInRange( SaveFlyArr & rArr, const SwPosition& rStartPos, pFormat->GetDoc()->GetSpzFrameFormats()->push_back( pFormat ); // SetFormatAttr should call Modify() and add it to the node pFormat->SetFormatAttr( aAnchor ); - SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = aPos.GetNode().GetContentNode(); if (pCNd && pCNd->getLayoutFrame(pFormat->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, nullptr)) pFormat->MakeFrames(); } - sw::CheckAnchoredFlyConsistency(rStartPos.nNode.GetNode().GetDoc()); + sw::CheckAnchoredFlyConsistency(rStartPos.GetNode().GetDoc()); } void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr ) @@ -138,7 +138,7 @@ void SaveFlyInRange( const SwNodeRange& rRg, SaveFlyArr& rArr ) void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, SaveFlyArr& rArr, bool bMoveAllFlys, SwHistory *const pHistory) { - SwFrameFormats& rFormats = *rPam.GetPoint()->nNode.GetNode().GetDoc().GetSpzFrameFormats(); + SwFrameFormats& rFormats = *rPam.GetPoint()->GetNode().GetDoc().GetSpzFrameFormats(); SwFrameFormat* pFormat; const SwFormatAnchor* pAnchor; @@ -148,10 +148,10 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, SwPosition atParaEnd(*rPam.End()); if (bMoveAllFlys) { - assert(!rPam.End()->nNode.GetNode().IsTextNode() // can be table end-node - || rPam.End()->nContent.GetIndex() == rPam.End()->nNode.GetNode().GetTextNode()->Len()); + assert(!rPam.End()->GetNode().IsTextNode() // can be table end-node + || rPam.End()->nContent.GetIndex() == rPam.End()->GetNode().GetTextNode()->Len()); ++atParaEnd.nNode; - atParaEnd.nContent.Assign(atParaEnd.nNode.GetNode().GetContentNode(), 0); + atParaEnd.nContent.Assign(atParaEnd.GetNode().GetContentNode(), 0); } for( SwFrameFormats::size_type n = 0; n < rFormats.size(); ++n ) @@ -203,7 +203,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, } } } - sw::CheckAnchoredFlyConsistency(rPam.GetPoint()->nNode.GetNode().GetDoc()); + sw::CheckAnchoredFlyConsistency(rPam.GetPoint()->GetNode().GetDoc()); } /// Delete and move all Flys at the paragraph, that are within the selection. @@ -335,11 +335,11 @@ void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev ) return; auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition* - SwTextNode *pSttNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode *pSttNd = pStt->GetNode().GetTextNode(); if( !pSttNd ) return; - SwTextNode *pEndNd = pEnd->nNode.GetNode().GetTextNode(); + SwTextNode *pEndNd = pEnd->GetNode().GetTextNode(); rJoinText = nullptr != pEndNd; if( !rJoinText ) return; @@ -529,13 +529,13 @@ uno::Any SwDoc::Spell( SwPaM& rPaM, std::unique_ptr<SwSpellArgs> pSpellArgs; if (pConvArgs) { - pConvArgs->SetStart(pSttPos->nNode.GetNode().GetTextNode(), pSttPos->nContent); - pConvArgs->SetEnd( pEndPos->nNode.GetNode().GetTextNode(), pEndPos->nContent ); + pConvArgs->SetStart(pSttPos->GetNode().GetTextNode(), pSttPos->nContent); + pConvArgs->SetEnd( pEndPos->GetNode().GetTextNode(), pEndPos->nContent ); } else pSpellArgs.reset(new SwSpellArgs( xSpeller, - pSttPos->nNode.GetNode().GetTextNode(), pSttPos->nContent, - pEndPos->nNode.GetNode().GetTextNode(), pEndPos->nContent, + pSttPos->GetNode().GetTextNode(), pSttPos->nContent, + pEndPos->GetNode().GetTextNode(), pEndPos->nContent, bGrammarCheck )); SwNodeOffset nCurrNd = pSttPos->nNode.GetIndex(); @@ -740,12 +740,12 @@ SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos, m_nNode = pPoint->nNode.GetIndex(); // Set start - m_pStart = pPoint->nNode.GetNode().GetTextNode(); + m_pStart = pPoint->GetNode().GetTextNode(); m_nPamStart = pPoint->nContent.GetIndex(); // Set End and Length const SwPosition *pMark = pPam->GetMark(); - m_pEnd = pMark->nNode.GetNode().GetTextNode(); + m_pEnd = pMark->GetNode().GetTextNode(); m_nPamLen = pMark->nContent.GetIndex(); if( pPoint->nNode == pMark->nNode ) m_nPamLen = m_nPamLen - pPoint->nContent.GetIndex(); @@ -852,7 +852,7 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) const sal_Int32 nSttCnt = pStt->nContent.GetIndex(); const sal_Int32 nEndCnt = pEnd->nContent.GetIndex(); - const SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pStt->GetNode().GetTextNode(); if( pStt == pEnd && pTNd ) // no region ? { // do nothing @@ -873,7 +873,7 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) if( nullptr != ( pTNd = aIdx.GetNode().GetTextNode() )) pTNd->CountWords( rStat, 0, pTNd->GetText().getLength() ); - if( nEndCnt && nullptr != ( pTNd = pEnd->nNode.GetNode().GetTextNode() )) + if( nEndCnt && nullptr != ( pTNd = pEnd->GetNode().GetTextNode() )) pTNd->CountWords( rStat, 0, nEndCnt ); } else if( pTNd && nSttCnt < nEndCnt ) diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index 2d076f541864..10d8361aeaf7 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -198,7 +198,7 @@ void SetGetExpField::GetPosOfContent( SwPosition& rPos ) const else { rPos.nNode = m_nNode; - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), m_nContent ); + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), m_nContent ); } } @@ -308,11 +308,11 @@ const SwNode* SetGetExpField::GetNodeFromContent() const break; case BOOKMARK: - pRet = &m_CNTNT.pBookmark->GetMarkStart().nNode.GetNode(); + pRet = &m_CNTNT.pBookmark->GetMarkStart().GetNode(); break; case CRSRPOS: - pRet = &m_CNTNT.pPos->nNode.GetNode(); + pRet = &m_CNTNT.pPos->GetNode(); break; case TEXTTOXMARK: @@ -927,7 +927,7 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode ) assert(pBookmark); if (!pBookmark->GetHideCondition().isEmpty()) { - GetBodyNodeGeneric((*it)->GetMarkStart().nNode.GetNode(), *pBookmark); + GetBodyNodeGeneric((*it)->GetMarkStart().GetNode(), *pBookmark); } } } diff --git a/sw/source/core/doc/docfly.cxx b/sw/source/core/doc/docfly.cxx index 41756ff0cd1d..d5fc46715b08 100644 --- a/sw/source/core/doc/docfly.cxx +++ b/sw/source/core/doc/docfly.cxx @@ -227,7 +227,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, if( rAnch.GetContentAnchor() ) { const SwPosition *pPos = rAnch.GetContentAnchor(); - const SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode(); + const SwContentNode* pNd = pPos->GetNode().GetContentNode(); std::pair<Point, bool> const tmp(aRet, false); const SwFrame* pOld = pNd ? pNd->getLayoutFrame(rDoc.getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr; if( pOld ) @@ -239,7 +239,7 @@ static Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFormatAnchor& rAnch, if( rAnch.GetContentAnchor() ) { const SwFlyFrameFormat* pFormat = static_cast<SwFlyFrameFormat*>(rAnch.GetContentAnchor()-> - nNode.GetNode().GetFlyFormat()); + GetNode().GetFlyFormat()); const SwFrame* pOld = pFormat ? pFormat->GetFrame( &aRet ) : nullptr; if( pOld ) aRet = pOld->getFrameArea().Pos(); @@ -306,7 +306,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo // destroys the format. To avoid that, we disconnect the format from // the attribute. const SwPosition *pPos = rOldAnch.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -334,7 +334,7 @@ sal_Int8 SwDoc::SetFlyFrameAnchor( SwFrameFormat& rFormat, SfxItemSet& rSet, boo // that no forbidden automatic alignment is left. { const SwPosition *pPos = aNewAnch.GetContentAnchor(); - SwTextNode *pNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pNd = pPos->GetNode().GetTextNode(); OSL_ENSURE( pNd, "Cursor does not point to TextNode." ); SwFormatFlyCnt aFormat( static_cast<SwFlyFrameFormat*>(&rFormat) ); @@ -827,7 +827,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // consider that drawing objects can be in // header/footer. Thus, <GetFrame()> by left-top-corner std::pair<Point, bool> const tmp(aPt, false); - pTextFrame = aPos.nNode.GetNode(). + pTextFrame = aPos.GetNode(). GetContentNode()->getLayoutFrame( getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp); @@ -909,7 +909,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // #i26791# - adjust vertical positioning to 'center to // baseline' SetAttr( SwFormatVertOrient( 0, text::VertOrientation::CENTER, text::RelOrientation::FRAME ), *pContact->GetFormat() ); - SwTextNode *pNd = aPos.nNode.GetNode().GetTextNode(); + SwTextNode *pNd = aPos.GetNode().GetTextNode(); OSL_ENSURE( pNd, "Cursor not positioned at TextNode." ); SwFormatFlyCnt aFormat( pContact->GetFormat() ); @@ -982,7 +982,7 @@ bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList, // destroys the format. To avoid that, we disconnect the format from // the attribute. const sal_Int32 nIndx( xOldAsCharAnchorPos->nContent.GetIndex() ); - SwTextNode* pTextNode( xOldAsCharAnchorPos->nNode.GetNode().GetTextNode() ); + SwTextNode* pTextNode( xOldAsCharAnchorPos->GetNode().GetTextNode() ); assert(pTextNode && "<SwDoc::ChgAnchor(..)> - missing previous anchor text node for as-character anchored object"); SwTextAttr * const pHint = pTextNode->GetTextAttrForCharAt( nIndx, RES_TXTATR_FLYCNT ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 5f4e33ddacc5..d9208ff38da6 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -252,7 +252,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, if( !rRg.HasMark() ) { - SwTextNode* pTextNd = rRg.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rRg.GetPoint()->GetNode().GetTextNode(); if( !pTextNd ) return ; @@ -356,7 +356,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, ++aTmpStt; } - if( pEnd->nContent.GetIndex() == pEnd->nNode.GetNode().GetContentNode()->Len() ) + if( pEnd->nContent.GetIndex() == pEnd->GetNode().GetContentNode()->Len() ) { // set up a later, and all CharFormatAttr -> TextFormatAttr ++aTmpEnd; @@ -384,7 +384,7 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, else if( !rRg.HasMark() ) { aPara.bResetAll = false ; - ::lcl_RstAttr( &pStt->nNode.GetNode(), &aPara ); + ::lcl_RstAttr( &pStt->GetNode(), &aPara ); aPara.bResetAll = true ; } @@ -406,7 +406,7 @@ void SwDoc::UpdateRsid( const SwPaM &rRg, const sal_Int32 nLen ) if (!SW_MOD()->GetModuleConfig()->IsStoreRsid()) return; - SwTextNode *pTextNode = rRg.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = rRg.GetPoint()->GetNode().GetTextNode(); if (!pTextNode) { return; @@ -1702,7 +1702,7 @@ void SwDoc::MoveLeftMargin(const SwPaM& rPam, bool bRight, bool bModulus, bool SwDoc::DontExpandFormat( const SwPosition& rPos, bool bFlag ) { bool bRet = false; - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if( pTextNd ) { bRet = pTextNd->DontExpandFormat( rPos.nContent, bFlag ); @@ -1772,7 +1772,7 @@ void SwDoc::SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nP const SfxItemSet* pSet ) { SwPaM aPam( rPos ); - SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = rPos.GetNode().GetTextNode(); assert(pTNd); if (mbIsAutoFormatRedline) @@ -1818,7 +1818,7 @@ void SwDoc::SetTextFormatCollByAutoFormat( const SwPosition& rPos, sal_uInt16 nP void SwDoc::SetFormatItemByAutoFormat( const SwPaM& rPam, const SfxItemSet& rSet ) { - SwTextNode* pTNd = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = rPam.GetPoint()->GetNode().GetTextNode(); assert(pTNd); RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags(); diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 15a54a63a9f5..d2fc6191fea4 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -174,7 +174,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, do { SwPosition& rInsPos = *_pStartCursor->GetPoint(); - SwStartNode* pBoxSttNd = const_cast<SwStartNode*>(rInsPos.nNode.GetNode(). + SwStartNode* pBoxSttNd = const_cast<SwStartNode*>(rInsPos.GetNode(). FindTableBoxStartNode()); if( pBoxSttNd && SwNodeOffset(2) == pBoxSttNd->EndOfSectionIndex() - diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index 661875a12cc3..04acd5a5e121 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -209,7 +209,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos, SwFormatAnchor aAnch( pFormat->GetAnchor() ); if (pAnchor && (RndStdIds::FLY_AT_FLY == pAnchor->GetAnchorId())) { - SwPosition aPos( *rAnchPos.nNode.GetNode().FindFlyStartNode() ); + SwPosition aPos( *rAnchPos.GetNode().FindFlyStartNode() ); aAnch.SetAnchor( &aPos ); eAnchorId = RndStdIds::FLY_AT_FLY; } @@ -235,7 +235,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection_( const SwPosition& rAnchPos, if ( RndStdIds::FLY_AS_CHAR == eAnchorId ) { const sal_Int32 nStt = rAnchPos.nContent.GetIndex(); - SwTextNode * pTextNode = rAnchPos.nNode.GetNode().GetTextNode(); + SwTextNode * pTextNode = rAnchPos.GetNode().GetTextNode(); OSL_ENSURE(pTextNode!= nullptr, "There should be a SwTextNode!"); @@ -318,7 +318,7 @@ SwFlyFrameFormat* SwDoc::MakeFlySection( RndStdIds eAnchorType, SwContentNode * pNewTextNd = GetNodes().MakeTextNode (SwNodeIndex( GetNodes().GetEndOfAutotext()), getIDocumentStylePoolAccess().GetTextCollFromPool( nCollId )); - SwContentNode * pAnchorNode = pAnchorPos->nNode.GetNode().GetContentNode(); + SwContentNode * pAnchorNode = pAnchorPos->GetNode().GetContentNode(); // pAnchorNode from cursor must be valid, unless a whole table is selected (in which // case the node is not a content node, and pAnchorNode is nullptr). In the latter case, // bCalledFromShell is false. @@ -791,7 +791,7 @@ lcl_InsertLabel(SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable, if ( RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId() ) { const SwPosition *pPos = rAnchor.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -1110,7 +1110,7 @@ lcl_InsertDrawLabel( SwDoc & rDoc, SwTextFormatColls *const pTextFormatCollTable if ( RndStdIds::FLY_AS_CHAR == rAnchor.GetAnchorId() ) { const SwPosition *pPos = rAnchor.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -1588,7 +1588,7 @@ bool SwDoc::IsInHeaderFooter( const SwNodeIndex& rIdx ) const return false; } - pNd = &rAnchor.GetContentAnchor()->nNode.GetNode(); + pNd = &rAnchor.GetContentAnchor()->GetNode(); pFlyNd = pNd->FindFlyStartNode(); bFound = true; break; @@ -1610,7 +1610,7 @@ SvxFrameDirection SwDoc::GetTextDirection( const SwPosition& rPos, { SvxFrameDirection nRet = SvxFrameDirection::Unknown; - SwContentNode *pNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = rPos.GetNode().GetContentNode(); // #i42921# - use new method <SwContentNode::GetTextDirection(..)> if ( pNd ) diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index a2230985d2f6..25efba75a672 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1136,7 +1136,7 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu if ( !bDeletePrevious ) { SAL_INFO( "sw.pageframe", "(Flush pagebreak AKA EndAllAction" ); - assert(pTargetShell->GetCursor()->GetPoint()->nNode.GetNode().GetTextNode()->GetSwAttrSet().HasItem(RES_PAGEDESC)); + assert(pTargetShell->GetCursor()->GetPoint()->GetNode().GetTextNode()->GetSwAttrSet().HasItem(RES_PAGEDESC)); pTargetShell->EndAllAction(); SAL_INFO( "sw.pageframe", "Flush changes AKA EndAllAction)" ); pTargetShell->StartAllAction(); diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index fa91ccf32649..dc9284daa82b 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -67,12 +67,12 @@ namespace { // On a selection setup a corresponding Point-and-Mark in order to get // the indentation attribute reset on all paragraphs touched by the selection if ( rPam.HasMark() && - rPam.End()->nNode.GetNode().GetTextNode() ) + rPam.End()->GetNode().GetTextNode() ) { SwPaM aPam( rPam.Start()->nNode, rPam.End()->nNode ); aPam.Start()->nContent = 0; - aPam.End()->nContent = rPam.End()->nNode.GetNode().GetTextNode()->Len(); + aPam.End()->nContent = rPam.End()->GetNode().GetTextNode()->Len(); pDoc->ResetAttrs( aPam, false, aResetAttrsArray, true, pLayout ); } else @@ -88,15 +88,15 @@ namespace { // ensure that selection from the Shell includes the para-props node // to which the attributes should be applied - if (rPam.GetPoint()->nNode.GetNode().IsTextNode()) + if (rPam.GetPoint()->GetNode().IsTextNode()) { rPam.GetPoint()->nNode = *sw::GetParaPropsNode(*pLayout, rPam.GetPoint()->nNode); - rPam.GetPoint()->nContent.Assign(rPam.GetPoint()->nNode.GetNode().GetContentNode(), 0); + rPam.GetPoint()->nContent.Assign(rPam.GetPoint()->GetNode().GetContentNode(), 0); } - if (rPam.GetMark()->nNode.GetNode().IsTextNode()) + if (rPam.GetMark()->GetNode().IsTextNode()) { rPam.GetMark()->nNode = *sw::GetParaPropsNode(*pLayout, rPam.GetMark()->nNode); - rPam.GetMark()->nContent.Assign(rPam.GetMark()->nNode.GetNode().GetContentNode(), 0); + rPam.GetMark()->nContent.Assign(rPam.GetMark()->GetNode().GetContentNode(), 0); } } } @@ -210,8 +210,8 @@ bool SwDoc::OutlineUpDown(const SwPaM& rPam, short nOffset, SwPaM aPam(rPam, nullptr); ExpandPamForParaPropsNodes(aPam, pLayout); const SwOutlineNodes& rOutlNds = GetNodes().GetOutLineNds(); - SwNode* const pSttNd = &aPam.Start()->nNode.GetNode(); - SwNode* const pEndNd = &aPam.End()->nNode.GetNode(); + SwNode* const pSttNd = &aPam.Start()->GetNode(); + SwNode* const pEndNd = &aPam.End()->GetNode(); SwOutlineNodes::size_type nSttPos, nEndPos; if( !rOutlNds.Seek_Entry( pSttNd, &nSttPos ) && @@ -942,7 +942,7 @@ OUString SwDoc::SetNumRule( const SwPaM& rPam, if (!aPam.HasMark()) { - SwTextNode * pTextNd = aPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode * pTextNd = aPam.GetPoint()->GetNode().GetTextNode(); // robust code: consider case that the PaM doesn't denote a text node - e.g. it denotes a graphic node if ( pTextNd != nullptr ) { @@ -1015,7 +1015,7 @@ void SwDoc::SetCounted(const SwPaM & rPam, bool bCounted, void SwDoc::SetNumRuleStart( const SwPosition& rPos, bool bFlag ) { - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if (!pTextNd) return; @@ -1037,7 +1037,7 @@ void SwDoc::SetNumRuleStart( const SwPosition& rPos, bool bFlag ) void SwDoc::SetNodeNumStart( const SwPosition& rPos, sal_uInt16 nStt ) { - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if (!pTextNd) return; @@ -1199,7 +1199,7 @@ void SwDoc::ReplaceNumRule( const SwPosition& rPos, { SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr ); - const SwTextNode* pGivenTextNode = rPos.nNode.GetNode().GetTextNode(); + const SwTextNode* pGivenTextNode = rPos.GetNode().GetTextNode(); SwNumRuleItem aRule( rNewRule ); for ( SwTextNode* pTextNd : aTextNodeList ) { @@ -1503,7 +1503,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, bool bOverUpper, sal_uInt8* pUpper, sal_uInt8* pLower, SwRootFrame const*const pLayout) { - const SwTextNode* pNd = rPos.nNode.GetNode().GetTextNode(); + const SwTextNode* pNd = rPos.GetNode().GetTextNode(); if (pNd && pLayout) { pNd = sw::GetParaPropsNode(*pLayout, *pNd); @@ -1630,7 +1630,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos, const bool bInvestigateStartNode) { const SwNumRule * pResult = nullptr; - SwTextNode * pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * pTextNd = rPos.GetNode().GetTextNode(); if (pLayout) { pTextNd = sw::GetParaPropsNode(*pLayout, rPos.nNode); @@ -1840,7 +1840,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM { std::pair<SwTextNode *, SwTextNode *> nodes( sw::GetFirstAndLastNode(*pLayout, rPam.Start()->nNode)); - if (nodes.first && nodes.first != &rPam.Start()->nNode.GetNode()) + if (nodes.first && nodes.first != &rPam.Start()->GetNode()) { assert(nodes.second); if (nOffset < SwNodeOffset(0)) @@ -1860,7 +1860,7 @@ bool SwDoc::MoveParagraph(SwPaM& rPam, SwNodeOffset nOffset, bool const bIsOutlM rPam.Start()->nContent.Assign(nodes.first, 0); } nodes = sw::GetFirstAndLastNode(*pLayout, rPam.End()->nNode); - if (nodes.second && nodes.second != &rPam.End()->nNode.GetNode()) + if (nodes.second && nodes.second != &rPam.End()->GetNode()) { assert(nodes.first); if (SwNodeOffset(0) < nOffset) @@ -2036,12 +2036,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, // Test for Redlining - Can the Selection be moved at all, actually? if( !getIDocumentRedlineAccess().IsIgnoreRedline() ) { - SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Delete ); + SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->GetNode(), RedlineType::Delete ); if( SwRedlineTable::npos != nRedlPos ) { SwPosition aStPos( *pStt ), aEndPos( *pEnd ); aStPos.nContent = 0; - SwContentNode* pCNd = pEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = pEnd->GetNode().GetContentNode(); aEndPos.nContent = pCNd ? pCNd->Len() : 1; bool bCheckDel = true; @@ -2093,13 +2093,13 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, if( getIDocumentRedlineAccess().IsRedlineOn() ) { // If the range is completely in the own Redline, we can move it! - SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Insert ); + SwRedlineTable::size_type nRedlPos = getIDocumentRedlineAccess().GetRedlinePos( pStt->GetNode(), RedlineType::Insert ); if( SwRedlineTable::npos != nRedlPos ) { SwRangeRedline* pTmp = getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ]; auto [pRStt, pREnd] = pTmp->StartEnd(); // SwPosition* SwRangeRedline aTmpRedl( RedlineType::Insert, rPam ); - const SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode(); + const SwContentNode* pCEndNd = pEnd->GetNode().GetContentNode(); // Is completely in the range and is the own Redline too? if( aTmpRedl.IsOwnRedline( *pTmp ) && (pRStt->nNode < pStt->nNode || @@ -2145,7 +2145,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, rOrigPam.GetPoint()->nNode = aIdx.GetIndex() - 1; rOrigPam.GetPoint()->nContent.Assign( rOrigPam.GetContentNode(), 0 ); - bool bDelLastPara = !aInsPos.nNode.GetNode().IsContentNode(); + bool bDelLastPara = !aInsPos.GetNode().IsContentNode(); SwNodeOffset nOrigIdx = aIdx.GetIndex(); /* When copying to a non-content node Copy will @@ -2177,7 +2177,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, // adjust empty nodes later SwTextNode const*const pIsEmptyNode(nOffset < SwNodeOffset(0) - ? aInsPos.nNode.GetNode().GetTextNode() + ? aInsPos.GetNode().GetTextNode() : aIdx.GetNode().GetTextNode()); bool bIsEmptyNode = pIsEmptyNode && pIsEmptyNode->Len() == 0; @@ -2211,9 +2211,9 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, SwNodeOffset const nCurrentOffset( nOrigIdx - aPam.Start()->nNode.GetIndex()); pam.GetPoint()->nNode += nCurrentOffset; - pam.GetPoint()->nContent.Assign(pam.GetPoint()->nNode.GetNode().GetContentNode(), pam.GetPoint()->nContent.GetIndex()); + pam.GetPoint()->nContent.Assign(pam.GetPoint()->GetNode().GetContentNode(), pam.GetPoint()->nContent.GetIndex()); pam.GetMark()->nNode += nCurrentOffset; - pam.GetMark()->nContent.Assign(pam.GetMark()->nNode.GetNode().GetContentNode(), pam.GetMark()->nContent.GetIndex()); + pam.GetMark()->nContent.Assign(pam.GetMark()->GetNode().GetContentNode(), pam.GetMark()->nContent.GetIndex()); pNewRedline = new SwRangeRedline( RedlineType::Delete, pam ); } @@ -2238,13 +2238,13 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, if( pPos->nNode == aIdx ) { ++pPos->nNode; - pPos->nContent.Assign( pPos->nNode.GetNode().GetContentNode(),0); + pPos->nContent.Assign( pPos->GetNode().GetContentNode(),0); } pPos = &pTmp->GetBound(false); if( pPos->nNode == aIdx ) { ++pPos->nNode; - pPos->nContent.Assign( pPos->nNode.GetNode().GetContentNode(),0); + pPos->nContent.Assign( pPos->GetNode().GetContentNode(),0); } } CorrRel( aIdx, aInsPos ); @@ -2256,11 +2256,11 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, ++rOrigPam.GetPoint()->nNode; rOrigPam.GetPoint()->nContent.Assign( rOrigPam.GetContentNode(), 0 ); assert(*aPam.GetMark() < *aPam.GetPoint()); - if (aPam.GetPoint()->nNode.GetNode().IsEndNode()) + if (aPam.GetPoint()->GetNode().IsEndNode()) { // ensure redline ends on content node --aPam.GetPoint()->nNode; - assert(aPam.GetPoint()->nNode.GetNode().IsTextNode()); - SwTextNode *const pNode(aPam.GetPoint()->nNode.GetNode().GetTextNode()); + assert(aPam.GetPoint()->GetNode().IsTextNode()); + SwTextNode *const pNode(aPam.GetPoint()->GetNode().GetTextNode()); aPam.GetPoint()->nContent.Assign(pNode, pNode->Len()); } @@ -2287,8 +2287,8 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, getIDocumentRedlineAccess().AppendRedline( pNewRedline, true ); - aPam.GetBound().nContent.Assign(aPam.GetBound().nNode.GetNode().GetContentNode(), 0); - aPam.GetBound(false).nContent.Assign(aPam.GetBound(false).nNode.GetNode().GetContentNode(), 0); + aPam.GetBound().nContent.Assign(aPam.GetBound().GetNode().GetContentNode(), 0); + aPam.GetBound(false).nContent.Assign(aPam.GetBound(false).GetNode().GetContentNode(), 0); sw::UpdateFramesForAddDeleteRedline(*this, aPam); // avoid setting empty nodes to tracked insertion @@ -2296,7 +2296,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, { SwRedlineTable& rTable = getIDocumentRedlineAccess().GetRedlineTable(); SwRedlineTable::size_type nRedlPosWithEmpty = - getIDocumentRedlineAccess().GetRedlinePos( pStt->nNode.GetNode(), RedlineType::Insert ); + getIDocumentRedlineAccess().GetRedlinePos( pStt->GetNode(), RedlineType::Insert ); if ( SwRedlineTable::npos != nRedlPosWithEmpty ) { pOwnRedl = rTable[nRedlPosWithEmpty]; @@ -2389,12 +2389,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, if( pRStt->nNode.GetIndex() != nRedlSttNd ) { pRStt->nNode = nRedlSttNd; - pRStt->nContent.Assign( pRStt->nNode.GetNode().GetContentNode(),0); + pRStt->nContent.Assign( pRStt->GetNode().GetContentNode(),0); } if( pREnd->nNode.GetIndex() != nRedlEndNd ) { pREnd->nNode = nRedlEndNd; - SwContentNode* pCNd = pREnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = pREnd->GetNode().GetContentNode(); pREnd->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); } } @@ -2445,7 +2445,7 @@ SwNumRule* SwDoc::GetNumRuleAtPos(SwPosition& rPos, SwRootFrame const*const pLayout) { SwNumRule* pRet = nullptr; - SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = rPos.GetNode().GetTextNode(); if ( pTNd != nullptr ) { diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 4844b464d9d4..bbf5d1b40928 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -109,8 +109,8 @@ void SwExtraRedlineTable::dumpAsXml(xmlTextWriterPtr pWriter) const static bool CheckPosition( const SwPosition* pStt, const SwPosition* pEnd ) { int nError = 0; - SwNode* pSttNode = &pStt->nNode.GetNode(); - SwNode* pEndNode = &pEnd->nNode.GetNode(); + SwNode* pSttNode = &pStt->GetNode(); + SwNode* pEndNode = &pEnd->GetNode(); SwNode* pSttTab = pSttNode->StartOfSectionNode()->FindTableNode(); SwNode* pEndTab = pEndNode->StartOfSectionNode()->FindTableNode(); SwNode* pSttStart = pSttNode; @@ -305,22 +305,22 @@ void lcl_LOKInvalidateFrames(const sw::BroadcastingModify& rMod, const SwRootFra void lcl_LOKInvalidateStartEndFrames(SwShellCursor& rCursor) { if (!(rCursor.HasMark() && - rCursor.GetPoint()->nNode.GetNode().IsContentNode() && - rCursor.GetPoint()->nNode.GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()) && + rCursor.GetPoint()->GetNode().IsContentNode() && + rCursor.GetPoint()->GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()) && (rCursor.GetMark()->nNode == rCursor.GetPoint()->nNode || - (rCursor.GetMark()->nNode.GetNode().IsContentNode() && - rCursor.GetMark()->nNode.GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()))))) + (rCursor.GetMark()->GetNode().IsContentNode() && + rCursor.GetMark()->GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()))))) { return; } auto [pStartPos, pEndPos] = rCursor.StartEnd(); // SwPosition* - lcl_LOKInvalidateFrames(*(pStartPos->nNode.GetNode().GetContentNode()), + lcl_LOKInvalidateFrames(*(pStartPos->GetNode().GetContentNode()), rCursor.GetShell()->GetLayout(), FRM_CNTNT, &rCursor.GetSttPos()); - lcl_LOKInvalidateFrames(*(pEndPos->nNode.GetNode().GetContentNode()), + lcl_LOKInvalidateFrames(*(pEndPos->GetNode().GetContentNode()), rCursor.GetShell()->GetLayout(), FRM_CNTNT, &rCursor.GetEndPos()); } @@ -486,7 +486,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p SwNodes& rNds = aNewStt.GetNodes(); SwContentNode* pC; - if( !aNewStt.nNode.GetNode().IsContentNode() ) + if( !aNewStt.GetNode().IsContentNode() ) { pC = rNds.GoNext( &aNewStt.nNode ); if( pC ) @@ -512,9 +512,9 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p // i60396: If the redlines starts before a table but the table is the last member // of the section, the GoEndSection will end inside the table. // This will result in an incorrect redline, so we've to go back - SwNode* pTab = pNew->GetPoint()->nNode.GetNode().StartOfSectionNode()->FindTableNode(); + SwNode* pTab = pNew->GetPoint()->GetNode().StartOfSectionNode()->FindTableNode(); // We end in a table when pTab != 0 - if( pTab && !pNew->GetMark()->nNode.GetNode().StartOfSectionNode()->FindTableNode() ) + if( pTab && !pNew->GetMark()->GetNode().StartOfSectionNode()->FindTableNode() ) { // but our Mark was outside the table => Correction do { @@ -523,7 +523,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p pC = GoPreviousNds( &pNew->GetPoint()->nNode, false ); // here we are. if( pC ) pNew->GetPoint()->nContent.Assign( pC, 0 ); - pTab = pNew->GetPoint()->nNode.GetNode().StartOfSectionNode()->FindTableNode(); + pTab = pNew->GetPoint()->GetNode().StartOfSectionNode()->FindTableNode(); } while( pTab ); // If there is another table we have to repeat our step backwards } @@ -532,7 +532,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p pC = nullptr; if( aNewStt.nNode != pEnd->nNode ) do { - SwNode& rCurNd = aNewStt.nNode.GetNode(); + SwNode& rCurNd = aNewStt.GetNode(); if( rCurNd.IsStartNode() ) { if( rCurNd.EndOfSectionIndex() < pEnd->nNode.GetIndex() ) @@ -913,13 +913,13 @@ void SwRedlineExtraData_FormatColl::Reject( SwPaM& rPam ) const if (aPam.GetPoint()->nNode > aPam.GetMark()->nNode) { aPam.GetPoint()->nNode--; - SwContentNode* pNode = aPam.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode* pNode = aPam.GetPoint()->GetNode().GetContentNode(); aPam.GetPoint()->nContent.Assign( pNode, pNode->Len() ); } else if (aPam.GetPoint()->nNode < aPam.GetMark()->nNode) { aPam.GetMark()->nNode--; - SwContentNode* pNode = aPam.GetMark()->nNode.GetNode().GetContentNode(); + SwContentNode* pNode = aPam.GetMark()->GetNode().GetContentNode(); aPam.GetMark()->nContent.Assign( pNode, pNode->Len() ); } } @@ -1223,8 +1223,8 @@ void SwRangeRedline::SetEnd( const SwPosition& rPos, SwPosition* pEndPtr ) /// Do we have a valid Selection? bool SwRangeRedline::HasValidRange() const { - const SwNode* pPtNd = &GetPoint()->nNode.GetNode(), - * pMkNd = &GetMark()->nNode.GetNode(); + const SwNode* pPtNd = &GetPoint()->GetNode(), + * pMkNd = &GetMark()->GetNode(); if( pPtNd->StartOfSectionNode() == pMkNd->StartOfSectionNode() && !pPtNd->StartOfSectionNode()->IsTableNode() && // invalid if points on the end of content @@ -1506,8 +1506,8 @@ void SwRangeRedline::MoveToSection() SwDoc& rDoc = GetDoc(); SwPaM aPam( *pStt, *pEnd ); - SwContentNode* pCSttNd = pStt->nNode.GetNode().GetContentNode(); - SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCSttNd = pStt->GetNode().GetContentNode(); + SwContentNode* pCEndNd = pEnd->GetNode().GetContentNode(); if( !pCSttNd ) { @@ -1578,8 +1578,8 @@ void SwRangeRedline::CopyToSection() auto [pStt, pEnd] = StartEnd(); // SwPosition* - SwContentNode* pCSttNd = pStt->nNode.GetNode().GetContentNode(); - SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCSttNd = pStt->GetNode().GetContentNode(); + SwContentNode* pCEndNd = pEnd->GetNode().GetContentNode(); SwStartNode* pSttNd; SwDoc& rDoc = GetDoc(); @@ -1614,7 +1614,7 @@ void SwRangeRedline::CopyToSection() // We don't want this in Doc::Copy if( pCEndNd && pCEndNd != pCSttNd ) { - SwContentNode* pDestNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pDestNd = aPos.GetNode().GetContentNode(); if( pDestNd ) { if( pDestNd->IsTextNode() && pCEndNd->IsTextNode() ) @@ -1655,8 +1655,8 @@ void SwRangeRedline::DelCopyOfSection(size_t nMyPos) SwDoc& rDoc = GetDoc(); SwPaM aPam( *pStt, *pEnd ); - SwContentNode* pCSttNd = pStt->nNode.GetNode().GetContentNode(); - SwContentNode* pCEndNd = pEnd->nNode.GetNode().GetContentNode(); + SwContentNode* pCSttNd = pStt->GetNode().GetContentNode(); + SwContentNode* pCEndNd = pEnd->GetNode().GetContentNode(); if( !pCSttNd ) { @@ -1809,7 +1809,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) SetMark(); *GetPoint() = aPos; GetMark()->nNode = aNdIdx.GetIndex() + 1; - pCNd = GetMark()->nNode.GetNode().GetContentNode(); + pCNd = GetMark()->GetNode().GetContentNode(); GetMark()->nContent.Assign( pCNd, nPos ); if( m_bDelLastPara ) diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 2e5e084faeea..801f4b92653b 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -176,7 +176,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry ) { // Point must be the startposition, Mark is optional the end position SwPosition* pPos = rPam.GetPoint(); - const SwTextNode* pTNd = pPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pPos->GetNode().GetTextNode(); OUString const& rText = pTNd->GetText(); sal_Int32 nStart = pPos->nContent.GetIndex(); sal_Int32 nEnd = rText.getLength(); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index bb4b9ef3aeea..2cc1ccb4dbfc 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -339,7 +339,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) // range is new from pEnd->nNode+1 to aEndIdx getIDocumentRedlineAccess().DeleteRedline( *pRedlPam, true, RedlineType::Any ); - pRedlPam->GetMark()->nNode.Assign( pEnd->nNode.GetNode(), 1 ); + pRedlPam->GetMark()->nNode.Assign( pEnd->GetNode(), 1 ); pCNd = pRedlPam->GetContentNode( false ); pRedlPam->GetMark()->nContent.Assign( pCNd, 0 ); @@ -446,7 +446,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) SwNodeIndex aInsEndIdx( pRedlPam->GetMark()->nNode, -1 ); pRedlPam->GetMark()->nNode = aInsEndIdx; SwContentNode *const pPrevNode = - pRedlPam->GetMark()->nNode.GetNode().GetContentNode(); + pRedlPam->GetMark()->GetNode().GetContentNode(); pRedlPam->GetMark()->nContent.Assign( pPrevNode, pPrevNode->Len() ); pRedlUndo->SetValues( *pRedlPam ); diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 96107a634571..c65b060e3fa7 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -118,7 +118,7 @@ sal_uInt16 SwDoc::GetCurTOXMark( const SwPosition& rPos, SwTOXMarks& rArr ) { // search on Position rPos for all SwTOXMarks - SwTextNode *const pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *const pTextNd = rPos.GetNode().GetTextNode(); if( !pTextNd || !pTextNd->GetpSwpHints() ) return 0; @@ -447,7 +447,7 @@ void SwDoc::InsertTableOf( SwNodeOffset nSttNd, SwNodeOffset nEndNd, /// Get current table of contents SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) { - SwNode& rNd = rPos.nNode.GetNode(); + SwNode& rNd = rPos.GetNode(); SwSectionNode* pSectNd = rNd.FindSectionNode(); while( pSectNd ) { diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx index 1cff3b1dc9aa..c81da3929276 100644 --- a/sw/source/core/doc/extinput.cxx +++ b/sw/source/core/doc/extinput.cxx @@ -49,7 +49,7 @@ SwExtTextInput::~SwExtTextInput() SwDoc& rDoc = GetDoc(); if (rDoc.IsInDtor()) { return; /* #i58606# */ } - SwTextNode* pTNd = GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = GetPoint()->GetNode().GetTextNode(); if( !pTNd ) return; @@ -149,7 +149,7 @@ SwExtTextInput::~SwExtTextInput() void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData ) { - SwTextNode* pTNd = GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTNd = GetPoint()->GetNode().GetTextNode(); if( !pTNd ) return; @@ -223,7 +223,7 @@ void SwExtTextInput::SetOverwriteCursor( bool bFlag ) if (!m_bIsOverwriteCursor) return; - const SwTextNode *const pTNd = GetPoint()->nNode.GetNode().GetTextNode(); + const SwTextNode *const pTNd = GetPoint()->GetNode().GetTextNode(); if (!pTNd) return; diff --git a/sw/source/core/doc/list.cxx b/sw/source/core/doc/list.cxx index f75edba55bb5..1a6c4504631c 100644 --- a/sw/source/core/doc/list.cxx +++ b/sw/source/core/doc/list.cxx @@ -79,12 +79,12 @@ void SwList::InsertListItem(SwNodeNum& rNodeNum, SwListRedlineType const eRedlin const int nLevel, const SwDoc& rDoc) { const SwPosition aPosOfNodeNum( rNodeNum.GetPosition() ); - const SwNodes* pNodesOfNodeNum = &(aPosOfNodeNum.nNode.GetNode().GetNodes()); + const SwNodes* pNodesOfNodeNum = &(aPosOfNodeNum.GetNode().GetNodes()); for ( const auto& rNumberTree : maListTrees ) { auto [pStart, pEnd] = rNumberTree.pSection->StartEnd(); // SwPosition* - const SwNodes* pRangeNodes = &(pStart->nNode.GetNode().GetNodes()); + const SwNodes* pRangeNodes = &(pStart->GetNode().GetNodes()); if ( pRangeNodes == pNodesOfNodeNum && *pStart <= aPosOfNodeNum && aPosOfNodeNum <= *pEnd) diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index 18be4450d41d..ceb1439d184f 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -666,7 +666,7 @@ void SwNoTextFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBord bool SwNoTextFrame::GetCharRect( SwRect &rRect, const SwPosition& rPos, SwCursorMoveState *pCMS, bool /*bAllowFarAway*/ ) const { - if ( &rPos.nNode.GetNode() != static_cast<SwNode const *>(GetNode()) ) + if ( &rPos.GetNode() != static_cast<SwNode const *>(GetNode()) ) return false; Calc(getRootFrame()->GetCurrShell()->GetOut()); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index ec8a8ec21fc8..e6875e982942 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -1017,9 +1017,9 @@ void SwTextBoxHelper::syncFlyFrameAttr(SwFrameFormat& rShape, SfxItemSet const& return; const bool bInlineAnchored = rShape.GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR; - const bool bLayoutInCell - = rShape.GetFollowTextFlow().GetValue() && rShape.GetAnchor().GetContentAnchor() - && rShape.GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode(); + const bool bLayoutInCell = rShape.GetFollowTextFlow().GetValue() + && rShape.GetAnchor().GetContentAnchor() + && rShape.GetAnchor().GetContentAnchor()->GetNode().FindTableNode(); SfxItemSet aTextBoxSet(pFormat->GetDoc()->GetAttrPool(), aFrameFormatSetRange); SfxItemIter aIter(rSet); @@ -1439,14 +1439,14 @@ bool SwTextBoxHelper::doTextBoxPositioning(SwFrameFormat* pShape, SdrObject* pOb // Other special case: shape is inside a table or floating table following the text flow if (pShape->GetFollowTextFlow().GetValue() && pShape->GetAnchor().GetContentAnchor() - && pShape->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode()) + && pShape->GetAnchor().GetContentAnchor()->GetNode().FindTableNode()) { // Table position Point nTableOffset; // Floating table if (auto pFly = pShape->GetAnchor() .GetContentAnchor() - ->nNode.GetNode() + ->GetNode() .FindTableNode() ->FindFlyStartNode()) { @@ -1460,7 +1460,7 @@ bool SwTextBoxHelper::doTextBoxPositioning(SwFrameFormat* pShape, SdrObject* pOb // Normal table { auto pTableNode - = pShape->GetAnchor().GetContentAnchor()->nNode.GetNode().FindTableNode(); + = pShape->GetAnchor().GetContentAnchor()->GetNode().FindTableNode(); if (auto pTableFormat = pTableNode->GetTable().GetFrameFormat()) { nTableOffset.setX(pTableFormat->GetHoriOrient().GetPos()); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 27bcafec82fd..878674393427 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -176,13 +176,13 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, { auto [pStt, pEnd] = rRange.StartEnd(); // SwPosition* if( !pStt->nContent.GetIndex() && - pEnd->nNode.GetNode().GetContentNode()->Len() == + pEnd->GetNode().GetContentNode()->Len() == pEnd->nContent.GetIndex() ) { ::lcl_CheckEmptyLayFrame( GetNodes(), rNewData, - pStt->nNode.GetNode(), - pEnd->nNode.GetNode() ); + pStt->GetNode(), + pEnd->GetNode() ); } } @@ -232,7 +232,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, pSttPos->nContent.GetIndex() ) { SwTextNode* const pTNd = - pSttPos->nNode.GetNode().GetTextNode(); + pSttPos->GetNode().GetTextNode(); if (pTNd) { pUndoInsSect->SaveSplitNode( pTNd, true ); @@ -242,7 +242,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, if ( !( pPrvNd && 2 == nRegionRet ) ) { SwTextNode *const pTNd = - pEndPos->nNode.GetNode().GetTextNode(); + pEndPos->GetNode().GetTextNode(); if (pTNd && (pTNd->GetText().getLength() != pEndPos->nContent.GetIndex())) { @@ -254,7 +254,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, if( pPrvNd && 1 == nRegionRet ) { pSttPos->nNode.Assign( *pPrvNd ); - pSttPos->nContent.Assign( pSttPos->nNode.GetNode().GetContentNode(), 0 ); + pSttPos->nContent.Assign( pSttPos->GetNode().GetContentNode(), 0 ); } else if( pSttPos->nContent.GetIndex() ) { @@ -264,11 +264,11 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, if( pPrvNd && 2 == nRegionRet ) { pEndPos->nNode.Assign( *pPrvNd ); - pEndPos->nContent.Assign( pEndPos->nNode.GetNode().GetContentNode(), 0 ); + pEndPos->nContent.Assign( pEndPos->GetNode().GetContentNode(), 0 ); } else { - const SwContentNode* pCNd = pEndPos->nNode.GetNode().GetContentNode(); + const SwContentNode* pCNd = pEndPos->GetNode().GetContentNode(); if( pCNd && pCNd->Len() != pEndPos->nContent.GetIndex() ) { sal_Int32 nContent = pSttPos->nContent.GetIndex(); @@ -279,14 +279,14 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, { --pSttPos->nNode; --pEndPos->nNode; - pTNd = pSttPos->nNode.GetNode().GetTextNode(); + pTNd = pSttPos->GetNode().GetTextNode(); pSttPos->nContent.Assign( pTNd, nContent ); } else { // Set to the end of the previous --pEndPos->nNode; - pTNd = pEndPos->nNode.GetNode().GetTextNode(); + pTNd = pEndPos->GetNode().GetTextNode(); } nContent = pTNd ? pTNd->GetText().getLength() : 0; pEndPos->nContent.Assign( pTNd, nContent ); @@ -299,7 +299,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, else { const SwPosition* pPos = rRange.GetPoint(); - const SwContentNode* pCNd = pPos->nNode.GetNode().GetContentNode(); + const SwContentNode* pCNd = pPos->GetNode().GetContentNode(); if( !pPos->nContent.GetIndex() ) { pNewSectNode = GetNodes().InsertTextSection( @@ -398,8 +398,8 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, // See if we have a valid Section auto [pStt, pEnd] = rRange.StartEnd(); // SwPosition* - const SwContentNode* pCNd = pEnd->nNode.GetNode().GetContentNode(); - const SwNode* pNd = &pStt->nNode.GetNode(); + const SwContentNode* pCNd = pEnd->GetNode().GetContentNode(); + const SwNode* pNd = &pStt->GetNode(); const SwSectionNode* pSectNd = pNd->FindSectionNode(); const SwSectionNode* pEndSectNd = pCNd ? pCNd->FindSectionNode() : nullptr; if( pSectNd && pEndSectNd && pSectNd != pEndSectNd ) @@ -503,7 +503,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, SwSection* SwDoc::GetCurrSection( const SwPosition& rPos ) { - const SwSectionNode* pSectNd = rPos.nNode.GetNode().FindSectionNode(); + const SwSectionNode* pSectNd = rPos.GetNode().FindSectionNode(); if( pSectNd ) return const_cast<SwSection*>(&pSectNd->GetSection()); return nullptr; diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 569be7bfcfaf..10908ffb08d5 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -388,7 +388,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTableOpts, 0; /* Save content node to extract FRAMEDIR from. */ - const SwContentNode * pContentNd = rPos.nNode.GetNode().GetContentNode(); + const SwContentNode * pContentNd = rPos.GetNode().GetContentNode(); /* If we are called from a shell pass the attrset from pContentNd (aka the node the table is inserted at) thus causing @@ -641,7 +641,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, } // Save first node in the selection if it is a context node - SwContentNode * pSttContentNd = pStt->nNode.GetNode().GetContentNode(); + SwContentNode * pSttContentNd = pStt->GetNode().GetContentNode(); SwPaM aOriginal( *pStt, *pEnd ); pStt = aOriginal.GetMark(); @@ -671,13 +671,13 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTableOpts, // Do not split at the End of a Line (except at the End of the Doc) if( bEndContent ) { - if( pEnd->nNode.GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex() + if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex() || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 ) { getIDocumentContentOperations().SplitNode( *pEnd, false ); --const_cast<SwNodeIndex&>(pEnd->nNode); const_cast<SwContentIndex&>(pEnd->nContent).Assign( - pEnd->nNode.GetNode().GetContentNode(), 0 ); + pEnd->GetNode().GetContentNode(), 0 ); // A Node and at the End? if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() ) --aRg.aStart; @@ -1173,13 +1173,13 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> > // Do not split at the End of a Line (except at the End of the Doc) if( bEndContent ) { - if( pEnd->nNode.GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex() + if( pEnd->GetNode().GetContentNode()->Len() != pEnd->nContent.GetIndex() || pEnd->nNode.GetIndex() >= GetNodes().GetEndOfContent().GetIndex()-1 ) { getIDocumentContentOperations().SplitNode( *pEnd, false ); --const_cast<SwNodeIndex&>(pEnd->nNode); const_cast<SwContentIndex&>(pEnd->nContent).Assign( - pEnd->nNode.GetNode().GetContentNode(), 0 ); + pEnd->GetNode().GetContentNode(), 0 ); // A Node and at the End? if( pStt->nNode.GetIndex() >= pEnd->nNode.GetIndex() ) --aRg.aStart; @@ -3119,7 +3119,7 @@ void sw_BoxSetSplitBoxFormats( SwTableBox* pBox, SwCollectTableLineBoxes* pSplPa void SwDoc::SplitTable( const SwPosition& rPos, SplitTable_HeadlineOption eHdlnMode, bool bCalcNewSize ) { - SwNode* pNd = &rPos.nNode.GetNode(); + SwNode* pNd = &rPos.GetNode(); SwTableNode* pTNd = pNd->FindTableNode(); if( !pTNd || pNd->IsTableNode() ) return; @@ -3480,7 +3480,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, bool bAfter, */ bool SwDoc::MergeTable( const SwPosition& rPos, bool bWithPrev, sal_uInt16 nMode ) { - SwTableNode* pTableNd = rPos.nNode.GetNode().FindTableNode(), *pDelTableNd; + SwTableNode* pTableNd = rPos.GetNode().FindTableNode(), *pDelTableNd; if( !pTableNd ) return false; @@ -4310,7 +4310,7 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes, ? pCpyTable->GetTableNode() : rBoxes[ 0 ]->GetSttNd()->FindTableNode(); - SwTableNode * pInsTableNd = rInsPos.nNode.GetNode().FindTableNode(); + SwTableNode * pInsTableNd = rInsPos.GetNode().FindTableNode(); bool const bUndo( GetIDocumentUndoRedo().DoesUndo() ); if( !pCpyTable && !pInsTableNd ) @@ -4372,10 +4372,10 @@ bool SwDoc::InsCopyOfTable( SwPosition& rInsPos, const SwSelBoxes& rBoxes, return false; } aPos.nNode -= SwNodeOffset(1); // Set to the Table's EndNode - pSrcTableNd = aPos.nNode.GetNode().FindTableNode(); + pSrcTableNd = aPos.GetNode().FindTableNode(); } - const SwStartNode* pSttNd = rInsPos.nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pSttNd = rInsPos.GetNode().FindTableBoxStartNode(); rInsPos.nContent.Assign( nullptr, 0 ); @@ -4558,7 +4558,7 @@ bool SwDoc::HasTableAnyProtection( const SwPosition* pPos, pTable = SwTable::FindTable( FindTableFormatByName( *pTableName ) ); else if( pPos ) { - SwTableNode* pTableNd = pPos->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = pPos->GetNode().FindTableNode(); if( pTableNd ) pTable = &pTableNd->GetTable(); } diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index ee030b5f1d4c..e56232b41095 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -322,7 +322,7 @@ static void lcl_ProcessBoxSize(std::vector<std::unique_ptr<SwTableFormatCmp>>& r void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return; @@ -348,7 +348,7 @@ void SwDoc::SetRowSplit( const SwCursor& rCursor, const SwFormatRowSplit &rNew ) std::unique_ptr<SwFormatRowSplit> SwDoc::GetRowSplit( const SwCursor& rCursor ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return nullptr; @@ -387,7 +387,7 @@ std::unique_ptr<SwFormatRowSplit> SwDoc::GetRowSplit( const SwCursor& rCursor ) void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return; @@ -412,7 +412,7 @@ void SwDoc::SetRowHeight( const SwCursor& rCursor, const SwFormatFrameSize &rNew std::unique_ptr<SwFormatFrameSize> SwDoc::GetRowHeight( const SwCursor& rCursor ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return nullptr; @@ -435,7 +435,7 @@ std::unique_ptr<SwFormatFrameSize> SwDoc::GetRowHeight( const SwCursor& rCursor bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool bOptimize ) { bool bRet = false; - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( pTableNd ) { std::vector<SwTableLine*> aRowArr; // For Lines collecting @@ -487,7 +487,7 @@ bool SwDoc::BalanceRowHeight( const SwCursor& rCursor, bool bTstOnly, const bool void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return; @@ -514,7 +514,7 @@ void SwDoc::SetRowBackground( const SwCursor& rCursor, const SvxBrushItem &rNew bool SwDoc::GetRowBackground( const SwCursor& rCursor, std::unique_ptr<SvxBrushItem>& rToFill ) { bool bRet = false; - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( pTableNd ) { std::vector<SwTableLine*> aRowArr; // For Lines collecting @@ -542,7 +542,7 @@ bool SwDoc::GetRowBackground( const SwCursor& rCursor, std::unique_ptr<SvxBrushI bool SwDoc::HasRowNotTracked( const SwCursor& rCursor ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return false; @@ -564,7 +564,7 @@ bool SwDoc::HasRowNotTracked( const SwCursor& rCursor ) void SwDoc::SetRowNotTracked( const SwCursor& rCursor, const SvxPrintItem &rNew, bool bAll ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); if( !pTableNd ) return; @@ -646,7 +646,7 @@ static void lcl_CollectCells( std::vector<SwCellFrame*> &rArr, const SwRect &rUn void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) { - SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode* pCntNd = rCursor.GetPoint()->GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; @@ -932,7 +932,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, const Color* pColor, bool bSetLine, const SvxBorderLine* pBorderLine ) { - SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode* pCntNd = rCursor.GetPoint()->GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; @@ -1021,7 +1021,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) { - SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode* pCntNd = rCursor.GetPoint()->GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; @@ -1242,7 +1242,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) { - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); SwSelBoxes aBoxes; if( !(pTableNd && ::lcl_GetBoxSel( rCursor, aBoxes, true )) ) return; @@ -1290,7 +1290,7 @@ bool SwDoc::GetBoxAttr( const SwCursor& rCursor, std::unique_ptr<SfxPoolItem>& r // tdf#144843 calling GetBoxAttr *requires* object assert(rToFill && "requires object here"); bool bRet = false; - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); SwSelBoxes aBoxes; if( pTableNd && lcl_GetBoxSel( rCursor, aBoxes )) { @@ -1362,7 +1362,7 @@ void SwDoc::SetBoxAlign( const SwCursor& rCursor, sal_uInt16 nAlign ) sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) { sal_uInt16 nAlign = USHRT_MAX; - SwTableNode* pTableNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPoint()->GetNode().FindTableNode(); SwSelBoxes aBoxes; if( pTableNd && ::lcl_GetBoxSel( rCursor, aBoxes )) { @@ -1575,7 +1575,7 @@ void SwDoc::AdjustCellWidth( const SwCursor& rCursor, const bool bNoShrink ) { // Check whether the current Cursor has it's Point/Mark in a Table - SwContentNode* pCntNd = rCursor.GetPoint()->nNode.GetNode().GetContentNode(); + SwContentNode* pCntNd = rCursor.GetPoint()->GetNode().GetContentNode(); SwTableNode* pTableNd = pCntNd ? pCntNd->FindTableNode() : nullptr; if( !pTableNd ) return ; diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index a47df255be00..05007410add3 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -466,7 +466,7 @@ bool SwNode::IsProtect() const const SwPosition* pAnchorPos = rAnchor.GetContentAnchor(); if (!pAnchorPos) return false; - const SwNode& rAnchorNd = pAnchorPos->nNode.GetNode(); + const SwNode& rAnchorNd = pAnchorPos->GetNode(); return &rAnchorNd != this && rAnchorNd.IsProtect(); } @@ -558,7 +558,7 @@ const SwPageDesc* SwNode::FindPageDesc( SwNodeOffset* pPgDescNdIdx ) const if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor() ) { - pNd = &pAnchor->GetContentAnchor()->nNode.GetNode(); + pNd = &pAnchor->GetContentAnchor()->GetNode(); const SwNode* pFlyNd = pNd->FindFlyStartNode(); while( pFlyNd ) { @@ -2138,7 +2138,7 @@ bool SwNode::IsInRedlines() const void SwNode::AddAnchoredFly(SwFrameFormat *const pFlyFormat) { assert(pFlyFormat); - assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->nNode.GetNode() == this); + assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->GetNode() == this); // check node type, cf. SwFormatAnchor::SetAnchor() assert(IsTextNode() || IsStartNode() || IsTableNode()); m_aAnchoredFlys.push_back(pFlyFormat); @@ -2148,7 +2148,7 @@ void SwNode::RemoveAnchoredFly(SwFrameFormat *const pFlyFormat) { assert(pFlyFormat); // cannot assert this in Remove because it is called when new anchor is already set -// assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->nNode.GetNode() == this); +// assert(&pFlyFormat->GetAnchor(false).GetContentAnchor()->GetNode() == this); assert(IsTextNode() || IsStartNode() || IsTableNode()); auto it(std::find(m_aAnchoredFlys.begin(), m_aAnchoredFlys.end(), pFlyFormat)); assert(it != m_aAnchoredFlys.end()); diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 1c5d7f279893..1a5f2499fa97 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1445,7 +1445,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) SwNodeIndex aEndIdx( pEnd->nNode ); SwNodeIndex aSttIdx( pStt->nNode ); SwTextNode *const pSrcNd = aSttIdx.GetNode().GetTextNode(); - SwTextNode * pDestNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * pDestNd = rPos.GetNode().GetTextNode(); bool bSplitDestNd = true; bool bCopyCollFormat = pDestNd && pDestNd->GetText().isEmpty(); @@ -1461,7 +1461,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) bCopyCollFormat = true; } bSplitDestNd = pDestNd->Len() > rPos.nContent.GetIndex() || - pEnd->nNode.GetNode().IsTextNode(); + pEnd->GetNode().IsTextNode(); // move the content into the new node bool bOneNd = pStt->nNode == pEnd->nNode; @@ -1469,7 +1469,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) ( bOneNd ? std::min(pEnd->nContent.GetIndex(), pSrcNd->Len()) : pSrcNd->Len() ) - pStt->nContent.GetIndex(); - if( !pEnd->nNode.GetNode().IsContentNode() ) + if( !pEnd->GetNode().IsContentNode() ) { bOneNd = true; SwNodeOffset nSttNdIdx = pStt->nNode.GetIndex() + 1; @@ -1594,7 +1594,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) } else { - pDestNd = rPos.nNode.GetNode().GetTextNode(); + pDestNd = rPos.GetNode().GetTextNode(); } if (pDestNd && pEnd->nContent.GetIndex()) @@ -1621,7 +1621,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) if( !bSplitDestNd ) { ++rPos.nNode; - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), 0 ); + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), 0 ); } } @@ -1641,12 +1641,12 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) // if the StartNode was moved to whom the cursor pointed, so // the content must be registered in the current content! - if ( &pStt->nNode.GetNode() == &GetEndOfContent() ) + if ( &pStt->GetNode() == &GetEndOfContent() ) { const bool bSuccess = GoPrevious( &pStt->nNode ); OSL_ENSURE( bSuccess, "Move() - no ContentNode here" ); } - pStt->nContent.Assign( pStt->nNode.GetNode().GetContentNode(), + pStt->nContent.Assign( pStt->GetNode().GetContentNode(), pStt->nContent.GetIndex() ); // Correct the PaM, because it might have happened that the move // went over the node borders (so the data might be in different nodes). diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 5a5967c879ab..ebb48e9a51a7 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -194,7 +194,7 @@ static bool SetGrfFlySize( const Size& rGrfSz, SwGrfNode* pGrfNd, const Size& rO const SwDoc& rDoc = pGrfNd->GetDoc(); const SwPosition* pAPos = pFormat->GetAnchor().GetContentAnchor(); SwTableNode *pTableNd; - if (pAPos && nullptr != (pTableNd = pAPos->nNode.GetNode().FindTableNode())) + if (pAPos && nullptr != (pTableNd = pAPos->GetNode().FindTableNode())) { const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = @@ -290,7 +290,7 @@ const SwNode* SwBaseLink::GetAnchor() const (RndStdIds::FLY_AT_FLY == rAnchor.GetAnchorId()) || (RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId()))) { - return &pAPos->nNode.GetNode(); + return &pAPos->GetNode(); } return nullptr; } diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index dba55c4e1974..84de9b73f94b 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1894,7 +1894,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) } else { - pModify = pAnch->GetContentAnchor()->nNode.GetNode().GetContentNode(); + pModify = pAnch->GetContentAnchor()->GetNode().GetContentNode(); } } diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 9c3ee63ff863..ea443b1bd1a2 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -598,7 +598,7 @@ LanguageType SwAutoCorrDoc::GetLanguage( sal_Int32 nPos ) const { LanguageType eRet = LANGUAGE_SYSTEM; - SwTextNode* pNd = m_rCursor.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pNd = m_rCursor.GetPoint()->GetNode().GetTextNode(); if( pNd ) { @@ -643,7 +643,7 @@ SwDontExpandItem::~SwDontExpandItem() void SwDontExpandItem::SaveDontExpandItems( const SwPosition& rPos ) { - const SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if( pTextNd ) { m_pDontExpandItems.reset( new SfxItemSet( const_cast<SwDoc&>(pTextNd->GetDoc()).GetAttrPool(), @@ -659,7 +659,7 @@ void SwDontExpandItem::SaveDontExpandItems( const SwPosition& rPos ) void SwDontExpandItem::RestoreDontExpandItems( const SwPosition& rPos ) { - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if( !pTextNd ) return; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index a1b1bc887192..fa91cbbf7f5a 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1000,7 +1000,7 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) { m_aDelPam.DeleteMark(); m_aDelPam.GetPoint()->nNode = *m_pCurTextFrame->GetTextNodeForParaProps(); - m_aDelPam.GetPoint()->nContent.Assign(m_aDelPam.GetPoint()->nNode.GetNode().GetContentNode(), 0); + m_aDelPam.GetPoint()->nContent.Assign(m_aDelPam.GetPoint()->GetNode().GetContentNode(), 0); // keep hard tabs, alignment, language, hyphenation, DropCaps and nearly all frame attributes SfxItemSetFixed< @@ -1009,9 +1009,9 @@ void SwAutoFormat::SetColl( sal_uInt16 nId, bool bHdLineOrText ) RES_PARATR_TABSTOP, RES_PARATR_DROP, RES_BACKGROUND, RES_SHADOW> aSet(m_pDoc->GetAttrPool()); - if (m_aDelPam.GetPoint()->nNode.GetNode().GetTextNode()->HasSwAttrSet()) + if (m_aDelPam.GetPoint()->GetNode().GetTextNode()->HasSwAttrSet()) { - aSet.Put(*m_aDelPam.GetPoint()->nNode.GetNode().GetTextNode()->GetpSwAttrSet()); + aSet.Put(*m_aDelPam.GetPoint()->GetNode().GetTextNode()->GetpSwAttrSet()); // take HeaderLine/TextBody only if centered or right aligned, otherwise only justification if( SvxAdjustItem const * pAdj = aSet.GetItemIfSet( RES_PARATR_ADJUST, false) ) { @@ -1735,7 +1735,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) SfxItemSet aSet( m_pDoc->GetAttrPool(), aTextNodeSetRange ); *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos(TextFrameIndex(0)); - assert(&m_aDelPam.GetPoint()->nNode.GetNode() == m_pCurTextFrame->GetTextNodeForParaProps()); + assert(&m_aDelPam.GetPoint()->GetNode() == m_pCurTextFrame->GetTextNodeForParaProps()); if( bChgBullet ) { m_aDelPam.SetMark(); @@ -1755,7 +1755,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) SvxTabStopItem aTStops( RES_PARATR_TABSTOP ); aTStops.Insert( SvxTabStop( 0 ) ); aSet.Put( aTStops ); - assert(&m_aDelPam.GetPoint()->nNode.GetNode() == m_pCurTextFrame->GetTextNodeForParaProps()); + assert(&m_aDelPam.GetPoint()->GetNode() == m_pCurTextFrame->GetTextNodeForParaProps()); m_pDoc->SetFormatItemByAutoFormat( m_aDelPam, aSet ); } } diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 12abec2503db..17213db800da 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -59,7 +59,7 @@ void SwEditShell::GCAttr() if ( !rPaM.HasMark() ) { SwTextNode *const pTextNode = - rPaM.GetPoint()->nNode.GetNode().GetTextNode(); + rPaM.GetPoint()->GetNode().GetTextNode(); if (pTextNode) { pTextNode->GCAttr(); diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index dbb4bfa67edf..a18bd4488301 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -669,7 +669,7 @@ SvtScriptType SwEditShell::GetScriptType() const auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* if( pStt == pEnd || *pStt == *pEnd ) { - const SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pStt->GetNode().GetTextNode(); if( pTNd ) { // try to get SwScriptInfo @@ -802,7 +802,7 @@ LanguageType SwEditShell::GetCurLang() const { const SwPaM* pCursor = GetCursor(); const SwPosition& rPos = *pCursor->GetPoint(); - const SwTextNode* pTNd = rPos.nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = rPos.GetNode().GetTextNode(); LanguageType nLang; if( pTNd ) { @@ -822,7 +822,7 @@ sal_uInt16 SwEditShell::GetScalingOfSelectedText() const { const SwPaM* pCursor = GetCursor(); const SwPosition* pStt = pCursor->Start(); - const SwTextNode* pTNd = pStt->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pStt->GetNode().GetTextNode(); OSL_ENSURE( pTNd, "no textnode available" ); sal_uInt16 nScaleWidth; diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index bc95e7ca1d84..c9f537468c8b 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -100,13 +100,13 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool // Selection starts at the first para of the first cell, but we // want to delete the table node before the first cell as well. while (SwTableNode const* pTableNode = - pNewPam->Start()->nNode.GetNode().StartOfSectionNode()->FindTableNode()) + pNewPam->Start()->GetNode().StartOfSectionNode()->FindTableNode()) { pNewPam->Start()->nNode = *pTableNode; } // tdf#133990 ensure section is included in SwUndoDelete while (SwSectionNode const* pSectionNode = - pNewPam->Start()->nNode.GetNode().StartOfSectionNode()->FindSectionNode()) + pNewPam->Start()->GetNode().StartOfSectionNode()->FindSectionNode()) { pNewPam->Start()->nNode = *pSectionNode; } diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index 8dc1610a597a..18022c2fbfea 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -1267,7 +1267,7 @@ void SwEditShell::ApplyParagraphClassification(std::vector<svx::ClassificationRe if (!pDocShell || !GetCursor() || !GetCursor()->Start()) return; - SwTextNode* pNode = GetCursor()->Start()->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode(); if (pNode == nullptr) return; @@ -1348,7 +1348,7 @@ std::vector<svx::ClassificationResult> SwEditShell::CollectParagraphClassificati if (!pDocShell || !GetCursor() || !GetCursor()->Start()) return aResult; - SwTextNode* pNode = GetCursor()->Start()->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode(); if (pNode == nullptr) return aResult; @@ -1757,7 +1757,7 @@ void SwEditShell::SignParagraph() const SwPosition* pPosStart = GetCursor()->Start(); if (!pPosStart) return; - SwTextNode* pNode = pPosStart->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = pPosStart->GetNode().GetTextNode(); if (!pNode) return; @@ -1848,7 +1848,7 @@ void SwEditShell::ValidateCurrentParagraphSignatures(bool updateDontRemove) SwPaM* pPaM = GetCursor(); const SwPosition* pPosStart = pPaM->Start(); - SwTextNode* pNode = pPosStart->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = pPosStart->GetNode().GetTextNode(); ValidateParagraphSignatures(pNode, updateDontRemove); } @@ -2045,7 +2045,7 @@ bool SwEditShell::IsCursorInParagraphMetadataField() const { if (GetCursor() && GetCursor()->Start()) { - SwTextNode* pNode = GetCursor()->Start()->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode(); const sal_uLong index = GetCursor()->Start()->nContent.GetIndex(); uno::Reference<text::XTextField> xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index); return xField.is(); @@ -2058,7 +2058,7 @@ bool SwEditShell::RemoveParagraphMetadataFieldAtCursor() { if (GetCursor() && GetCursor()->Start()) { - SwTextNode* pNode = GetCursor()->Start()->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = GetCursor()->Start()->GetNode().GetTextNode(); sal_uLong index = GetCursor()->Start()->nContent.GetIndex(); uno::Reference<text::XTextField> xField = lcl_GetParagraphMetadataFieldAtIndex(GetDoc()->GetDocShell(), pNode, index); if (!xField.is()) @@ -2104,7 +2104,7 @@ static OUString lcl_GetHighestClassificationParagraphClass(SwPaM* pCursor) { OUString sHighestClass; - SwTextNode* pNode = pCursor->Start()->nNode.GetNode().GetTextNode(); + SwTextNode* pNode = pCursor->Start()->GetNode().GetTextNode(); if (pNode == nullptr) return sHighestClass; @@ -2204,7 +2204,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, // store previous paragraph style for track changes OUString sParaStyleName; sal_uInt16 nPoolId = USHRT_MAX; - SwContentNode * pCnt = rPaM.Start()->nNode.GetNode().GetContentNode(); + SwContentNode * pCnt = rPaM.Start()->GetNode().GetContentNode(); if ( pCnt && pCnt->GetTextNode() && GetDoc()->getIDocumentRedlineAccess().IsRedlineOn() ) { const SwTextFormatColl* pTextFormatColl = pCnt->GetTextNode()->GetTextColl(); @@ -2221,7 +2221,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, // If there are hints on the nodes which cover the whole node, then remove those, too. SwPaM aPaM(*rPaM.Start(), *rPaM.End()); - if (SwTextNode* pEndTextNode = aPaM.End()->nNode.GetNode().GetTextNode()) + if (SwTextNode* pEndTextNode = aPaM.End()->GetNode().GetTextNode()) { aPaM.Start()->nContent = 0; aPaM.End()->nContent = pEndTextNode->GetText().getLength(); diff --git a/sw/source/core/edit/edglbldc.cxx b/sw/source/core/edit/edglbldc.cxx index 80a97ba33f59..f88dca55839b 100644 --- a/sw/source/core/edit/edglbldc.cxx +++ b/sw/source/core/edit/edglbldc.cxx @@ -145,7 +145,7 @@ void SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, bool bEndUndo = false; SwDoc* pMyDoc = GetDoc(); - SwTextNode *const pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *const pTextNd = rPos.GetNode().GetTextNode(); if( pTextNd ) rPos.nContent.Assign( pTextNd, 0 ); else @@ -184,7 +184,7 @@ bool SwEditShell::InsertGlobalDocContent( const SwGlblDocContent& rInsPos, bool bEndUndo = false; SwDoc* pMyDoc = GetDoc(); - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if (pTextNd && pTextNd->GetText().getLength() && rPos.nNode.GetIndex() + 1 != pMyDoc->GetNodes().GetEndOfContent().GetIndex() ) rPos.nContent.Assign( pTextNd, 0 ); @@ -346,7 +346,7 @@ void SwEditShell::GotoGlobalDocContent( const SwGlblDocContent& rPos ) rCursorPos.nNode = rPos.GetDocPos(); SwDoc* pMyDoc = GetDoc(); - SwContentNode * pCNd = rCursorPos.nNode.GetNode().GetContentNode(); + SwContentNode * pCNd = rCursorPos.GetNode().GetContentNode(); if( !pCNd ) pCNd = pMyDoc->GetNodes().GoNext( &rCursorPos.nNode ); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index 9e6e96da8435..bbb98b7e30c0 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -230,12 +230,12 @@ bool SwEditShell::CopySelToDoc( SwDoc& rInsDoc ) // the first cell as well. // tdf#133982 tables can be nested while (SwTableNode const* pTableNode = - aPaM.Start()->nNode.GetNode().StartOfSectionNode()->FindTableNode()) + aPaM.Start()->GetNode().StartOfSectionNode()->FindTableNode()) { aPaM.Start()->nNode = *pTableNode; } while (SwSectionNode const* pSectionNode = - aPaM.Start()->nNode.GetNode().StartOfSectionNode()->FindSectionNode()) + aPaM.Start()->GetNode().StartOfSectionNode()->FindSectionNode()) { aPaM.Start()->nNode = *pSectionNode; } diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index adcc69ba4bce..a1dc7bdcd131 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -99,7 +99,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) // Set paragraph rsid if beginning of paragraph SwTextNode *const pTextNode = - rCurrentCursor.GetPoint()->nNode.GetNode().GetTextNode(); + rCurrentCursor.GetPoint()->GetNode().GetTextNode(); if( pTextNode && pTextNode->Len() == 1) GetDoc()->UpdateParRsid( pTextNode ); } @@ -116,7 +116,7 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) if ( ! bDoNotSetBidiLevel ) { - SwNode& rNode = pTmpCursor->GetPoint()->nNode.GetNode(); + SwNode& rNode = pTmpCursor->GetPoint()->GetNode(); if ( rNode.IsTextNode() ) { SwContentIndex& rIdx = pTmpCursor->GetPoint()->nContent; @@ -229,7 +229,7 @@ SwGrfNode * SwEditShell::GetGrfNode_() const SwPaM* pCursor = GetCursor(); if( !pCursor->HasMark() || pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode ) - pGrfNode = pCursor->GetPoint()->nNode.GetNode().GetGrfNode(); + pGrfNode = pCursor->GetPoint()->GetNode().GetGrfNode(); return pGrfNode; } @@ -962,7 +962,7 @@ void SwEditShell::CreateExtTextInput(LanguageType eInputLanguage) OUString SwEditShell::DeleteExtTextInput( bool bInsText ) { const SwPosition& rPos = *GetCursor()->GetPoint(); - SwExtTextInput* pDel = GetDoc()->GetExtTextInput( rPos.nNode.GetNode(), + SwExtTextInput* pDel = GetDoc()->GetExtTextInput( rPos.GetNode(), rPos.nContent.GetIndex() ); if( !pDel ) { @@ -998,7 +998,7 @@ void SwEditShell::SetExtTextInputData( const CommandExtTextInputData& rData ) { SwPaM* pCurrentCursor = GetCursor(); const SwPosition& rPos = *pCurrentCursor->GetPoint(); - SwExtTextInput* pInput = GetDoc()->GetExtTextInput( rPos.nNode.GetNode() ); + SwExtTextInput* pInput = GetDoc()->GetExtTextInput( rPos.GetNode() ); if( !pInput ) return; diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 1e611653420a..fdd1cdec9d1c 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -538,7 +538,7 @@ void SwHyphIter::DelSoftHyph( SwPaM &rPam ) const SwPosition* pStt = rPam.Start(); const sal_Int32 nStart = pStt->nContent.GetIndex(); const sal_Int32 nEnd = rPam.End()->nContent.GetIndex(); - SwTextNode *pNode = pStt->nNode.GetNode().GetTextNode(); + SwTextNode *pNode = pStt->GetNode().GetTextNode(); pNode->DelSoftHyph( nStart, nEnd ); } @@ -838,14 +838,14 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos, SwRect& rSelectRect) { // save the start and end positions of the line and the starting point - SwNode const& rNode(GetCursor()->GetPoint()->nNode.GetNode()); + SwNode const& rNode(GetCursor()->GetPoint()->GetNode()); Push(); LeftMargin(); - const sal_Int32 nLineStart = &rNode == &GetCursor()->GetPoint()->nNode.GetNode() + const sal_Int32 nLineStart = &rNode == &GetCursor()->GetPoint()->GetNode() ? GetCursor()->GetPoint()->nContent.GetIndex() : 0; RightMargin(); - const sal_Int32 nLineEnd = &rNode == &GetCursor()->GetPoint()->nNode.GetNode() + const sal_Int32 nLineEnd = &rNode == &GetCursor()->GetPoint()->GetNode() ? GetCursor()->GetPoint()->nContent.GetIndex() : rNode.GetTextNode()->Len(); Pop(PopMode::DeleteCurrent); @@ -918,7 +918,7 @@ uno::Reference< XSpellAlternatives > SwTextNode *pNode = nullptr; SwWrongList *pWrong = nullptr; if (pPt && GetLayout()->GetModelPositionForViewPoint( &aPos, *const_cast<Point*>(pPt), &eTmpState )) - pNode = aPos.nNode.GetNode().GetTextNode(); + pNode = aPos.GetNode().GetTextNode(); if (nullptr == pNode) pNode = pCursor->GetNode().GetTextNode(); if (nullptr != pNode) @@ -989,7 +989,7 @@ bool SwEditShell::GetGrammarCorrection( SwTextNode *pNode = nullptr; SwGrammarMarkUp *pWrong = nullptr; if (pPt && GetLayout()->GetModelPositionForViewPoint( &aPos, *const_cast<Point*>(pPt), &eTmpState )) - pNode = aPos.nNode.GetNode().GetTextNode(); + pNode = aPos.GetNode().GetTextNode(); if (nullptr == pNode) pNode = pCursor->GetNode().GetTextNode(); if (nullptr != pNode) @@ -1418,7 +1418,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh if( pCursor->End()->nContent.GetIndex() < nSentenceEnd ) { pCursor->End()->nContent.Assign( - pCursor->End()->nNode.GetNode().GetContentNode(), nSentenceEnd); + pCursor->End()->GetNode().GetContentNode(), nSentenceEnd); } } diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index 4e9ca59c476b..79989ff424a2 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -347,7 +347,7 @@ void SwEditShell::SetIndent(short nIndent, const SwPosition & rPos) } else { - const SwTextNode* pTextNode = pos.nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNode = pos.GetNode().GetTextNode(); if ( pTextNode != nullptr && pTextNode->GetActualListLevel() >= 0 ) { @@ -430,7 +430,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) { SwNodeOffset nStt = aPos.nNode.GetIndex(), nIdx = nStt - 1; - if (SwTextNode const*const pStt = aPos.nNode.GetNode().GetTextNode()) + if (SwTextNode const*const pStt = aPos.GetNode().GetTextNode()) { std::pair<SwTextNode *, SwTextNode *> nodes( sw::GetFirstAndLastNode(*GetLayout(), *pStt)); @@ -453,7 +453,7 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) pOrig == aCursor.GetNode().GetTextNode()->GetNumRule() ) { SwNodeOffset nStt = aCursor.GetPoint()->nNode.GetIndex(), nIdx = nStt+1; - if (SwTextNode const*const pStt = aCursor.GetPoint()->nNode.GetNode().GetTextNode()) + if (SwTextNode const*const pStt = aCursor.GetPoint()->GetNode().GetTextNode()) { std::pair<SwTextNode *, SwTextNode *> nodes( sw::GetFirstAndLastNode(*GetLayout(), *pStt)); @@ -554,7 +554,7 @@ bool SwEditShell::MoveOutlinePara( SwOutlineNodes::difference_type nOffset ) bool SwEditShell::IsProtectedOutlinePara() const { bool bRet = false; - const SwNode& rNd = GetCursor()->Start()->nNode.GetNode(); + const SwNode& rNd = GetCursor()->Start()->GetNode(); if( rNd.IsTextNode() ) { const SwOutlineNodes& rOutlNd = GetDoc()->GetNodes().GetOutLineNds(); diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index 2ea498dfd4f3..8ab055dac291 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -88,7 +88,7 @@ SwSection* SwEditShell::GetAnySection( bool bOutOfTab, const Point* pPt ) SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); - SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(*pPt, true); pFrame = pNd->getLayoutFrame(GetLayout(), nullptr, &tmp); } @@ -181,8 +181,8 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet, { auto [pStt, pEnd] = rPaM.StartEnd(); // SwPosition* - SwSectionNode* pSttSectNd = pStt->nNode.GetNode().FindSectionNode(), - * pEndSectNd = pEnd->nNode.GetNode().FindSectionNode(); + SwSectionNode* pSttSectNd = pStt->GetNode().FindSectionNode(), + * pEndSectNd = pEnd->GetNode().FindSectionNode(); if( pSttSectNd || pEndSectNd ) { @@ -253,7 +253,7 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const const SwContentNode* pCNd; // check the selection, if Start at Node begin and End at Node end if( pStt->nContent.GetIndex() || - ( nullptr == ( pCNd = pEnd->nNode.GetNode().GetContentNode() )) || + ( nullptr == ( pCNd = pEnd->GetNode().GetContentNode() )) || pCNd->Len() != pEnd->nContent.GetIndex() ) { nRet = 0; @@ -302,7 +302,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) // the current position OSL_ENSURE( pCurrentPos != nullptr, "Strange, we have no position!" ); - const SwNode& rCurrentNode = pCurrentPos->nNode.GetNode(); + const SwNode& rCurrentNode = pCurrentPos->GetNode(); // find innermost section or table. At the end of this scope, // pInnermostNode contains the section/table before/after which we should diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 0a977e544a3b..4e0e66f29d68 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -155,7 +155,7 @@ static SwTextNode* GetFirstTextNode( const SwDoc& rDoc, SwPosition& rPos, else { pCFrame->GetModelPositionForViewPoint( &rPos, rPt ); - pTextNode = rPos.nNode.GetNode().GetTextNode(); + pTextNode = rPos.GetNode().GetTextNode(); } return pTextNode; } @@ -188,7 +188,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, { OSL_ENSURE( rAnchor.GetContentAnchor(), "no valid position" ); rPos = *rAnchor.GetContentAnchor(); - pTextNode = rPos.nNode.GetNode().GetTextNode(); + pTextNode = rPos.GetNode().GetTextNode(); if ( RndStdIds::FLY_AT_PARA == rAnchor.GetAnchorId() ) { const_cast<SwTextNode*>(pTextNode)->MakeStartIndex( @@ -204,7 +204,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, { pLayout->FindPageFrame()->GetContentPosition( pLayout->getFrameArea().Pos(), rPos ); - pTextNode = rPos.nNode.GetNode().GetTextNode(); + pTextNode = rPos.GetNode().GetTextNode(); } } else if( pLayout->IsFootnoteFrame() ) @@ -240,7 +240,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, assert(pContentFrame->IsTextFrame()); SwTextFrame const*const pFrame(static_cast<SwTextFrame const*>(pContentFrame)); rPos = pFrame->MapViewToModelPos(TextFrameIndex(pFrame->GetText().getLength())); - pTextNode = rPos.nNode.GetNode().GetTextNode(); + pTextNode = rPos.GetNode().GetTextNode(); assert(pTextNode); } else diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx index 26d81b373a46..865d00550c93 100644 --- a/sw/source/core/fields/postithelper.cxx +++ b/sw/source/core/fields/postithelper.cxx @@ -131,7 +131,7 @@ SwPostItHelper::SwLayoutStatus SwPostItHelper::getLayoutInfos( const sw::mark::IMark* pAnnotationMark ) { SwLayoutStatus aRet = INVISIBLE; - SwTextNode* pTextNode = rAnchorPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = rAnchorPos.GetNode().GetTextNode(); if ( pTextNode == nullptr ) return aRet; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index a79c314a326d..1862e23d831d 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1229,7 +1229,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark const ::sw::mark::IMark* pBkmk = *ppMark; const SwPosition* pPos = &pBkmk->GetMarkStart(); - pTextNd = pPos->nNode.GetNode().GetTextNode(); + pTextNd = pPos->GetNode().GetTextNode(); *pStt = pPos->nContent.GetIndex(); if(pEnd) { diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 6bd3a044b0de..d239058d26b1 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -339,7 +339,7 @@ bool SwFEShell::CopyDrawSel( SwFEShell& rDestShell, const Point& rSttPt, SwCursorMoveState aState( CursorMoveState::SetOnlyText ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aState ); const SwNode *pNd; - if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) + if( (pNd = &aPos.GetNode())->IsNoTextNode() ) bRet = false; else bRet = ::lcl_SetAnchor( aPos, *pNd, nullptr, rInsPt, @@ -488,7 +488,7 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, SwCursorMoveState aState( CursorMoveState::SetOnlyText ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt, &aState ); const SwNode *pNd; - if( (pNd = &aPos.nNode.GetNode())->IsNoTextNode() ) + if( (pNd = &aPos.GetNode())->IsNoTextNode() ) bRet = false; else { @@ -585,7 +585,7 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, pDstPos.reset(new SwPosition( *GetCursor()->GetPoint() )); Point aPt( rInsPt ); GetLayout()->GetModelPositionForViewPoint( pDstPos.get(), aPt ); - if( !pDstPos->nNode.GetNode().IsNoTextNode() ) + if( !pDstPos->GetNode().IsNoTextNode() ) bRet = true; } else if( !rDestShell.GetCursor()->GetNode().IsNoTextNode() ) @@ -629,7 +629,7 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rInsPt ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); - bRet = !aPos.nNode.GetNode().IsNoTextNode(); + bRet = !aPos.GetNode().IsNoTextNode(); } else if( rDestShell.GetCursor()->GetNode().IsNoTextNode() ) bRet = false; @@ -682,7 +682,7 @@ namespace { return false; } - const SwStartNode* pFlyNode = pPosition->nNode.GetNode().FindFlyStartNode(); + const SwStartNode* pFlyNode = pPosition->GetNode().FindFlyStartNode(); if (!pFlyNode) { return false; @@ -937,7 +937,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) { SwPosition& rInsPos = *item.second; SwPaM& rCopy = *item.first; - const SwStartNode* pBoxNd = rInsPos.nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pBoxNd = rInsPos.GetNode().FindTableBoxStartNode(); if( pBoxNd && SwNodeOffset(2) == pBoxNd->EndOfSectionIndex() - pBoxNd->GetIndex() && rCopy.GetPoint()->nNode != rCopy.GetMark()->nNode ) { @@ -1028,7 +1028,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aNdIdx ); SwPosition aPos( aNdIdx, pCNd, 0 ); // #i59539: Don't remove all redline - SwNode & rNode(rPaM.GetPoint()->nNode.GetNode()); + SwNode & rNode(rPaM.GetPoint()->GetNode()); SwContentNode *const pContentNode( rNode.GetContentNode() ); SwPaM const tmpPam(rNode, 0, rNode, pContentNode ? pContentNode->Len() : 0); @@ -1070,7 +1070,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) } SwPosition& rInsPos = *rPaM.GetPoint(); - const SwStartNode* pBoxNd = rInsPos.nNode.GetNode(). + const SwStartNode* pBoxNd = rInsPos.GetNode(). FindTableBoxStartNode(); if( pBoxNd && SwNodeOffset(2) == pBoxNd->EndOfSectionIndex() - pBoxNd->GetIndex() && diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 323816ef2d84..199b7d3c6e0d 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -179,7 +179,7 @@ static bool lcl_FindAnchorPos( aTmpPnt.setX(aTmpPnt.getX() - 1); // do not land in the fly! rDoc.getIDocumentLayoutAccess().GetCurrentLayout()->GetModelPositionForViewPoint( &aPos, aTmpPnt, &aState ); pNewAnch = ::FindAnchor( - aPos.nNode.GetNode().GetContentNode()->getLayoutFrame(rFrame.getRootFrame(), nullptr, nullptr), + aPos.GetNode().GetContentNode()->getLayoutFrame(rFrame.getRootFrame(), nullptr, nullptr), aTmpPnt )->FindFlyFrame(); if( pNewAnch && &rFrame != pNewAnch && !pNewAnch->IsProtected() ) @@ -359,7 +359,7 @@ const SwFrameFormat* SwFEShell::IsFlyInFly() aPoint.setX(aPoint.getX() - 1); //do not land in the fly!! GetLayout()->GetModelPositionForViewPoint( &aPos, aPoint, &aState ); // determine text frame by left-top-corner of object - SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(aTmpPos, false); pTextFrame = pNd ? pNd->getLayoutFrame(GetLayout(), nullptr, &tmp) : nullptr; } @@ -502,7 +502,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex() && (nAnchorId != RndStdIds::FLY_AT_CHAR || !PosInsideInputField(aPos))) { - SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNode = aPos.GetNode().GetContentNode(); assert(pCNode); pTextFrame = pCNode->getLayoutFrame(GetLayout(), &aPos, nullptr); } @@ -711,7 +711,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV { rAnch.SetAnchor( &rPos ); } - else if( lcl_SetNewFlyPos( rPos.nNode.GetNode(), rAnch, aPt ) ) + else if( lcl_SetNewFlyPos( rPos.GetNode(), rAnch, aPt ) ) { eRndId = RndStdIds::FLY_AT_PAGE; } @@ -907,8 +907,8 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, if ( IsRedlineOn() ) { SwPosition aPos(*pFormat->GetAnchor().GetContentAnchor()); - SwPaM aPaM(aPos.nNode.GetNode(), aPos.nContent.GetIndex(), - aPos.nNode.GetNode(), aPos.nContent.GetIndex() + 1); + SwPaM aPaM(aPos.GetNode(), aPos.nContent.GetIndex(), + aPos.GetNode(), aPos.nContent.GetIndex() + 1); GetDoc()->getIDocumentRedlineAccess().AppendRedline( new SwRangeRedline( RedlineType::Insert, aPaM ), true); } @@ -1656,7 +1656,7 @@ const SwFrameFormat* SwFEShell::GetFormatFromAnyObj( const Point& rPt ) const SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( rPt ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); - SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(rPt, false); SwFrame* pFrame = pNd->getLayoutFrame(GetLayout(), nullptr, &tmp)->FindFlyFrame(); pRet = pFrame ? static_cast<SwLayoutFrame*>(pFrame)->GetFormat() : nullptr; diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 8369004ac3c5..64f084814cbf 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -1910,10 +1910,10 @@ bool SwFEShell::ImpEndCreate() GetLayout()->GetModelPositionForViewPoint( &aPos, aPoint, &aState ); // characterbinding not allowed in readonly-content - if( !aPos.nNode.GetNode().IsProtect() ) + if( !aPos.GetNode().IsProtect() ) { std::pair<Point, bool> const tmp(aPoint, true); - pAnch = aPos.nNode.GetNode().GetContentNode()->getLayoutFrame(GetLayout(), &aPos, &tmp); + pAnch = aPos.GetNode().GetContentNode()->getLayoutFrame(GetLayout(), &aPos, &tmp); SwRect aTmp; pAnch->GetCharRect( aTmp, aPos ); @@ -1958,14 +1958,14 @@ bool SwFEShell::ImpEndCreate() GetLayout()->GetModelPositionForViewPoint( &aPos, aPoint, &aState ); // do not set in ReadnOnly-content - if (aPos.nNode.GetNode().IsProtect()) + if (aPos.GetNode().IsProtect()) { // then only page bound. Or should we // search the next not-readonly position? bAtPage = true; } - SwContentNode* pCNode = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNode = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(aPoint, false); pAnch = pCNode ? pCNode->getLayoutFrame(GetLayout(), nullptr, &tmp) : nullptr; if (!pAnch) @@ -2014,7 +2014,7 @@ bool SwFEShell::ImpEndCreate() } // do not set in ReadnOnly-content - if( aPos.nNode.GetNode().IsProtect() ) + if( aPos.GetNode().IsProtect() ) // then only page bound. Or should we // search the next not-readonly position? bAtPage = true; @@ -2178,7 +2178,7 @@ bool SwFEShell::ImpEndCreate() if( bCharBound ) { OSL_ENSURE( aAnch.GetAnchorId() == RndStdIds::FLY_AS_CHAR, "wrong AnchorType" ); - SwTextNode *pNd = aAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); + SwTextNode *pNd = aAnch.GetContentAnchor()->GetNode().GetTextNode(); SwFormatFlyCnt aFormat( pFormat ); pNd->InsertItem(aFormat, aAnch.GetContentAnchor()->nContent.GetIndex(), 0 ); diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index 678ebfc2fac7..13a4a82d4b97 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -194,10 +194,10 @@ void SwFEShell::InsertRow( sal_uInt16 nCnt, bool bBehind ) { // Set the end of the selection to the last paragraph of the last cell of the table. SwPaM* pPaM = getShellCursor(false); - SwNode* pNode = pPaM->Start()->nNode.GetNode().FindTableNode()->EndOfSectionNode(); + SwNode* pNode = pPaM->Start()->GetNode().FindTableNode()->EndOfSectionNode(); // pNode is the end node of the table, we want the last node before the end node of the last cell. pPaM->End()->nNode = pNode->GetIndex() - 2; - pPaM->End()->nContent.Assign(pPaM->End()->nNode.GetNode().GetContentNode(), 0); + pPaM->End()->nContent.Assign(pPaM->End()->GetNode().GetContentNode(), 0); } GetTableSel( *this, aBoxes, SwTableSearchType::Row ); @@ -1095,7 +1095,7 @@ static sal_uInt16 lcl_GetRowNumber( const SwPosition& rPos ) const SwContentFrame *pFrame; std::pair<Point, bool> const tmp(aTmpPt, false); - pNd = rPos.nNode.GetNode().GetContentNode(); + pNd = rPos.GetNode().GetContentNode(); if( nullptr != pNd ) pFrame = pNd->getLayoutFrame(pNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), &rPos, &tmp); else @@ -1921,8 +1921,8 @@ bool SwFEShell::SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDr if ( ppPos[1] ) { - if ( ppPos[1]->nNode.GetNode().StartOfSectionNode() != - aOldPos.nNode.GetNode().StartOfSectionNode() ) + if ( ppPos[1]->GetNode().StartOfSectionNode() != + aOldPos.GetNode().StartOfSectionNode() ) { pCursor->SetMark(); SwCursorSaveState aSaveState2( *pCursor ); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 4e29e509e10a..dc74c8cd4e33 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -102,7 +102,7 @@ const SwRect& SwFEShell::GetAnyCurRect( CurRectType eType, const Point* pPt, SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); - SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(*pPt, true); pFrame = pNd->getLayoutFrame(GetLayout(), nullptr, &tmp); } @@ -243,7 +243,7 @@ FrameTypeFlags SwFEShell::GetFrameType( const Point *pPt, bool bStopAtFly ) cons SwPosition aPos( *GetCursor()->GetPoint() ); Point aPt( *pPt ); GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); - SwContentNode *pNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode *pNd = aPos.GetNode().GetContentNode(); std::pair<Point, bool> const tmp(*pPt, true); pFrame = pNd->getLayoutFrame(GetLayout(), nullptr, &tmp); } diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 5f2e31b821b1..17daef874372 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -1589,9 +1589,9 @@ void SwFormatAnchor::SetAnchor( const SwPosition *pPos ) // also allow table node, this is used when a table is selected and is converted to a frame by the UI assert(!pPos || ((RndStdIds::FLY_AT_FLY == m_eAnchorId) && - dynamic_cast<SwStartNode*>(&pPos->nNode.GetNode())) - || (RndStdIds::FLY_AT_PARA == m_eAnchorId && dynamic_cast<SwTableNode*>(&pPos->nNode.GetNode())) - || dynamic_cast<SwTextNode*>(&pPos->nNode.GetNode())); + dynamic_cast<SwStartNode*>(&pPos->GetNode())) + || (RndStdIds::FLY_AT_PARA == m_eAnchorId && dynamic_cast<SwTableNode*>(&pPos->GetNode())) + || dynamic_cast<SwTextNode*>(&pPos->GetNode())); m_pContentAnchor .reset( pPos ? new SwPosition( *pPos ) : nullptr ); // Flys anchored AT paragraph should not point into the paragraph content if (m_pContentAnchor && @@ -1678,7 +1678,7 @@ bool SwFormatAnchor::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const { if (m_pContentAnchor && RndStdIds::FLY_AT_FLY == m_eAnchorId) { - SwFrameFormat* pFormat = m_pContentAnchor->nNode.GetNode().GetFlyFormat(); + SwFrameFormat* pFormat = m_pContentAnchor->GetNode().GetFlyFormat(); if(pFormat) { uno::Reference<text::XTextFrame> const xRet( @@ -2543,7 +2543,7 @@ SwFrameFormat::~SwFrameFormat() const SwFormatAnchor& rAnchor = GetAnchor(); if (rAnchor.GetContentAnchor() != nullptr) { - rAnchor.GetContentAnchor()->nNode.GetNode().RemoveAnchoredFly(this); + rAnchor.GetContentAnchor()->GetNode().RemoveAnchoredFly(this); } } @@ -2690,9 +2690,9 @@ void SwFrameFormat::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) } SwFormat::SwClientNotify(rMod, rHint); if(pOldAnchorPosition != nullptr && (pNewAnchorPosition == nullptr || pOldAnchorPosition->nNode.GetIndex() != pNewAnchorPosition->nNode.GetIndex())) - pOldAnchorPosition->nNode.GetNode().RemoveAnchoredFly(this); + pOldAnchorPosition->GetNode().RemoveAnchoredFly(this); if(pNewAnchorPosition != nullptr && (pOldAnchorPosition == nullptr || pOldAnchorPosition->nNode.GetIndex() != pNewAnchorPosition->nNode.GetIndex())) - pNewAnchorPosition->nNode.GetNode().AddAnchoredFly(this); + pNewAnchorPosition->GetNode().AddAnchoredFly(this); } void SwFrameFormat::RegisterToFormat( SwFormat& rFormat ) @@ -2800,7 +2800,7 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor()) { const SwFrameFormats& rFormats = *GetDoc()->GetSpzFrameFormats(); - const SwNode* pFlyNd = pAnchor->GetContentAnchor()->nNode.GetNode(). + const SwNode* pFlyNd = pAnchor->GetContentAnchor()->GetNode(). FindFlyStartNode(); while( pFlyNd ) { @@ -2822,7 +2822,7 @@ bool SwFrameFormat::IsLowerOf( const SwFrameFormat& rFormat ) const return false; } - pFlyNd = pAnchor->GetContentAnchor()->nNode.GetNode(). + pFlyNd = pAnchor->GetContentAnchor()->GetNode(). FindFlyStartNode(); break; } @@ -2950,7 +2950,7 @@ void SwFlyFrameFormat::MakeFrames() case RndStdIds::FLY_AT_CHAR: if( aAnchorAttr.GetContentAnchor() ) { - pModify = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode(); + pModify = aAnchorAttr.GetContentAnchor()->GetNode().GetContentNode(); } break; @@ -2967,7 +2967,7 @@ void SwFlyFrameFormat::MakeFrames() // #i105535# if ( pCNd == nullptr ) { - pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode(); + pCNd = aAnchorAttr.GetContentAnchor()->GetNode().GetContentNode(); } if ( pCNd ) { @@ -3001,7 +3001,7 @@ void SwFlyFrameFormat::MakeFrames() SwPageFrame *pPage = static_cast<SwPageFrame*>(GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout()->Lower()); if( nPgNum == 0 && aAnchorAttr.GetContentAnchor() ) { - SwContentNode *pCNd = aAnchorAttr.GetContentAnchor()->nNode.GetNode().GetContentNode(); + SwContentNode *pCNd = aAnchorAttr.GetContentAnchor()->GetNode().GetContentNode(); SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti> aIter(*pCNd); for ( SwFrame* pFrame = aIter.First(); pFrame != nullptr; pFrame = aIter.Next() ) { @@ -3324,18 +3324,18 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat if ( ((nNewAnchorType == RndStdIds::FLY_AT_PARA) || (nNewAnchorType == RndStdIds::FLY_AT_CHAR)) && _rNewAnchorFormat.GetContentAnchor() && - _rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode() ) + _rNewAnchorFormat.GetContentAnchor()->GetNode().GetContentNode() ) { if ( aOldAnchorFormat.GetAnchorId() == nNewAnchorType && aOldAnchorFormat.GetContentAnchor() && - aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode() && + aOldAnchorFormat.GetContentAnchor()->GetNode().GetContentNode() && aOldAnchorFormat.GetContentAnchor()->nNode != _rNewAnchorFormat.GetContentAnchor()->nNode ) { // determine 'old' number of anchor frames sal_uInt32 nOldNumOfAnchFrame( 0 ); SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti> aOldIter( - *(aOldAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); + *(aOldAnchorFormat.GetContentAnchor()->GetNode().GetContentNode()) ); for( SwFrame* pOld = aOldIter.First(); pOld; pOld = aOldIter.Next() ) { ++nOldNumOfAnchFrame; @@ -3343,7 +3343,7 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat // determine 'new' number of anchor frames sal_uInt32 nNewNumOfAnchFrame( 0 ); SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti> aNewIter( - *(_rNewAnchorFormat.GetContentAnchor()->nNode.GetNode().GetContentNode()) ); + *(_rNewAnchorFormat.GetContentAnchor()->GetNode().GetContentNode()) ); for( SwFrame* pNew = aNewIter.First(); pNew; pNew = aNewIter.Next() ) { ++nNewNumOfAnchFrame; @@ -3395,7 +3395,7 @@ void SwHandleAnchorNodeChg::ImplDestroy() return; } - SwTextNode* pTextNode = mpCommentAnchor->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = mpCommentAnchor->GetNode().GetTextNode(); if (!pTextNode) { return; @@ -3659,7 +3659,7 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc) for (const auto& rpFly : rFlys) { SwFormatAnchor const& rAnchor((*rpFly).GetAnchor(false)); - assert(&rAnchor.GetContentAnchor()->nNode.GetNode() == pNode); + assert(&rAnchor.GetContentAnchor()->GetNode() == pNode); } } SwFrameFormats const*const pSpzFrameFormats(rDoc.GetSpzFrameFormats()); @@ -3678,7 +3678,7 @@ void CheckAnchoredFlyConsistency(SwDoc const& rDoc) } else { - SwNode & rNode(rAnchor.GetContentAnchor()->nNode.GetNode()); + SwNode & rNode(rAnchor.GetContentAnchor()->GetNode()); std::vector<SwFrameFormat*> const& rFlys(rNode.GetAnchoredFlys()); assert(std::find(rFlys.begin(), rFlys.end(), *it) != rFlys.end()); switch (rAnchor.GetAnchorId()) diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 9343dba90d69..fafe780d16f3 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -382,7 +382,7 @@ static SwPosition ResolveFlyAnchor(SwFrameFormat const& rFlyFrame) { SwPosition const*const pPos(rAnch.GetContentAnchor()); assert(pPos); - if (SwFrameFormat const*const pParent = pPos->nNode.GetNode().GetFlyFormat()) + if (SwFrameFormat const*const pParent = pPos->GetNode().GetFlyFormat()) { return ResolveFlyAnchor(*pParent); } @@ -392,7 +392,7 @@ static SwPosition ResolveFlyAnchor(SwFrameFormat const& rFlyFrame) } else { - return SwPosition(*pPos->nNode.GetNode().GetContentNode(), 0); + return SwPosition(*pPos->GetNode().GetContentNode(), 0); } } } diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index f7611392d345..489fe2cdcfcd 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -1389,7 +1389,7 @@ void SwFlyAtContentFrame::SetAbsPos( const Point &rNew ) && FrameContainsNode(*pTextFrame, pos.nNode.GetIndex())) { const SwTextAttr *const pTextInputField = - pos.nNode.GetNode().GetTextNode()->GetTextAttrAt( + pos.GetNode().GetTextNode()->GetTextAttrAt( pos.nContent.GetIndex(), RES_TXTATR_INPUTFIELD, SwTextNode::PARENT ); if (pTextInputField != nullptr) { diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index f221a9b7d812..4fa22f4fdf2d 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -1335,10 +1335,10 @@ bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA || rAnchor.GetAnchorId() == RndStdIds::FLY_AT_CHAR)) { - ret = (&pAnchor->nNode.GetNode() == pMergedPara->pFirstNode + ret = (&pAnchor->GetNode() == pMergedPara->pFirstNode && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA || pAnchor->nContent == 0)) - || (&pAnchor->nNode.GetNode() == pMergedPara->pLastNode + || (&pAnchor->GetNode() == pMergedPara->pLastNode && (rAnchor.GetAnchorId() == RndStdIds::FLY_AT_PARA || pAnchor->nContent == pMergedPara->pLastNode->Len())); } @@ -1350,7 +1350,7 @@ bool IsAnchoredObjShown(SwTextFrame const& rFrame, SwFormatAnchor const& rAnchor || iter->pNode != pNode) { assert(pNode->GetRedlineMergeFlag() != SwNode::Merge::Hidden); - if (pNode == &pAnchor->nNode.GetNode()) + if (pNode == &pAnchor->GetNode()) { ret = IsShown(pNode->GetIndex(), rAnchor, &iterFirst, &iter, pMergedPara->pFirstNode, pMergedPara->pLastNode); @@ -1651,7 +1651,7 @@ void InsertCnt_( SwLayoutFrame *pLay, SwDoc *pDoc, // be created in UI but by import filters... if (pRedline && pRedline->GetType() == RedlineType::Delete - && &pRedline->Start()->nNode.GetNode() == pNd) + && &pRedline->Start()->GetNode() == pNd) { SAL_WARN("sw.pageframe", "skipping table frame creation on bizarre redline"); while (true) diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index a388b807769c..07a231ad86b9 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -245,7 +245,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, } } - SwContentNode* pContentNode = aTextPos.nNode.GetNode().GetContentNode(); + SwContentNode* pContentNode = aTextPos.GetNode().GetContentNode(); bool bConsiderBackground = true; // If the text position is a clickable field, then that should have priority. if (pContentNode && pContentNode->IsTextNode()) @@ -333,7 +333,7 @@ bool SwPageFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, double nBackDistance = 0; bool bValidBackDistance = false; - SwContentNode* pBackNd = aBackPos.nNode.GetNode( ).GetContentNode( ); + SwContentNode* pBackNd = aBackPos.GetNode( ).GetContentNode( ); if ( pBackNd && bConsiderBackground) { // FIXME There are still cases were we don't have the proper node here. @@ -980,7 +980,7 @@ bool SwContentFrame::UnitDown( SwPaM* pPam, const SwTwips, bool bInReadOnly ) co sal_uInt16 SwRootFrame::GetCurrPage( const SwPaM *pActualCursor ) const { OSL_ENSURE( pActualCursor, "got no page cursor" ); - SwFrame const*const pActFrame = pActualCursor->GetPoint()->nNode.GetNode(). + SwFrame const*const pActFrame = pActualCursor->GetPoint()->GetNode(). GetContentNode()->getLayoutFrame(this, pActualCursor->GetPoint()); return pActFrame->FindPageFrame()->GetPhyPageNum(); @@ -2032,11 +2032,11 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) SwRegionRects aRegion( !bIgnoreVisArea ? pSh->VisArea() : getFrameArea() ); - if( !pStartPos->nNode.GetNode().IsContentNode() || - !pStartPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) || + if( !pStartPos->GetNode().IsContentNode() || + !pStartPos->GetNode().GetContentNode()->getLayoutFrame(this) || ( pStartPos->nNode != pEndPos->nNode && - ( !pEndPos->nNode.GetNode().IsContentNode() || - !pEndPos->nNode.GetNode().GetContentNode()->getLayoutFrame(this) ) ) ) + ( !pEndPos->GetNode().IsContentNode() || + !pEndPos->GetNode().GetContentNode()->getLayoutFrame(this) ) ) ) { return; } @@ -2046,11 +2046,11 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) //First obtain the ContentFrames for the start and the end - those are needed //anyway. std::pair<Point, bool> tmp(rCursor.GetSttPos(), true); - SwContentFrame* pStartFrame = pStartPos->nNode.GetNode(). + SwContentFrame* pStartFrame = pStartPos->GetNode(). GetContentNode()->getLayoutFrame(this, pStartPos, &tmp); tmp.first = rCursor.GetEndPos(); - SwContentFrame* pEndFrame = pEndPos->nNode.GetNode(). + SwContentFrame* pEndFrame = pEndPos->GetNode(). GetContentNode()->getLayoutFrame(this, pEndPos, &tmp); assert(pStartFrame && pEndFrame && "No ContentFrames found."); diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 1eadc9db6a6f..eff3c674d6de 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -4484,7 +4484,7 @@ static void UnHideRedlines(SwRootFrame & rLayout, // be created in UI but by import filters... if (pRedline && pRedline->GetType() == RedlineType::Delete - && &pRedline->Start()->nNode.GetNode() == &rNode) + && &pRedline->Start()->GetNode() == &rNode) { for (SwNodeOffset j = rNode.GetIndex(); j <= rNode.EndOfSectionIndex(); ++j) { diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index d7dd08bb969a..45bf94e28c6f 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -481,7 +481,7 @@ bool SwOLENode::IsInGlobalDocSection() const if( !rAnchor.GetContentAnchor() ) return false; - pAnchorNd = &rAnchor.GetContentAnchor()->nNode.GetNode(); + pAnchorNd = &rAnchor.GetContentAnchor()->GetNode(); } while( pAnchorNd->GetIndex() < nEndExtraIdx ); const SwSectionNode* pSectNd = pAnchorNd->FindSectionNode(); diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 48953db7c75c..6e0e3495ae16 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -331,8 +331,8 @@ std::unique_ptr<SwBoxSelection> SwTable::CollectBoxSelection( const SwPaM& rPam OSL_ENSURE( m_bNewModel, "Don't call me for old tables" ); if( m_aLines.empty() ) return nullptr; - const SwNode* pStartNd = rPam.Start()->nNode.GetNode().FindTableBoxStartNode(); - const SwNode* pEndNd = rPam.End()->nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pStartNd = rPam.Start()->GetNode().FindTableBoxStartNode(); + const SwNode* pEndNd = rPam.End()->GetNode().FindTableBoxStartNode(); if( !pStartNd || !pEndNd || pStartNd == pEndNd ) return nullptr; @@ -1675,8 +1675,8 @@ void SwTable::CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes, OSL_ENSURE( m_bNewModel, "Don't call me for old tables" ); if( m_aLines.empty() ) return; - const SwNode* pStartNd = rPam.GetPoint()->nNode.GetNode().FindTableBoxStartNode(); - const SwNode* pEndNd = rPam.GetMark()->nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pStartNd = rPam.GetPoint()->GetNode().FindTableBoxStartNode(); + const SwNode* pEndNd = rPam.GetMark()->GetNode().FindTableBoxStartNode(); if( !pStartNd || !pEndNd ) return; CreateSelection( pStartNd, pEndNd, rBoxes, eSearch, bChkProtected ); diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 84ae10f3728e..5a905c56bf86 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1637,7 +1637,7 @@ SwRedlineTable::size_type SwTableLine::UpdateTextChangesOnly( bool bHasRedlineInBox = false; SwPosition aCellStart( *pBox->GetSttNd(), SwNodeOffset(0) ); SwPosition aCellEnd( *pBox->GetSttNd()->EndOfSectionNode(), SwNodeOffset(-1) ); - SwNodeIndex pEndNodeIndex(aCellEnd.nNode.GetNode()); + SwNodeIndex pEndNodeIndex(aCellEnd.GetNode()); SwRangeRedline* pPreviousDeleteRedline = nullptr; for( ; rRedlinePos < aRedlineTable.size(); ++rRedlinePos ) { @@ -1702,7 +1702,7 @@ SwRedlineTable::size_type SwTableLine::UpdateTextChangesOnly( if ( !bInsertion && ( !bHasRedlineInBox || ( pPreviousDeleteRedline && ( pPreviousDeleteRedline->End()->nNode < aCellEnd.nNode || pPreviousDeleteRedline->End()->nContent.GetIndex() < - aCellEnd.nNode.GetNode().GetContentNode()->Len() ) ) ) ) + aCellEnd.GetNode().GetContentNode()->Len() ) ) ) ) { bPlainTextInLine = true; // not deleted cell content: the row is not empty diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx index c28042bf7bcd..b57fe7178fb5 100644 --- a/sw/source/core/text/EnhancedPDFExportHelper.cxx +++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx @@ -1798,7 +1798,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport() const SwPosition* pPosition = rAnch.GetContentAnchor(); if ( pPosition && pDoc->IsInHeaderFooter( pPosition->nNode ) ) { - const SwTextNode* pTNd = pPosition->nNode.GetNode().GetTextNode(); + const SwTextNode* pTNd = pPosition->GetNode().GetTextNode(); if ( pTNd ) MakeHeaderFooterLinks( *pPDFExtOutDevData, *pTNd, aLinkRect, nDestId, aURL, bIntern ); } diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx index e2bff47bd305..825468be250c 100644 --- a/sw/source/core/text/frmform.cxx +++ b/sw/source/core/text/frmform.cxx @@ -349,14 +349,14 @@ void SwTextFrame::MakePos() for (SwRedlineTable::size_type nRedlnPos = 0; nRedlnPos < rTable.size(); ++nRedlnPos) { SwRangeRedline* pRedln = rTable[nRedlnPos]; - if (pTextNode->GetIndex() == pRedln->GetPoint()->nNode.GetNode().GetIndex()) + if (pTextNode->GetIndex() == pRedln->GetPoint()->GetNode().GetIndex()) { pRedln->MaybeNotifyRedlinePositionModification(getFrameArea().Top()); if (GetMergedPara() && pRedln->GetType() == RedlineType::Delete && pRedln->GetPoint()->nNode != pRedln->GetMark()->nNode) { - pTextNode = pRedln->End()->nNode.GetNode().GetTextNode(); + pTextNode = pRedln->End()->GetNode().GetTextNode(); } } } diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 4f4a840a564f..527f546aeed3 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -460,8 +460,8 @@ static bool CanSkipOverRedline( size_t nStartIndex(rStartIndex); size_t nEndIndex(rEndIndex); SwPosition const*const pRLEnd(rRedline.End()); - if (!pRLEnd->nNode.GetNode().IsTextNode() // if fully deleted... - || pRLEnd->nContent == pRLEnd->nNode.GetNode().GetTextNode()->Len()) + if (!pRLEnd->GetNode().IsTextNode() // if fully deleted... + || pRLEnd->nContent == pRLEnd->GetNode().GetTextNode()->Len()) { // shortcut: nothing follows redline // current state is end state @@ -471,14 +471,14 @@ static bool CanSkipOverRedline( // can't compare the SwFont that's stored somewhere, it doesn't have compare // operator, so try to recreate the situation with some temp arrays here SfxPoolItem const* activeCharAttrsStart[RES_CHRATR_END - RES_CHRATR_BEGIN + 1] = { nullptr, }; - if (&rStartNode != &pRLEnd->nNode.GetNode()) + if (&rStartNode != &pRLEnd->GetNode()) { // nodes' attributes are only needed if there are different nodes InsertCharAttrs(activeCharAttrsStart, rStartNode.GetSwAttrSet()); } if (SwpHints const*const pStartHints = rStartNode.GetpSwpHints()) { // check hint ends of hints that start before and end within - sal_Int32 const nRedlineEnd(&rStartNode == &pRLEnd->nNode.GetNode() + sal_Int32 const nRedlineEnd(&rStartNode == &pRLEnd->GetNode() ? pRLEnd->nContent.GetIndex() : rStartNode.Len()); for ( ; nEndIndex < pStartHints->Count(); ++nEndIndex) @@ -544,7 +544,7 @@ static bool CanSkipOverRedline( pRLEnd->nContent.GetIndex() < pStartHints->GetSortedByEnd(nEndIndex)->GetAnyEnd()); } - if (&rStartNode != &pRLEnd->nNode.GetNode()) + if (&rStartNode != &pRLEnd->GetNode()) { nStartIndex = 0; nEndIndex = 0; @@ -556,17 +556,17 @@ static bool CanSkipOverRedline( // ... and the charfmt must be *nominally* the same SfxPoolItem const* activeCharAttrsEnd[RES_CHRATR_END - RES_CHRATR_BEGIN + 1] = { nullptr, }; - if (&rStartNode != &pRLEnd->nNode.GetNode()) + if (&rStartNode != &pRLEnd->GetNode()) { // nodes' attributes are only needed if there are different nodes InsertCharAttrs(activeCharAttrsEnd, - pRLEnd->nNode.GetNode().GetTextNode()->GetSwAttrSet()); + pRLEnd->GetNode().GetTextNode()->GetSwAttrSet()); } - if (SwpHints *const pEndHints = pRLEnd->nNode.GetNode().GetTextNode()->GetpSwpHints()) + if (SwpHints *const pEndHints = pRLEnd->GetNode().GetTextNode()->GetpSwpHints()) { // check hint starts of hints that start within and end after #ifndef NDEBUG - sal_Int32 const nRedlineStart(&rStartNode == &pRLEnd->nNode.GetNode() + sal_Int32 const nRedlineStart(&rStartNode == &pRLEnd->GetNode() ? nStartRedline : 0); #endif @@ -632,7 +632,7 @@ static bool CanSkipOverRedline( default: assert(false); } } - if (&rStartNode != &pRLEnd->nNode.GetNode()) + if (&rStartNode != &pRLEnd->GetNode()) { // need to iterate the nEndIndex forward too so the loop in the // caller can look for the right ends in the next iteration @@ -747,14 +747,14 @@ TextFrameIndex SwAttrIter::GetNextAttr() const { assert(m_pMergedPara); assert(redline.second.first->End()->nNode.GetIndex() <= m_pMergedPara->pLastNode->GetIndex() - || !redline.second.first->End()->nNode.GetNode().IsTextNode()); + || !redline.second.first->End()->GetNode().IsTextNode()); if (CanSkipOverRedline(*pTextNode, redline.first, *redline.second.first, nStartIndex, nEndIndex, m_nPosition == redline.first)) { // if current position is start of the redline, must skip! nActRedline += redline.second.second; - if (&redline.second.first->End()->nNode.GetNode() != pTextNode) + if (&redline.second.first->End()->GetNode() != pTextNode) { - pTextNode = redline.second.first->End()->nNode.GetNode().GetTextNode(); + pTextNode = redline.second.first->End()->GetNode().GetTextNode(); nPosition = redline.second.first->End()->nContent.GetIndex(); } else diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index eac8be79ada4..3fe690770354 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -915,14 +915,14 @@ static void InitBookmarks( // assume "no" because the line break it contains isn't deleted. SwPosition const& rStart(it.first->GetMarkStart()); SwPosition const& rEnd(it.first->GetMarkEnd()); - assert(&rStart.nNode.GetNode() == pNode); + assert(&rStart.GetNode() == pNode); while (iter != end) { - if (&rStart.nNode.GetNode() != iter->pNode // iter moved to next node + if (&rStart.GetNode() != iter->pNode // iter moved to next node || rStart.nContent.GetIndex() < iter->nStart) { if (rEnd.nNode.GetIndex() < iter->pNode->GetIndex() - || (&rEnd.nNode.GetNode() == iter->pNode && rEnd.nContent.GetIndex() <= iter->nStart)) + || (&rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() <= iter->nStart)) { break; // deleted - skip it } @@ -937,9 +937,9 @@ static void InitBookmarks( auto const iterNext(iter + 1); if (rStart.nContent.GetIndex() == iter->nEnd && (iterNext == end - ? &rEnd.nNode.GetNode() == iter->pNode + ? &rEnd.GetNode() == iter->pNode : (rEnd.nNode.GetIndex() < iterNext->pNode->GetIndex() - || (&rEnd.nNode.GetNode() == iterNext->pNode && rEnd.nContent.GetIndex() < iterNext->nStart)))) + || (&rEnd.GetNode() == iterNext->pNode && rEnd.nContent.GetIndex() < iterNext->nStart)))) { break; // deleted - skip it } @@ -974,19 +974,19 @@ static void InitBookmarks( case SwScriptInfo::MarkKind::End: { SwPosition const& rEnd(it.first->GetMarkEnd()); - assert(&rEnd.nNode.GetNode() == pNode); + assert(&rEnd.GetNode() == pNode); while (true) { if (iter == end - || &rEnd.nNode.GetNode() != iter->pNode // iter moved to next node + || &rEnd.GetNode() != iter->pNode // iter moved to next node || rEnd.nContent.GetIndex() <= iter->nStart) { SwPosition const& rStart(it.first->GetMarkStart()); // oPrevIter may point to pNode or a preceding node if (oPrevIter ? ((*oPrevIter)->pNode->GetIndex() < rStart.nNode.GetIndex() - || ((*oPrevIter)->pNode == &rStart.nNode.GetNode() - && ((iter != end && &rEnd.nNode.GetNode() == iter->pNode && rEnd.nContent.GetIndex() == iter->nStart) + || ((*oPrevIter)->pNode == &rStart.GetNode() + && ((iter != end && &rEnd.GetNode() == iter->pNode && rEnd.nContent.GetIndex() == iter->nStart) ? (*oPrevIter)->nEnd < rStart.nContent.GetIndex() : (*oPrevIter)->nEnd <= rStart.nContent.GetIndex()))) : rStart.nNode == rEnd.nNode) @@ -1018,10 +1018,10 @@ static void InitBookmarks( case SwScriptInfo::MarkKind::Point: { SwPosition const& rPos(it.first->GetMarkPos()); - assert(&rPos.nNode.GetNode() == pNode); + assert(&rPos.GetNode() == pNode); while (iter != end) { - if (&rPos.nNode.GetNode() != iter->pNode // iter moved to next node + if (&rPos.GetNode() != iter->pNode // iter moved to next node || rPos.nContent.GetIndex() < iter->nStart) { break; // deleted - skip it diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index fcf0ac5a86be..08f62d47213f 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -116,7 +116,7 @@ public: // assert(IDocumentRedlineAccess::IsHideChanges(rIDRA.GetRedlineFlags())); continue; } - if (pStart->nNode.GetNode().IsTableNode()) + if (pStart->GetNode().IsTableNode()) { assert(pEnd->nNode == m_Start.nNode && pEnd->nContent.GetIndex() == 0); continue; // known pathology, ignore it @@ -136,7 +136,7 @@ public: sal_Unicode const magic(m_eFieldmarkMode == sw::FieldmarkMode::ShowResult ? CH_TXT_ATR_FIELDSTART : CH_TXT_ATR_FIELDSEP); - SwTextNode* pTextNode = m_pEndPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pEndPos->GetNode().GetTextNode(); sal_Int32 const nPos = pTextNode ? pTextNode->GetText().indexOf( magic, m_pEndPos->nContent.GetIndex()) : -1; if (nPos != -1) @@ -227,13 +227,13 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, SwPosition const*const pStart(iter.GetStartPos()); SwPosition const*const pEnd(iter.GetEndPos()); bHaveRedlines = true; - assert(pNode != &rTextNode || &pStart->nNode.GetNode() == &rTextNode); // detect calls with wrong start node + assert(pNode != &rTextNode || &pStart->GetNode() == &rTextNode); // detect calls with wrong start node if (pStart->nContent != nLastEnd) // not 0 so we eliminate adjacent deletes { extents.emplace_back(pNode, nLastEnd, pStart->nContent.GetIndex()); mergedText.append(pNode->GetText().subView(nLastEnd, pStart->nContent.GetIndex() - nLastEnd)); } - if (&pEnd->nNode.GetNode() != pNode) + if (&pEnd->GetNode() != pNode) { if (pNode == &rTextNode) { @@ -270,7 +270,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, } // note: in DelLastPara() case, the end node is not actually merged // and is likely a SwTableNode! - if (!pEnd->nNode.GetNode().IsTextNode()) + if (!pEnd->GetNode().IsTextNode()) { assert(pEnd->nNode != pStart->nNode); // must set pNode too because it will mark the last node @@ -284,7 +284,7 @@ CheckParaRedlineMerge(SwTextFrame & rFrame, SwTextNode & rTextNode, } else { - pNode = pEnd->nNode.GetNode().GetTextNode(); + pNode = pEnd->GetNode().GetTextNode(); nodes.push_back(pNode); pNode->SetRedlineMergeFlag(SwNode::Merge::NonFirst); nLastEnd = pEnd->nContent.GetIndex(); diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 758eb0bd99e1..0a15401eb917 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -344,11 +344,11 @@ namespace sw { GetParaPropsPos(SwRootFrame const& rLayout, SwPosition const& rPos) { SwPosition pos(rPos); - SwTextNode const*const pNode(pos.nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(pos.GetNode().GetTextNode()); if (pNode) { pos.nNode = *sw::GetParaPropsNode(rLayout, *pNode); - pos.nContent.Assign(pos.nNode.GetNode().GetContentNode(), 0); + pos.nContent.Assign(pos.GetNode().GetContentNode(), 0); } return pos; } @@ -1269,7 +1269,7 @@ TextFrameIndex SwTextFrame::MapModelToView(SwTextNode const*const pNode, sal_Int TextFrameIndex SwTextFrame::MapModelToViewPos(SwPosition const& rPos) const { - SwTextNode const*const pNode(rPos.nNode.GetNode().GetTextNode()); + SwTextNode const*const pNode(rPos.GetNode().GetTextNode()); sal_Int32 const nIndex(rPos.nContent.GetIndex()); return MapModelToView(pNode, nIndex); } @@ -1502,7 +1502,7 @@ bool sw_HideObj( const SwTextFrame& _rFrame, pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) && _rFrame.IsInDocBody() && !_rFrame.FindNextCnt() ) { - SwTextNode const& rNode(*rAnchorPos.nNode.GetNode().GetTextNode()); + SwTextNode const& rNode(*rAnchorPos.GetNode().GetTextNode()); assert(FrameContainsNode(_rFrame, rNode.GetIndex())); sal_Int32 const nObjAnchorPos(rAnchorPos.nContent.GetIndex()); const sal_Unicode cAnchorChar = nObjAnchorPos < rNode.Len() @@ -1599,7 +1599,7 @@ void SwTextFrame::HideAndShowObjects() sal_Int32 nHiddenEnd; const SwPosition& rAnchor = pContact->GetContentAnchor(); SwScriptInfo::GetBoundsOfHiddenRange( - *rAnchor.nNode.GetNode().GetTextNode(), + *rAnchor.GetNode().GetTextNode(), rAnchor.nContent.GetIndex(), nHiddenStart, nHiddenEnd); // Under certain conditions if ( nHiddenStart != COMPLETE_STRING && bShouldBeHidden && diff --git a/sw/source/core/txtnode/SwGrammarContact.cxx b/sw/source/core/txtnode/SwGrammarContact.cxx index 0b3b49da48e4..e2c1049f42ec 100644 --- a/sw/source/core/txtnode/SwGrammarContact.cxx +++ b/sw/source/core/txtnode/SwGrammarContact.cxx @@ -92,7 +92,7 @@ IMPL_LINK( SwGrammarContact, TimerRepaint, Timer *, pTimer, void ) void SwGrammarContact::updateCursorPosition( const SwPosition& rNewPos ) { CheckBroadcaster(); - SwTextNode* pTextNode = rNewPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = rNewPos.GetNode().GetTextNode(); if( pTextNode == m_pTextNode ) // paragraph has been changed return; diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index d337c5f48e81..e46487004633 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -144,7 +144,7 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) SwFrameFormat* pFormat = GetFlyCnt().GetFrameFormat(); SwFormatAnchor aAnchor( pFormat->GetAnchor() ); SwNode *const pOldNode(aAnchor.GetContentAnchor() - ? &aAnchor.GetContentAnchor()->nNode.GetNode() + ? &aAnchor.GetContentAnchor()->GetNode() : nullptr); if (!pOldNode || !pOldNode->GetNodes().IsDocNodes() || @@ -188,7 +188,7 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) // tdf#91228 must notify the anchor nodes despite LockModify assert(pOldNode); pOldNode->RemoveAnchoredFly(pFormat); - aPos.nNode.GetNode().AddAnchoredFly(pFormat); + aPos.GetNode().AddAnchoredFly(pFormat); pFormat->UnlockModify(); } else @@ -229,7 +229,7 @@ void SwTextFlyCnt::SetAnchor( const SwTextNode *pNode ) if (bIsInSplitNode) { pOldNode->RemoveAnchoredFly(pTextBox); - aPos.nNode.GetNode().AddAnchoredFly(pTextBox); + aPos.GetNode().AddAnchoredFly(pTextBox); pTextBox->UnlockModify(); } else diff --git a/sw/source/core/txtnode/modeltoviewhelper.cxx b/sw/source/core/txtnode/modeltoviewhelper.cxx index 3796ff1e3e34..ed2b7bc8421a 100644 --- a/sw/source/core/txtnode/modeltoviewhelper.cxx +++ b/sw/source/core/txtnode/modeltoviewhelper.cxx @@ -119,7 +119,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, { pFieldMark = rIDMA.getFieldmarkFor(*cursor.GetPoint()); if (pFieldMark == nullptr - || pFieldMark->GetMarkStart().nNode.GetNode().GetTextNode()->GetText()[ + || pFieldMark->GetMarkStart().GetNode().GetTextNode()->GetText()[ pFieldMark->GetMarkStart().nContent.GetIndex()] != CH_TXT_ATR_FORMELEMENT) { @@ -135,7 +135,7 @@ ModelToViewHelper::ModelToViewHelper(const SwTextNode &rNode, { break; } - assert(pFieldMark->GetMarkStart().nNode.GetNode().GetTextNode()->GetText()[pFieldMark->GetMarkStart().nContent.GetIndex()] != CH_TXT_ATR_FORMELEMENT); + assert(pFieldMark->GetMarkStart().GetNode().GetTextNode()->GetText()[pFieldMark->GetMarkStart().nContent.GetIndex()] != CH_TXT_ATR_FORMELEMENT); // getFieldmarkFor may also return one that starts at rNode,0 - // skip it, must be handled in loop below if (pFieldMark->GetMarkStart().nNode < rNode) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 6ae44f14b040..3df1f05aa24a 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1427,7 +1427,7 @@ void SwTextNode::Update( if ( pRedl->HasMark() ) { SwPosition* const pEnd = pRedl->End(); - if ( this == &pEnd->nNode.GetNode() && + if ( this == &pEnd->GetNode() && *pRedl->GetPoint() != *pRedl->GetMark() ) { SwContentIndex & rIdx = pEnd->nContent; @@ -1437,7 +1437,7 @@ void SwTextNode::Update( } } } - else if ( this == &pRedl->GetPoint()->nNode.GetNode() ) + else if ( this == &pRedl->GetPoint()->GetNode() ) { SwContentIndex & rIdx = pRedl->GetPoint()->nContent; if (nChangePos == rIdx.GetIndex()) @@ -1446,7 +1446,7 @@ void SwTextNode::Update( } // the unused position must not be on a SwTextNode bool const isOneUsed(&pRedl->GetBound() == pRedl->GetPoint()); - assert(!pRedl->GetBound(!isOneUsed).nNode.GetNode().IsTextNode()); + assert(!pRedl->GetBound(!isOneUsed).GetNode().IsTextNode()); assert(!pRedl->GetBound(!isOneUsed).nContent.GetContentNode()); (void)isOneUsed; } } @@ -1472,7 +1472,7 @@ void SwTextNode::Update( continue; const SwPosition* pEnd = &pMark->GetMarkEnd(); SwContentIndex & rEndIdx = const_cast<SwContentIndex&>(pEnd->nContent); - if( this == &pEnd->nNode.GetNode() && + if( this == &pEnd->GetNode() && rPos.GetIndex() == rEndIdx.GetIndex() ) { if (&rEndIdx == next) // nasty corner case: @@ -1489,7 +1489,7 @@ void SwTextNode::Update( if ( pMark->IsExpanded() ) { const SwPosition* pStart = &pMark->GetMarkStart(); - if ( this == &pStart->nNode.GetNode() + if ( this == &pStart->GetNode() && rPos.GetIndex() == pStart->nContent.GetIndex() ) { bAtLeastOneExpandedBookmarkAtInsertionPosition = true; @@ -1514,7 +1514,7 @@ void SwTextNode::Update( { // The fly is at-char anchored and has an anchor position. SwContentIndex& rEndIdx = const_cast<SwContentIndex&>(pContentAnchor->nContent); - if (&pContentAnchor->nNode.GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) + if (&pContentAnchor->GetNode() == this && rEndIdx.GetIndex() == rPos.GetIndex()) { // The anchor position is exactly our insert position. rEndIdx.Assign(&aTmpIdxReg, rEndIdx.GetIndex()); @@ -1539,7 +1539,7 @@ void SwTextNode::Update( continue; SwContentIndex& rIndex = pCursor->Start()->nContent; - if (&pCursor->Start()->nNode.GetNode() == this && rIndex.GetIndex() == rPos.GetIndex()) + if (&pCursor->Start()->GetNode() == this && rIndex.GetIndex() == rPos.GetIndex()) { // The cursor position of this other shell is exactly our insert position. rIndex.Assign(&aTmpIdxReg, rIndex.GetIndex()); @@ -1592,7 +1592,7 @@ void SwTextNode::Update( SwRangeRedline* pRedln = rTable[nRedlnPos]; if (pRedln->HasMark()) { - if (this == &pRedln->End()->nNode.GetNode() && *pRedln->GetPoint() != *pRedln->GetMark()) + if (this == &pRedln->End()->GetNode() && *pRedln->GetPoint() != *pRedln->GetMark()) { // Redline is changed only when some change occurs before it if (nChangePos <= pRedln->Start()->nContent.GetIndex()) @@ -1601,7 +1601,7 @@ void SwTextNode::Update( } } } - else if (this == &pRedln->GetPoint()->nNode.GetNode()) + else if (this == &pRedln->GetPoint()->GetNode()) SwRedlineTable::LOKRedlineNotification(RedlineNotification::Modify, pRedln); } } @@ -4360,7 +4360,7 @@ void SwTextNode::AddToList() const SwRedlineTable& rRedTable = GetDoc().getIDocumentRedlineAccess().GetRedlineTable(); SwRedlineTable::size_type nRedlPos = GetDoc().getIDocumentRedlineAccess().GetRedlinePos(*this, RedlineType::Insert); // paragraph start is not in a tracked insertion - if ( SwRedlineTable::npos == nRedlPos || GetIndex() <= rRedTable[nRedlPos]->Start()->nNode.GetNode().GetIndex() ) + if ( SwRedlineTable::npos == nRedlPos || GetIndex() <= rRedTable[nRedlPos]->Start()->GetNode().GetIndex() ) { AddToListOrig(); diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 7f0e0ea12edb..0d0f388abc37 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -667,7 +667,7 @@ static sal_Int32 clipIndexBounds(const OUString &rStr, sal_Int32 nPos) OUString SwTextFrame::GetCurWord(SwPosition const& rPos) const { TextFrameIndex const nPos(MapModelToViewPos(rPos)); - SwTextNode *const pTextNode(rPos.nNode.GetNode().GetTextNode()); + SwTextNode *const pTextNode(rPos.GetNode().GetTextNode()); assert(pTextNode); OUString const& rText(GetText()); assert(sal_Int32(nPos) <= rText.getLength()); // invalid index diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 99ddf6bbfbdf..b7347301ddee 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -445,7 +445,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) // To prevent that, first detach the connection between attribute and // format. const SwPosition *pPos = rOldAnch.GetContentAnchor(); - SwTextNode *pTextNode = static_cast<SwTextNode*>(&pPos->nNode.GetNode()); + SwTextNode *pTextNode = static_cast<SwTextNode*>(&pPos->GetNode()); OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -489,7 +489,7 @@ bool SwUndoFormatAttr::RestoreFlyAnchor(::sw::UndoRedoContext & rContext) if (RndStdIds::FLY_AS_CHAR == aNewAnchor.GetAnchorId()) { const SwPosition* pPos = aNewAnchor.GetContentAnchor(); - SwTextNode* pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "no Text Node at position." ); SwFormatFlyCnt aFormat( pFrameFormat ); pTextNd->InsertItem( aFormat, pPos->nContent.GetIndex(), 0 ); @@ -1041,7 +1041,7 @@ void SwUndoDontExpandFormat::UndoImpl(::sw::UndoRedoContext & rContext) SwPosition& rPos = *pPam->GetPoint(); rPos.nNode = m_nNodeIndex; - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), m_nContentIndex); + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), m_nContentIndex); pDoc->DontExpandFormat( rPos, false ); } @@ -1052,7 +1052,7 @@ void SwUndoDontExpandFormat::RedoImpl(::sw::UndoRedoContext & rContext) SwPosition& rPos = *pPam->GetPoint(); rPos.nNode = m_nNodeIndex; - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), m_nContentIndex); + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), m_nContentIndex); pDoc->DontExpandFormat( rPos ); } diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 884aab114253..79e95faa35e5 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -251,10 +251,10 @@ SwUndoDelete::SwUndoDelete( SwTextNode *pSttTextNd = nullptr, *pEndTextNd = nullptr; if( !bFullPara ) { - pSttTextNd = pStt->nNode.GetNode().GetTextNode(); + pSttTextNd = pStt->GetNode().GetTextNode(); pEndTextNd = m_nSttNode == m_nEndNode ? pSttTextNd - : pEnd->nNode.GetNode().GetTextNode(); + : pEnd->GetNode().GetTextNode(); } else if (m_pRedlSaveData) { @@ -553,7 +553,7 @@ bool SwUndoDelete::CanGrouping( SwDoc& rDoc, const SwPaM& rDelPam ) return false; // are both Nodes (Node/Undo array) TextNodes at all? - SwTextNode * pDelTextNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode * pDelTextNd = pStt->GetNode().GetTextNode(); if( !pDelTextNd ) return false; sal_Int32 nUChrPos = m_bBackSp ? 0 : m_aSttStr->getLength()-1; @@ -889,7 +889,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) { // discard attributes since they all saved! SwTextNode * pTextNd; - if (!m_bDelFullPara && aPos.nNode.GetNode().IsSectionNode()) + if (!m_bDelFullPara && aPos.GetNode().IsSectionNode()) { // tdf#134250 section node wasn't deleted; but aPos must point to it in bNodeMove case below assert(m_nSttContent == 0); assert(!m_aSttStr); @@ -897,7 +897,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) } else { - pTextNd = aPos.nNode.GetNode().GetTextNode(); + pTextNd = aPos.GetNode().GetTextNode(); } if( pTextNd && pTextNd->HasSwAttrSet() ) @@ -916,7 +916,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) // => selection backwards needs a correction. if( m_bBackSp ) lcl_ReAnchorAtContentFlyFrames(*rDoc.GetSpzFrameFormats(), aPos, nOldIdx); - pTextNd = aPos.nNode.GetNode().GetTextNode(); + pTextNd = aPos.GetNode().GetTextNode(); } assert(pTextNd); // else where does m_aEndStr come from? if( pTextNd ) @@ -931,7 +931,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) } else if (m_aSttStr && bNodeMove && pInsNd == nullptr) { - SwTextNode * pNd = aPos.nNode.GetNode().GetTextNode(); + SwTextNode * pNd = aPos.GetNode().GetTextNode(); if( pNd ) { if (m_nSttContent < pNd->GetText().getLength()) @@ -952,7 +952,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) if( m_bJoinNext ) { nMoveIndex += m_nSectDiff + 1; - pMovedNode = &aPos.nNode.GetNode(); + pMovedNode = &aPos.GetNode(); } else { @@ -963,7 +963,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) SwNodeRange aRg( aPos.nNode, SwNodeOffset(0) - nDiff, aPos.nNode, SwNodeOffset(1) - nDiff ); --aPos.nNode; if( !m_bJoinNext ) - pMovedNode = &aPos.nNode.GetNode(); + pMovedNode = &aPos.GetNode(); rDoc.GetNodes().MoveNodes(aRg, rDoc.GetNodes(), aMvIdx); ++aPos.nNode; } @@ -993,7 +993,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) } SwNodeIndex aMvIdx(rDoc.GetNodes(), nMoveIndex); SwNodeRange aRg( aPos.nNode, SwNodeOffset(0), aPos.nNode, SwNodeOffset(1) ); - pMovedNode = &aPos.nNode.GetNode(); + pMovedNode = &aPos.GetNode(); // tdf#131684 without deleting frames rDoc.GetNodes().MoveNodes(aRg, rDoc.GetNodes(), aMvIdx, false); rDoc.GetNodes().Delete( aMvIdx); @@ -1003,7 +1003,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) if( m_aSttStr ) { aPos.nNode = m_nSttNode - m_nNdDiff + ( m_bJoinNext ? SwNodeOffset(0) : m_nReplaceDummy ); - SwTextNode * pTextNd = aPos.nNode.GetNode().GetTextNode(); + SwTextNode * pTextNd = aPos.GetNode().GetTextNode(); // If more than a single Node got deleted, also all "Node" // attributes were saved if (pTextNd != nullptr) diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 5e9d0053b15e..a4f03c2a9c74 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -154,7 +154,7 @@ void SwUndo::RemoveIdxRel( SwNodeOffset nIdx, const SwPosition& rPos ) { // Move only the Cursor. Bookmarks/TOXMarks/etc. are done by the corresponding // JoinNext/JoinPrev - SwNodeIndex aIdx( rPos.nNode.GetNode().GetNodes(), nIdx ); + SwNodeIndex aIdx( rPos.GetNode().GetNodes(), nIdx ); ::PaMCorrRel( aIdx, rPos ); } @@ -799,7 +799,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, SwNodeOffset nNodeIdx, // delete the last Node as well if( !aPaM.GetPoint()->nContent.GetIndex() || ( aPaM.GetPoint()->nNode++ && // still empty Nodes at the end? - &rNds.GetEndOfExtras() != &aPaM.GetPoint()->nNode.GetNode() )) + &rNds.GetEndOfExtras() != &aPaM.GetPoint()->GetNode() )) { aPaM.GetPoint()->nContent.Assign( nullptr, 0 ); aPaM.SetMark(); @@ -869,7 +869,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, const SwPosition *pStt = rMark < rPoint ? &rMark : &rPoint, *pEnd = &rMark == pStt ? &rPoint : &rMark; - SwDoc& rDoc = rMark.nNode.GetNode().GetDoc(); + SwDoc& rDoc = rMark.GetNode().GetDoc(); // if it's not in the doc array, probably missing some invalidation somewhere assert(&rPoint.GetNodes() == &rDoc.GetNodes()); @@ -895,10 +895,10 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, { const sal_Int32 nFootnoteSttIdx = pSrch->GetStart(); if( (DelContentType::CheckNoCntnt & nDelContentType ) - ? (&pEnd->nNode.GetNode() == pFootnoteNd ) - : (( &pStt->nNode.GetNode() == pFootnoteNd && + ? (&pEnd->GetNode() == pFootnoteNd ) + : (( &pStt->GetNode() == pFootnoteNd && pStt->nContent.GetIndex() > nFootnoteSttIdx) || - ( &pEnd->nNode.GetNode() == pFootnoteNd && + ( &pEnd->GetNode() == pFootnoteNd && nFootnoteSttIdx >= pEnd->nContent.GetIndex() )) ) { ++nPos; // continue searching @@ -925,9 +925,9 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, { const sal_Int32 nFootnoteSttIdx = pSrch->GetStart(); if( !(DelContentType::CheckNoCntnt & nDelContentType) && ( - ( &pStt->nNode.GetNode() == pFootnoteNd && + ( &pStt->GetNode() == pFootnoteNd && pStt->nContent.GetIndex() > nFootnoteSttIdx ) || - ( &pEnd->nNode.GetNode() == pFootnoteNd && + ( &pEnd->GetNode() == pFootnoteNd && nFootnoteSttIdx >= pEnd->nContent.GetIndex() ))) continue; // continue searching @@ -975,7 +975,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, if( !m_pHistory ) m_pHistory.reset( new SwHistory ); SwTextNode *const pTextNd = - pAPos->nNode.GetNode().GetTextNode(); + pAPos->GetNode().GetTextNode(); SwTextAttr* const pFlyHint = pTextNd->GetTextAttrForCharAt( pAPos->nContent.GetIndex()); assert(pFlyHint); @@ -1012,7 +1012,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, (rPoint.nNode.GetIndex() == pAPos->nNode.GetIndex() || pStt->nNode.GetIndex() == pAPos->nNode.GetIndex()) // Do not try to move the anchor to a table! - && rMark.nNode.GetNode().IsTextNode()) + && rMark.GetNode().IsTextNode()) { m_pHistory->AddChangeFlyAnchor(*pFormat); SwFormatAnchor aAnch( *pAnchor ); @@ -1045,7 +1045,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, // These are the objects anchored // between section start and end position // Do not try to move the anchor to a table! - if( rMark.nNode.GetNode().GetTextNode() ) + if( rMark.GetNode().GetTextNode() ) { m_pHistory->AddChangeFlyAnchor(*pFormat); SwFormatAnchor aAnch( *pAnchor ); @@ -1141,7 +1141,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, && !(nDelContentType & DelContentType::Replace) && type == IDocumentMarkAccess::MarkType::BOOKMARK && pStt->nContent == 0 // entire paragraph deleted? - && pEnd->nContent == pEnd->nNode.GetNode().GetTextNode()->Len())) + && pEnd->nContent == pEnd->GetNode().GetTextNode()->Len())) { if( bMaybe ) bSavePos = true; @@ -1155,14 +1155,14 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, // certain special handling for cross-reference bookmarks const bool bDifferentTextNodesAtMarkAndPoint = rMark.nNode != rPoint.nNode - && rMark.nNode.GetNode().GetTextNode() - && rPoint.nNode.GetNode().GetTextNode(); + && rMark.GetNode().GetTextNode() + && rPoint.GetNode().GetTextNode(); if ( bDifferentTextNodesAtMarkAndPoint ) { // delete cross-reference bookmark at <pStt>, if only part of // <pEnd> text node content is deleted. if( pStt->nNode == pBkmk->GetMarkPos().nNode - && pEnd->nContent.GetIndex() != pEnd->nNode.GetNode().GetTextNode()->Len() ) + && pEnd->nContent.GetIndex() != pEnd->GetNode().GetTextNode()->Len() ) { bSavePos = true; bSaveOtherPos = false; // cross-reference bookmarks are not expanded @@ -1253,8 +1253,8 @@ void SwUndoSaveSection::SaveSection( { // move certain indexes out of deleted range - SwNodeIndex aSttIdx( aPam.Start()->nNode.GetNode() ); - SwNodeIndex aEndIdx( aPam.End()->nNode.GetNode() ); + SwNodeIndex aSttIdx( aPam.Start()->GetNode() ); + SwNodeIndex aEndIdx( aPam.End()->GetNode() ); SwNodeIndex aMvStt( aEndIdx, 1 ); SwDoc::CorrAbs( aSttIdx, aEndIdx, SwPosition( aMvStt ), true ); } @@ -1375,7 +1375,7 @@ SwRedlineSaveData::SwRedlineSaveData( } #if OSL_DEBUG_LEVEL > 0 - m_nRedlineCount = rSttPos.nNode.GetNode().GetDoc().getIDocumentRedlineAccess().GetRedlineTable().size(); + m_nRedlineCount = rSttPos.GetNode().GetDoc().getIDocumentRedlineAccess().GetRedlineTable().size(); m_bRedlineMoved = rRedl.IsMoved(); #endif } @@ -1560,7 +1560,7 @@ OUString ShortenString(const OUString & rStr, sal_Int32 nLength, const OUString static bool IsAtEndOfSection(SwPosition const& rAnchorPos) { - SwNodeIndex node(*rAnchorPos.nNode.GetNode().EndOfSectionNode()); + SwNodeIndex node(*rAnchorPos.GetNode().EndOfSectionNode()); SwContentNode *const pNode(SwNodes::GoPrevious(&node)); assert(pNode); assert(rAnchorPos.nNode <= node); // last valid anchor pos is last content @@ -1572,7 +1572,7 @@ static bool IsAtEndOfSection(SwPosition const& rAnchorPos) static bool IsAtStartOfSection(SwPosition const& rAnchorPos) { SwNodes const& rNodes(rAnchorPos.GetNodes()); - SwNodeIndex node(*rAnchorPos.nNode.GetNode().StartOfSectionNode()); + SwNodeIndex node(*rAnchorPos.GetNode().StartOfSectionNode()); SwContentNode *const pNode(rNodes.GoNext(&node)); assert(pNode); (void) pNode; @@ -1583,13 +1583,13 @@ static bool IsAtStartOfSection(SwPosition const& rAnchorPos) /// passed start / end position could be on section start / end node static bool IsAtEndOfSection2(SwPosition const& rPos) { - return rPos.nNode.GetNode().IsEndNode() + return rPos.GetNode().IsEndNode() || IsAtEndOfSection(rPos); } static bool IsAtStartOfSection2(SwPosition const& rPos) { - return rPos.nNode.GetNode().IsStartNode() + return rPos.GetNode().IsStartNode() || IsAtStartOfSection(rPos); } @@ -1601,7 +1601,7 @@ static bool IsNotBackspaceHeuristic( return true; if (rEnd.nContent != 0) return true; - const SwTextNode* pTextNode = rStart.nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNode = rStart.GetNode().GetTextNode(); if (!pTextNode || rStart.nContent != pTextNode->Len()) return true; return false; @@ -1643,7 +1643,7 @@ bool IsDestroyFrameAnchoredAtChar(SwPosition const & rAnchorPos, && ((rAnchorPos < rEnd) || (rAnchorPos == rEnd // special case: fully deleted node - && ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.nNode.GetNode().GetTextNode()->Len() + && ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.GetNode().GetTextNode()->Len() && IsNotBackspaceHeuristic(rStart, rEnd)) || (IsAtEndOfSection(rAnchorPos) && IsAtStartOfSection2(rStart))))); } @@ -1685,7 +1685,7 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & rAnchorPos, || (rAnchorPos.nNode == rEnd.nNode && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd) // special case: fully deleted node - && ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.nNode.GetNode().GetTextNode()->Len() + && ((rEnd.nNode != rStart.nNode && rEnd.nContent == rEnd.GetNode().GetTextNode()->Len() && IsNotBackspaceHeuristic(rStart, rEnd)) || (IsAtEndOfSection2(rEnd) && IsAtStartOfSection2(rStart))))); } diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index acfd5e76b3c3..0273160da340 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -119,7 +119,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame) aNewPos.nNode = m_nNodePagePos; if ((RndStdIds::FLY_AS_CHAR == m_nRndId) || (RndStdIds::FLY_AT_CHAR == m_nRndId)) { - aNewPos.nContent.Assign( aNewPos.nNode.GetNode().GetContentNode(), + aNewPos.nContent.Assign( aNewPos.GetNode().GetContentNode(), m_nContentPos ); } aAnchor.SetAnchor( &aNewPos ); @@ -141,7 +141,7 @@ void SwUndoFlyBase::InsFly(::sw::UndoRedoContext & rContext, bool bShowSelFrame) if (RndStdIds::FLY_AS_CHAR == m_nRndId) { // there must be at least the attribute in a TextNode - SwContentNode* pCNd = aAnchor.GetContentAnchor()->nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = aAnchor.GetContentAnchor()->GetNode().GetContentNode(); OSL_ENSURE( pCNd->IsTextNode(), "no Text Node at position." ); SwFormatFlyCnt aFormat( m_pFrameFormat ); pCNd->GetTextNode()->InsertItem(aFormat, m_nContentPos, m_nContentPos, SetAttrMode::NOHINTEXPAND); @@ -245,7 +245,7 @@ void SwUndoFlyBase::DelFly( SwDoc* pDoc ) { m_nNodePagePos = pPos->nNode.GetIndex(); m_nContentPos = pPos->nContent.GetIndex(); - SwTextNode *const pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *const pTextNd = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "No Textnode found" ); SwTextFlyCnt* const pAttr = static_cast<SwTextFlyCnt*>( pTextNd->GetTextAttrForCharAt( m_nContentPos, RES_TXTATR_FLYCNT ) ); @@ -596,7 +596,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext) // also the format. To prevent that, first detach the // connection between attribute and format. const SwPosition *pPos = rOldAnch.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); OSL_ENSURE( pTextNode->HasHints(), "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * pHint = pTextNode->GetTextAttrForCharAt( @@ -622,7 +622,7 @@ void SwUndoSetFlyFormat::UndoImpl(::sw::UndoRedoContext & rContext) { const SwPosition* pPos = aNewAnchor.GetContentAnchor(); SwFormatFlyCnt aFormat( m_pFrameFormat ); - pPos->nNode.GetNode().GetTextNode()->InsertItem( aFormat, + pPos->GetNode().GetTextNode()->InsertItem( aFormat, m_nOldContent, 0 ); } diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index 762a2c12d5b2..ffd6830675e0 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -149,7 +149,7 @@ bool SwUndoInsert::CanGrouping( const SwPosition& rPos ) m_nContent == rPos.nContent.GetIndex() ) { // consider Redline - SwDoc& rDoc = rPos.nNode.GetNode().GetDoc(); + SwDoc& rDoc = rPos.GetNode().GetDoc(); if( ( ~RedlineFlags::ShowMask & rDoc.getIDocumentRedlineAccess().GetRedlineFlags() ) == ( ~RedlineFlags::ShowMask & GetRedlineFlags() ) ) { @@ -281,7 +281,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) pPam->GetPoint()->nNode = nNd; pPam->GetPoint()->nContent.Assign( - pPam->GetPoint()->nNode.GetNode().GetContentNode(), nCnt ); + pPam->GetPoint()->GetNode().GetContentNode(), nCnt ); } maUndoText.reset(); @@ -319,7 +319,7 @@ void SwUndoInsert::RedoImpl(::sw::UndoRedoContext & rContext) { pPam->GetPoint()->nNode = m_nNode; SwContentNode *const pCNd = - pPam->GetPoint()->nNode.GetNode().GetContentNode(); + pPam->GetPoint()->GetNode().GetContentNode(); pPam->GetPoint()->nContent.Assign( pCNd, m_nContent ); if( m_nLen ) @@ -595,7 +595,7 @@ SwUndoReplace::Impl::Impl( m_bSplitNext = m_nSttNd != pEnd->nNode.GetIndex(); - SwTextNode* pNd = pStt->nNode.GetNode().GetTextNode(); + SwTextNode* pNd = pStt->GetNode().GetTextNode(); OSL_ENSURE( pNd, "Dude, where's my TextNode?" ); m_pHistory.reset( new SwHistory ); @@ -618,7 +618,7 @@ SwUndoReplace::Impl::Impl( m_pHistory->CopyFormatAttr( *pNd->GetpSwAttrSet(), nNewPos ); m_pHistory->Add( pNd->GetTextColl(), nNewPos, SwNodeType::Text ); - SwTextNode* pNext = pEnd->nNode.GetNode().GetTextNode(); + SwTextNode* pNext = pEnd->GetNode().GetTextNode(); SwNodeOffset nTmp = pNext->GetIndex(); m_pHistory->CopyAttr( pNext->GetpSwpHints(), nTmp, 0, pNext->GetText().getLength(), true ); @@ -673,7 +673,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext) assert(ret); (void)ret; if (m_nSttNd != m_nEndNd) { // in case of regex inserting paragraph breaks, join nodes... - assert(rPam.GetMark()->nContent == rPam.GetMark()->nNode.GetNode().GetTextNode()->Len()); + assert(rPam.GetMark()->nContent == rPam.GetMark()->GetNode().GetTextNode()->Len()); rPam.GetPoint()->nNode = m_nEndNd - m_nOffset; rPam.GetPoint()->nContent.Assign(rPam.GetContentNode(true), m_nEndCnt); pDoc->getIDocumentContentOperations().DeleteAndJoin(rPam); @@ -720,7 +720,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext) } rPam.GetPoint()->nNode = m_nSttNd; - rPam.GetPoint()->nContent.Assign(rPam.GetPoint()->nNode.GetNode().GetTextNode(), m_nSttCnt); + rPam.GetPoint()->nContent.Assign(rPam.GetPoint()->GetNode().GetTextNode(), m_nSttCnt); } void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext) @@ -730,14 +730,14 @@ void SwUndoReplace::Impl::RedoImpl(::sw::UndoRedoContext & rContext) rPam.DeleteMark(); rPam.GetPoint()->nNode = m_nSttNd; - SwTextNode* pNd = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pNd = rPam.GetPoint()->GetNode().GetTextNode(); OSL_ENSURE( pNd, "Dude, where's my TextNode?" ); rPam.GetPoint()->nContent.Assign( pNd, m_nSttCnt ); rPam.SetMark(); if( m_bSplitNext ) { rPam.GetPoint()->nNode = m_nSttNd + 1; - pNd = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + pNd = rPam.GetPoint()->GetNode().GetTextNode(); } rPam.GetPoint()->nContent.Assign( pNd, m_nSelEnd ); @@ -966,7 +966,7 @@ void SwUndoInsertLabel::RepeatImpl(::sw::RepeatContext & rContext) SwNodeOffset nIdx(0); - SwContentNode* pCNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = rPos.GetNode().GetContentNode(); if( pCNd ) switch( m_eType ) { diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index 90dff3098d5f..d91617394de7 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -71,7 +71,7 @@ SwUndoMove::SwUndoMove( const SwPaM& rRange, const SwPosition& rMvPos ) m_pHistory->CopyFormatAttr( *pEndTextNd->GetpSwAttrSet(), m_nEndNode ); } - pTextNd = rMvPos.nNode.GetNode().GetTextNode(); + pTextNd = rMvPos.GetNode().GetTextNode(); if (nullptr != pTextNd) { m_pHistory->Add( pTextNd->GetTextColl(), m_nMoveDestNode, SwNodeType::Text ); @@ -124,7 +124,7 @@ SwUndoMove::SwUndoMove( SwDoc& rDoc, const SwNodeRange& rRg, if( pCNd ) aPtPos.nContent.Assign( pCNd, pCNd->Len() ); SwPosition aMkPos( rRg.aStart ); - pCNd = aMkPos.nNode.GetNode().GetContentNode(); + pCNd = aMkPos.GetNode().GetContentNode(); if( nullptr != pCNd ) aMkPos.nContent.Assign( pCNd, 0 ); @@ -184,7 +184,7 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext) RemoveIdxFromRange( aPam, false ); SwPosition aPos( *pDoc->GetNodes()[ m_nInsPosNode] ); - SwContentNode* pCNd = aPos.nNode.GetNode().GetContentNode(); + SwContentNode* pCNd = aPos.GetNode().GetContentNode(); aPos.nContent.Assign( pCNd, m_nInsPosContent ); if( pCNd->HasSwAttrSet() ) diff --git a/sw/source/core/undo/unnum.cxx b/sw/source/core/undo/unnum.cxx index be0d6f4f4c66..ac2592b3844f 100644 --- a/sw/source/core/undo/unnum.cxx +++ b/sw/source/core/undo/unnum.cxx @@ -45,7 +45,7 @@ SwUndoInsNum::SwUndoInsNum( const SwPaM& rPam, const SwNumRule& rRule ) SwUndoInsNum::SwUndoInsNum( const SwPosition& rPos, const SwNumRule& rRule, const OUString& rReplaceRule ) - : SwUndo( SwUndoId::INSNUM, &rPos.nNode.GetNode().GetDoc() ), + : SwUndo( SwUndoId::INSNUM, &rPos.GetNode().GetDoc() ), m_aNumRule( rRule ), m_sReplaceRule( rReplaceRule ), m_nLRSavePos( 0 ) { @@ -338,7 +338,7 @@ SwUndoNumRuleStart::SwUndoNumRuleStart( const SwPosition& rPos, sal_uInt16 nStt , m_bSetStartValue(true) , m_bFlag(false) { - SwTextNode* pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPos.GetNode().GetTextNode(); if ( pTextNd ) { if ( pTextNd->HasAttrListRestartValue() ) diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 60d2c48a522d..5128eaed3872 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -44,7 +44,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc& rDoc, SwPosition& rPos, : SwUndo(SwUndoId::OVERWRITE, &rDoc), m_bGroup( false ) { - SwTextNode *const pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *const pTextNd = rPos.GetNode().GetTextNode(); assert(pTextNd); sal_Int32 const nTextNdLen = pTextNd->GetText().getLength(); @@ -111,7 +111,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc& rDoc, SwPosition& rPos, return false; // Is the node a TextNode at all? - SwTextNode * pDelTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode * pDelTextNd = rPos.GetNode().GetTextNode(); if( !pDelTextNd || (pDelTextNd->GetText().getLength() != rPos.nContent.GetIndex() && rPos.nContent.GetIndex() != ( m_nStartContent + m_aInsStr.getLength() ))) diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx index 553a6f1e114a..6a57f17fd79c 100644 --- a/sw/source/core/undo/unsect.cxx +++ b/sw/source/core/undo/unsect.cxx @@ -106,7 +106,7 @@ SwUndoInsSection::SwUndoInsSection( if( rPam.HasMark() ) return; - const SwContentNode* pCNd = rPam.GetPoint()->nNode.GetNode().GetContentNode(); + const SwContentNode* pCNd = rPam.GetPoint()->GetNode().GetContentNode(); if( pCNd && pCNd->HasSwAttrSet() && ( !rPam.GetPoint()->nContent.GetIndex() || rPam.GetPoint()->nContent.GetIndex() == pCNd->Len() )) diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 2642ae5f0882..c3c65970efac 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -43,7 +43,7 @@ SwUndoSplitNode::SwUndoSplitNode( SwDoc& rDoc, const SwPosition& rPos, m_nContent( rPos.nContent.GetIndex() ), m_bTableFlag( false ), m_bCheckTableStart( bChkTable ) { - SwTextNode *const pTextNd = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *const pTextNd = rPos.GetNode().GetTextNode(); OSL_ENSURE( pTextNd, "only for TextNode" ); if( pTextNd->GetpSwpHints() ) { @@ -119,7 +119,7 @@ void SwUndoSplitNode::UndoImpl(::sw::UndoRedoContext & rContext) rPam.SetMark(); ++rPam.GetMark()->nNode; rPam.GetMark()->nContent.Assign( rPam.GetMark()-> - nNode.GetNode().GetContentNode(), 0 ); + GetNode().GetContentNode(), 0 ); pDoc->getIDocumentRedlineAccess().DeleteRedline( rPam, true, RedlineType::Any ); rPam.DeleteMark(); } diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 0be28a79d970..c488009c1cf2 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -248,7 +248,7 @@ SwUndoInsTable::SwUndoInsTable( const SwPosition& rPos, sal_uInt16 nCl, sal_uInt m_pAutoFormat.reset( new SwTableAutoFormat( *pTAFormat ) ); // consider redline - SwDoc& rDoc = rPos.nNode.GetNode().GetDoc(); + SwDoc& rDoc = rPos.GetNode().GetDoc(); if( rDoc.getIDocumentRedlineAccess().IsRedlineOn() ) { m_pRedlineData.reset( new SwRedlineData( RedlineType::Insert, rDoc.getIDocumentRedlineAccess().GetRedlineAuthor() ) ); @@ -719,7 +719,7 @@ SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg, const SwPosition* pEnd = rRg.End(); SwNodes& rNds = rRg.GetDoc().GetNodes(); m_bSplitEnd = pEnd->nContent.GetIndex() && ( pEnd->nContent.GetIndex() - != pEnd->nNode.GetNode().GetContentNode()->Len() || + != pEnd->GetNode().GetContentNode()->Len() || pEnd->nNode.GetIndex() >= rNds.GetEndOfContent().GetIndex()-1 ); } @@ -772,7 +772,7 @@ void SwUndoTextToTable::UndoImpl(::sw::UndoRedoContext & rContext) if( m_nSttContent ) { pPos->nNode = nTableNd; - pPos->nContent.Assign(pPos->nNode.GetNode().GetContentNode(), 0); + pPos->nContent.Assign(pPos->GetNode().GetContentNode(), 0); if (aPam.Move(fnMoveBackward, GoInContent)) { SwNodeIndex & rIdx = aPam.GetPoint()->nNode; @@ -2235,7 +2235,7 @@ void SwUndoTableNumFormat::RedoImpl(::sw::UndoRedoContext & rContext) pPam->DeleteMark(); pPam->GetPoint()->nNode = m_nNode; - SwNode * pNd = & pPam->GetPoint()->nNode.GetNode(); + SwNode * pNd = & pPam->GetPoint()->GetNode(); SwStartNode* pSttNd = pNd->FindSttNodeByType( SwTableBoxStartNode ); assert(pSttNd && "without StartNode no TableBox"); SwTableBox* pBox = pSttNd->FindTableNode()->GetTable().GetTableBox( @@ -2691,11 +2691,11 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const // If the content is not merged, the end of the insertion is at the end of the node // _before_ the given position rPos --aInsertEnd.nNode; - pText = aInsertEnd.nNode.GetNode().GetTextNode(); + pText = aInsertEnd.GetNode().GetTextNode(); if( pText ) { aInsertEnd.nContent.Assign(pText, pText->GetText().getLength()); - if( !bRedo && rPos.nNode.GetNode().GetTextNode() ) + if( !bRedo && rPos.GetNode().GetTextNode() ) { // Try to merge, if not called by Redo() rJoin = true; @@ -2713,12 +2713,12 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const SwPosition aDeleteStart( rJoin ? aInsertEnd : rPos ); if( !rJoin ) { - pText = aDeleteStart.nNode.GetNode().GetTextNode(); + pText = aDeleteStart.GetNode().GetTextNode(); if( pText ) aDeleteStart.nContent.Assign( pText, 0 ); } SwPosition aCellEnd( *rBox.GetSttNd()->EndOfSectionNode(), SwNodeOffset(-1) ); - pText = aCellEnd.nNode.GetNode().GetTextNode(); + pText = aCellEnd.GetNode().GetTextNode(); if( pText ) aCellEnd.nContent.Assign(pText, pText->GetText().getLength()); if( aDeleteStart != aCellEnd ) @@ -2734,7 +2734,7 @@ std::unique_ptr<SwUndo> SwUndoTableCpyTable::PrepareRedline( SwDoc* pDoc, const pUndo = std::make_unique<SwUndoDelete>(aTmpPam, SwDeleteFlags::Default, true); } SwPosition aCellStart( *rBox.GetSttNd(), SwNodeOffset(2) ); - pText = aCellStart.nNode.GetNode().GetTextNode(); + pText = aCellStart.GetNode().GetTextNode(); if( pText ) aCellStart.nContent.Assign( pText, 0 ); if( aCellStart != aInsertEnd ) // An empty insertion will not been marked diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index 138e7224bd09..df8f059663cf 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -75,7 +75,7 @@ SwUndoInserts::SwUndoInserts( SwUndoId nUndoId, const SwPaM& rPam ) m_pHistory.reset( new SwHistory ); SwDoc& rDoc = rPam.GetDoc(); - SwTextNode* pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPam.GetPoint()->GetNode().GetTextNode(); if( pTextNd ) { m_pTextFormatColl = pTextNd->GetTextColl(); @@ -265,8 +265,8 @@ void SwUndoInserts::UndoImpl(::sw::UndoRedoContext & rContext) // if Point and Mark are different text nodes so a JoinNext has to be done bool bJoinNext = m_nSttNode != m_nEndNode && - rPam.GetMark()->nNode.GetNode().GetTextNode() && - rPam.GetPoint()->nNode.GetNode().GetTextNode(); + rPam.GetMark()->GetNode().GetTextNode() && + rPam.GetPoint()->GetNode().GetTextNode(); // Is there any content? (loading from template does not have content) if( m_nSttNode != m_nEndNode || m_nSttContent != m_nEndContent ) @@ -423,7 +423,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) if (m_pTextFormatColl && rDoc.GetTextFormatColls()->IsAlive(m_pTextFormatColl)) { - SwTextNode* pTextNd = rPam.GetMark()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPam.GetMark()->GetNode().GetTextNode(); if( pTextNd ) pTextNd->ChgFormatColl( m_pTextFormatColl ); } @@ -432,7 +432,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) if (m_pLastNodeColl && rDoc.GetTextFormatColls()->IsAlive(m_pLastNodeColl) && rPam.GetPoint()->nNode != rPam.GetMark()->nNode) { - SwTextNode* pTextNd = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = rPam.GetPoint()->GetNode().GetTextNode(); if( pTextNd ) pTextNd->ChgFormatColl( m_pLastNodeColl ); } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index edaa628c68f4..b0386c44dca1 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -211,7 +211,7 @@ static OUString GetCellRangeName( const SwFrameFormat &rTableFormat, SwUnoCursor const SwTableBox* pStartBox = nullptr; const SwTableBox* pEndBox = nullptr; - pStart = pUnoTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pStart = pUnoTableCursor->GetPoint()->GetNode().FindTableBoxStartNode(); if (pStart) { const SwTable* pTable = SwTable::FindTable( &rTableFormat ); @@ -220,7 +220,7 @@ static OUString GetCellRangeName( const SwFrameFormat &rTableFormat, SwUnoCursor if(pUnoTableCursor->HasMark()) { - pStart = pUnoTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pStart = pUnoTableCursor->GetMark()->GetNode().FindTableBoxStartNode(); pStartBox = pTable->GetTableBox( pStart->GetIndex()); } OSL_ENSURE( pStartBox, "start box not found" ); @@ -2302,8 +2302,8 @@ bool SwChartDataSequence::DeleteBox( const SwTableBox &rBox ) // if the implementation cursor gets affected (i.e. the box where it is located // in gets removed) we need to move it before that... (otherwise it does not need to change) - const SwStartNode* pPointStartNode = m_pTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); - const SwStartNode* pMarkStartNode = m_pTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pPointStartNode = m_pTableCursor->GetPoint()->GetNode().FindTableBoxStartNode(); + const SwStartNode* pMarkStartNode = m_pTableCursor->GetMark()->GetNode().FindTableBoxStartNode(); if (!m_pTableCursor->HasMark() || (pPointStartNode == rBox.GetSttNd() && pMarkStartNode == rBox.GetSttNd())) { @@ -2443,11 +2443,11 @@ void SwChartDataSequence::ExtendTo( bool bExtendCol, // get range descriptor (cell range) for current data-sequence - pStartNd = pUnoTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + pStartNd = pUnoTableCursor->GetPoint()->GetNode().FindTableBoxStartNode(); pEndBox = pTable->GetTableBox( pStartNd->GetIndex() ); const OUString aEndBox( pEndBox->GetName() ); - pStartNd = pUnoTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pStartNd = pUnoTableCursor->GetMark()->GetNode().FindTableBoxStartNode(); pStartBox = pTable->GetTableBox( pStartNd->GetIndex() ); const OUString aStartBox( pStartBox->GetName() ); diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index bbb70f15313c..91bf3b31c93e 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -171,10 +171,10 @@ bool SwUnoTableCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) bool bRet = SwUnoCursor::IsSelOvr( eFlags ); if( !bRet ) { - const SwTableNode* pTNd = GetPoint()->nNode.GetNode().FindTableNode(); + const SwTableNode* pTNd = GetPoint()->GetNode().FindTableNode(); bRet = !(pTNd == GetDoc().GetNodes()[ GetSavePos()->nNode ]-> FindTableNode() && (!HasMark() || - pTNd == GetMark()->nNode.GetNode().FindTableNode() )); + pTNd == GetMark()->GetNode().FindTableNode() )); } return bRet; } @@ -203,7 +203,7 @@ void SwUnoTableCursor::MakeBoxSels() if (!GetSelectedBoxesCount()) { const SwTableBox* pBox; - const SwNode* pBoxNd = GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + const SwNode* pBoxNd = GetPoint()->GetNode().FindTableBoxStartNode(); const SwTableNode* pTableNd = pBoxNd ? pBoxNd->FindTableNode() : nullptr; if( pTableNd && nullptr != ( pBox = pTableNd->GetTable().GetTableBox( pBoxNd->GetIndex() )) ) InsertBox( *pBox ); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 5ccfebd164ea..2fbbd8312bc2 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -663,7 +663,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry break; case FN_UNO_TEXT_PARAGRAPH: { - SwTextNode* pTextNode = rPam.GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = rPam.GetPoint()->GetNode().GetTextNode(); if (pTextNode) { if (pAny) @@ -1025,7 +1025,7 @@ void resetCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry, SwPaM& rPam void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL, const uno::Sequence< beans::PropertyValue >& rOptions) { - if (SwTextNode const*const pTextNode = pUnoCursor->GetPoint()->nNode.GetNode().GetTextNode()) + if (SwTextNode const*const pTextNode = pUnoCursor->GetPoint()->GetNode().GetTextNode()) { // TODO: check meta field here too in case it ever grows a 2nd char if (pTextNode->GetTextAttrAt(pUnoCursor->GetPoint()->nContent.GetIndex(), @@ -1193,7 +1193,7 @@ bool DocInsertStringSplitCR( // grouping done in InsertString is intended for typing, not API calls ::sw::GroupUndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); SwTextNode* const pTextNd = - rNewCursor.GetPoint()->nNode.GetNode().GetTextNode(); + rNewCursor.GetPoint()->GetNode().GetTextNode(); if (!pTextNd) { SAL_INFO("sw.uno", "DocInsertStringSplitCR: need a text node"); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index 1a7b0b5bd730..3a4a01f5032c 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -1130,7 +1130,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a //Tbis removes the frame format too. //To prevent this the connection between format and attribute has to be broken before. const SwPosition *pPos = aAnchor.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -1284,7 +1284,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a //Tbis removes the frame format too. //To prevent this the connection between format and attribute has to be broken before. const SwPosition *pPos = rOldAnchor.GetContentAnchor(); - SwTextNode *pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pPos->GetNode().GetTextNode(); SAL_WARN_IF( !pTextNode->HasHints(), "sw.uno", "Missing FlyInCnt-Hint." ); const sal_Int32 nIdx = pPos->nContent.GetIndex(); SwTextAttr * const pHint = @@ -2165,7 +2165,7 @@ void SwXShape::dispose() if (pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR) { const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor()); - SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = rPos.GetNode().GetTextNode(); const sal_Int32 nIdx = rPos.nContent.GetIndex(); pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx ); } diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index e6a3bea3c3fe..929172e94ff1 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -1870,7 +1870,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any& if(aAnchor.GetAnchorId() == RndStdIds::FLY_AT_FLY) { const ::SwPosition* pPosition = aAnchor.GetContentAnchor(); - SwFrameFormat* pFlyFormat = pPosition ? pPosition->nNode.GetNode().GetFlyFormat() : nullptr; + SwFrameFormat* pFlyFormat = pPosition ? pPosition->GetNode().GetFlyFormat() : nullptr; if(!pFlyFormat || pFlyFormat->Which() == RES_DRAWFRMFMT) { lang::IllegalArgumentException aExcept; @@ -2676,7 +2676,7 @@ void SwXFrame::dispose() if (pFormat->GetAnchor().GetAnchorId() == RndStdIds::FLY_AS_CHAR) { const SwPosition &rPos = *(pFormat->GetAnchor().GetContentAnchor()); - SwTextNode *pTextNode = rPos.nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = rPos.GetNode().GetTextNode(); const sal_Int32 nIdx = rPos.nContent.GetIndex(); pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx, nIdx ); } diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index f13dccec4c64..ce29a60a264d 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1239,7 +1239,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) // since the called functions are sometimes a bit unreliable // in specific cases... SwPosition *const pPoint = rUnoCursor.GetPoint(); - SwNode *const pOldNode = &pPoint->nNode.GetNode(); + SwNode *const pOldNode = &pPoint->GetNode(); sal_Int32 const nOldIndex = pPoint->nContent.GetIndex(); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); @@ -1262,7 +1262,7 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) } // return true if cursor has moved - bRet = (&pPoint->nNode.GetNode() != pOldNode) || + bRet = (&pPoint->GetNode() != pOldNode) || (pPoint->nContent.GetIndex() != nOldIndex); if (bRet && (CursorType::Meta == m_eType)) { @@ -1283,7 +1283,7 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) // white spaces create problems on the paragraph start bool bRet = false; SwPosition *const pPoint = rUnoCursor.GetPoint(); - SwNode *const pOldNode = &pPoint->nNode.GetNode(); + SwNode *const pOldNode = &pPoint->GetNode(); sal_Int32 const nOldIndex = pPoint->nContent.GetIndex(); SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); @@ -1302,7 +1302,7 @@ SwXTextCursor::gotoPreviousWord(sal_Bool Expand) } // return true if cursor has moved - bRet = (&pPoint->nNode.GetNode() != pOldNode) || + bRet = (&pPoint->GetNode() != pOldNode) || (pPoint->nContent.GetIndex() != nOldIndex); if (bRet && (CursorType::Meta == m_eType)) { @@ -1322,7 +1322,7 @@ SwXTextCursor::gotoEndOfWord(sal_Bool Expand) bool bRet = false; SwPosition *const pPoint = rUnoCursor.GetPoint(); - SwNode & rOldNode = pPoint->nNode.GetNode(); + SwNode & rOldNode = pPoint->GetNode(); sal_Int32 const nOldIndex = pPoint->nContent.GetIndex(); const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; @@ -1358,7 +1358,7 @@ SwXTextCursor::gotoStartOfWord(sal_Bool Expand) bool bRet = false; SwPosition *const pPoint = rUnoCursor.GetPoint(); - SwNode & rOldNode = pPoint->nNode.GetNode(); + SwNode & rOldNode = pPoint->GetNode(); sal_Int32 const nOldIndex = pPoint->nContent.GetIndex(); const sal_Int16 nWordType = i18n::WordType::DICTIONARY_WORD; diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index 226944083aef..ce84947aca13 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -466,7 +466,7 @@ rtl::Reference<SwXParagraphEnumeration> SwXParagraphEnumeration::Create( case CursorType::SelectionInTable: { SwTableNode const*const pTableNode( - pCursor->GetPoint()->nNode.GetNode().FindTableNode()); + pCursor->GetPoint()->GetNode().FindTableNode()); pStartNode = pTableNode; pTable = & pTableNode->GetTable(); break; @@ -633,7 +633,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() { text::XText *const pText = m_xParentText.get(); xRef = SwXParagraph::CreateXParagraph(rUnoCursor.GetDoc(), - pStart->nNode.GetNode().GetTextNode(), + pStart->GetNode().GetTextNode(), static_cast<SwXText*>(pText), nFirstContent, nLastContent); } } @@ -1076,12 +1076,12 @@ bool SwXTextRange::GetPositions(SwPaM& rToFill, ::sw::TextRangeMode const eMode) assert(pSectionNode->GetNodes().IsDocNodes()); rToFill.GetPoint()->nNode = *pSectionNode; ++rToFill.GetPoint()->nNode; - rToFill.GetPoint()->nContent.Assign(rToFill.GetPoint()->nNode.GetNode().GetContentNode(), 0); + rToFill.GetPoint()->nContent.Assign(rToFill.GetPoint()->GetNode().GetContentNode(), 0); rToFill.SetMark(); rToFill.GetMark()->nNode = *pSectionNode->GetNode().EndOfSectionNode(); --rToFill.GetMark()->nNode; - rToFill.GetMark()->nContent.Assign(rToFill.GetMark()->nNode.GetNode().GetContentNode(), - rToFill.GetMark()->nNode.GetNode().GetContentNode() ? rToFill.GetMark()->nNode.GetNode().GetContentNode()->Len() : 0); + rToFill.GetMark()->nContent.Assign(rToFill.GetMark()->GetNode().GetContentNode(), + rToFill.GetMark()->GetNode().GetContentNode() ? rToFill.GetMark()->GetNode().GetContentNode()->Len() : 0); return true; } } @@ -1236,7 +1236,7 @@ uno::Reference< text::XText > CreateParentXText(SwDoc & rDoc, const SwPosition& rPos) { uno::Reference< text::XText > xParentText; - SwStartNode* pSttNode = rPos.nNode.GetNode().StartOfSectionNode(); + SwStartNode* pSttNode = rPos.GetNode().StartOfSectionNode(); while(pSttNode && pSttNode->IsSectionNode()) { pSttNode = pSttNode->StartOfSectionNode(); diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index c2788895d19b..443987f74e4a 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -616,7 +616,7 @@ SwXParagraph::setPropertyValuesTolerant( SwTextNode & rTextNode(m_pImpl->GetTextNodeOrThrow()); - //SwNode& rTextNode = pUnoCursor->GetPoint()->nNode.GetNode(); + //SwNode& rTextNode = pUnoCursor->GetPoint()->GetNode(); //const SwAttrSet& rAttrSet = static_cast<SwTextNode&>(rTextNode).GetSwAttrSet(); //sal_uInt16 nAttrCount = rAttrSet.Count(); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 1145ed80dfad..883acfca3b31 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -160,7 +160,7 @@ namespace { // Crossrefbookmarks only remember the start position but have to span the whole paragraph pCrossRefEndPos = std::make_unique<SwPosition>(rEndPos); - pCrossRefEndPos->nContent = pCrossRefEndPos->nNode.GetNode().GetTextNode()->Len(); + pCrossRefEndPos->nContent = pCrossRefEndPos->GetNode().GetTextNode()->Len(); pEndPos = pCrossRefEndPos.get(); } if(pEndPos) @@ -244,7 +244,7 @@ namespace // no need to consider annotation marks starting after aEndOfPara SwPosition aEndOfPara(*rUnoCursor.GetPoint()); - aEndOfPara.nContent = aEndOfPara.nNode.GetNode().GetTextNode()->Len(); + aEndOfPara.nContent = aEndOfPara.GetNode().GetTextNode()->Len(); const IDocumentMarkAccess::const_iterator_t pCandidatesEnd = pMarkAccess->findFirstAnnotationStartsAfter(aEndOfPara); @@ -318,7 +318,7 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration( m_pUnoCursor = rParaCursor.GetDoc().CreateUnoCursor(*rParaCursor.GetPoint()); OSL_ENSURE(nEnd == -1 || (nStart <= nEnd && - nEnd <= m_pUnoCursor->Start()->nNode.GetNode().GetTextNode()->GetText().getLength()), + nEnd <= m_pUnoCursor->Start()->GetNode().GetTextNode()->GetText().getLength()), "start or end value invalid!"); // find all frames, graphics and OLEs that are bound AT character in para @@ -366,7 +366,7 @@ lcl_FillFieldMarkArray(std::deque<sal_Int32> & rFieldMarks, SwUnoCursor const & const sal_Int32 i_nStartPos) { const SwTextNode * const pTextNode = - rUnoCursor.GetPoint()->nNode.GetNode().GetTextNode(); + rUnoCursor.GetPoint()->GetNode().GetTextNode(); if (!pTextNode) return; const sal_Unicode fld[] = { @@ -1138,7 +1138,7 @@ static void lcl_FillSoftPageBreakArray( SwSoftPageBreakList& rBreakArr ) { const SwTextNode *pTextNode = - rUnoCursor.GetPoint()->nNode.GetNode().GetTextNode(); + rUnoCursor.GetPoint()->GetNode().GetTextNode(); if( pTextNode ) pTextNode->fillSoftPageBreakList( rBreakArr ); } @@ -1353,8 +1353,8 @@ static void lcl_CreatePortions( (pUnoCursor->Start()->nContent.GetIndex() != i_nStartPos)) { pUnoCursor->DeleteMark(); - OSL_ENSURE(pUnoCursor->Start()->nNode.GetNode().GetTextNode() && - (i_nStartPos <= pUnoCursor->Start()->nNode.GetNode().GetTextNode()-> + OSL_ENSURE(pUnoCursor->Start()->GetNode().GetTextNode() && + (i_nStartPos <= pUnoCursor->Start()->GetNode().GetTextNode()-> GetText().getLength()), "Incorrect start position" ); // ??? should this be i_nStartPos - current position ? pUnoCursor->Right(i_nStartPos); diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index e11df03dc7f9..63aba54f5a2b 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -781,7 +781,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) throw lang::DisposedException(); SwPosition const * const pStartPos( rPam.Start() ); - if (&pStartPos->nNode.GetNode() != pTextNode) + if (&pStartPos->GetNode() != pTextNode) { throw lang::IllegalArgumentException( "trying to insert into a nesting text content, but start " @@ -806,7 +806,7 @@ bool SwXMeta::CheckForOwnMemberMeta(const SwPaM & rPam, const bool bAbsorb) if (rPam.HasMark() && bAbsorb) { SwPosition const * const pEndPos( rPam.End() ); - if (&pEndPos->nNode.GetNode() != pTextNode) + if (&pEndPos->GetNode() != pTextNode) { throw lang::IllegalArgumentException( "trying to insert into a nesting text content, but end " diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 29672c7f178d..e28ab9e9ea2d 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -448,8 +448,8 @@ SwXTextSection::getAnchor() SwPaM aPaM(*pIdx); aPaM.Move( fnMoveForward, GoInContent ); assert(pIdx->GetNode().IsSectionNode()); - if (aPaM.GetPoint()->nNode.GetNode().FindTableNode() != pIdx->GetNode().FindTableNode() - || aPaM.GetPoint()->nNode.GetNode().FindSectionNode() != &pIdx->GetNode()) + if (aPaM.GetPoint()->GetNode().FindTableNode() != pIdx->GetNode().FindTableNode() + || aPaM.GetPoint()->GetNode().FindSectionNode() != &pIdx->GetNode()) { isMoveIntoTable = true; } @@ -457,8 +457,8 @@ SwXTextSection::getAnchor() const SwEndNode* pEndNode = pIdx->GetNode().EndOfSectionNode(); SwPaM aEnd(*pEndNode); aEnd.Move( fnMoveBackward, GoInContent ); - if (aEnd.GetPoint()->nNode.GetNode().FindTableNode() != pIdx->GetNode().FindTableNode() - || aEnd.GetPoint()->nNode.GetNode().FindSectionNode() != &pIdx->GetNode()) + if (aEnd.GetPoint()->GetNode().FindTableNode() != pIdx->GetNode().FindTableNode() + || aEnd.GetPoint()->GetNode().FindSectionNode() != &pIdx->GetNode()) { isMoveIntoTable = true; } diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index 4fbe405521cb..6bf7299fe0f2 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -1480,12 +1480,12 @@ OUString SwXTextTableCursor::getRangeName() if(!pTableCursor) return OUString(); pTableCursor->MakeBoxSels(); - const SwStartNode* pNode = pTableCursor->GetPoint()->nNode.GetNode().FindTableBoxStartNode(); + const SwStartNode* pNode = pTableCursor->GetPoint()->GetNode().FindTableBoxStartNode(); const SwTable* pTable = SwTable::FindTable(GetFrameFormat()); const SwTableBox* pEndBox = pTable->GetTableBox(pNode->GetIndex()); if(pTableCursor->HasMark()) { - pNode = pTableCursor->GetMark()->nNode.GetNode().FindTableBoxStartNode(); + pNode = pTableCursor->GetMark()->GetNode().FindTableBoxStartNode(); const SwTableBox* pStartBox = pTable->GetTableBox(pNode->GetIndex()); if(pEndBox != pStartBox) { diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c12ed195d137..5de3a185d6bc 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -672,7 +672,7 @@ SwXText::insertTextContentBefore( const SwNodeIndex aTableIdx( *pTableNode, -1 ); SwPosition aBefore(aTableIdx); bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore ); - pTextNode = aBefore.nNode.GetNode().GetTextNode(); + pTextNode = aBefore.GetNode().GetTextNode(); } else if (pXSection && pXSection->GetFormat() && pXSection->GetFormat()->GetDoc() == GetDoc()) @@ -683,7 +683,7 @@ SwXText::insertTextContentBefore( const SwNodeIndex aSectIdx( *pSectNode, -1 ); SwPosition aBefore(aSectIdx); bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore ); - pTextNode = aBefore.nNode.GetNode().GetTextNode(); + pTextNode = aBefore.GetNode().GetTextNode(); } if (!bRet || !pTextNode) { @@ -728,7 +728,7 @@ SwXText::insertTextContentAfter( SwEndNode *const pTableEnd = pTableNode->EndOfSectionNode(); SwPosition aTableEnd(*pTableEnd); bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aTableEnd ); - pTextNode = aTableEnd.nNode.GetNode().GetTextNode(); + pTextNode = aTableEnd.GetNode().GetTextNode(); } else if (pXSection && pXSection->GetFormat() && pXSection->GetFormat()->GetDoc() == GetDoc()) @@ -738,7 +738,7 @@ SwXText::insertTextContentAfter( SwEndNode *const pEnd = pSectNode->EndOfSectionNode(); SwPosition aEnd(*pEnd); bRet = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd ); - pTextNode = aEnd.nNode.GetNode().GetTextNode(); + pTextNode = aEnd.GetNode().GetTextNode(); } if (!bRet || !pTextNode) { @@ -1299,7 +1299,7 @@ SwXText::Impl::finishOrAppendParagraph( // tdf#127616 keep direct character formatting of empty paragraphs, // if character style of the paragraph sets also the same attributes - if (aPam.Start()->nNode.GetNode().GetTextNode()->Len() == 0) + if (aPam.Start()->GetNode().GetTextNode()->Len() == 0) { auto itCharStyle = std::find_if(rProperties.begin(), rProperties.end(), [](const beans::PropertyValue& rValue) { @@ -1350,7 +1350,7 @@ SwXText::Impl::finishOrAppendParagraph( throw aEx; } } - SwTextNode *const pTextNode( aPam.Start()->nNode.GetNode().GetTextNode() ); + SwTextNode *const pTextNode( aPam.Start()->GetNode().GetTextNode() ); OSL_ENSURE(pTextNode, "no SwTextNode?"); if (pTextNode) { @@ -1787,7 +1787,7 @@ SwXText::convertToTextFrame( && pStartPam->ContainsPosition(*pFrameFormat->GetAnchor().GetContentAnchor())) { const auto& rAnchorNode - = pFrameFormat->GetAnchor().GetContentAnchor()->nNode.GetNode(); + = pFrameFormat->GetAnchor().GetContentAnchor()->GetNode(); if (!(rAnchorNode.FindFooterStartNode() || rAnchorNode.FindHeaderStartNode())) { SwFormatAnchor aAnchor(pFrameFormat->GetAnchor()); @@ -2026,7 +2026,7 @@ void SwXText::Impl::ConvertCell( } // now check if there's a need to insert another paragraph break if (aEndCellPam.End()->nContent.GetIndex() < - aEndCellPam.End()->nNode.GetNode().GetTextNode()->Len()) + aEndCellPam.End()->GetNode().GetTextNode()->Len()) { m_pDoc->getIDocumentContentOperations().SplitNode(*aEndCellPam.End(), false); // take care that the new start/endcell is moved to the right position @@ -2042,7 +2042,7 @@ void SwXText::Impl::ConvertCell( } assert(aStartCellPam.Start()->nContent.GetIndex() == 0); - assert(aEndCellPam.End()->nContent.GetIndex() == aEndCellPam.End()->nNode.GetNode().GetTextNode()->Len()); + assert(aEndCellPam.End()->nContent.GetIndex() == aEndCellPam.End()->GetNode().GetTextNode()->Len()); SwNodeRange aCellRange(aStartCellPam.Start()->nNode, aEndCellPam.End()->nNode); rRowNodes.push_back(aCellRange); // note: invalidates pLastCell! @@ -2379,12 +2379,12 @@ SwXText::copyText( SwTextNode * pFirstNode; { SwPaM temp(*pSource->GetStartNode(), *pSource->GetStartNode()->EndOfSectionNode(), SwNodeOffset(+1), SwNodeOffset(-1)); - pFirstNode = temp.GetMark()->nNode.GetNode().GetTextNode(); + pFirstNode = temp.GetMark()->GetNode().GetTextNode(); if (pFirstNode) { pFirstNode->MakeStartIndex(&temp.GetMark()->nContent); } - if (SwTextNode *const pNode = temp.GetPoint()->nNode.GetNode().GetTextNode()) + if (SwTextNode *const pNode = temp.GetPoint()->GetNode().GetTextNode()) { pNode->MakeEndIndex(&temp.GetPoint()->nContent); } diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index a1d6415cda68..3f5bd890d2ad 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -341,7 +341,7 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt) SwShellTableCursor* pShellTableCursor = pFESh->GetTableCursor(); const SwContentNode *const pContentNode = - pShellTableCursor->Start()->nNode.GetNode().GetContentNode(); + pShellTableCursor->Start()->GetNode().GetContentNode(); const SwContentFrame *const pContentFrame = pContentNode ? pContentNode->getLayoutFrame(GetLayout(), pShellTableCursor->Start()) : nullptr; if( pContentFrame ) { diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx index 17e53f30802c..75781fe04a79 100644 --- a/sw/source/filter/ascii/wrtasc.cxx +++ b/sw/source/filter/ascii/wrtasc.cxx @@ -126,7 +126,7 @@ ErrCode SwASCWriter::WriteStream() (m_pCurrentPam->GetPoint()->nNode.GetIndex() == m_pCurrentPam->GetMark()->nNode.GetIndex() && m_pCurrentPam->GetPoint()->nContent.GetIndex() <= m_pCurrentPam->GetMark()->nContent.GetIndex()) ) { - SwTextNode* pNd = m_pCurrentPam->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pNd = m_pCurrentPam->GetPoint()->GetNode().GetTextNode(); if( pNd ) { // Should we have frames only? diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 8e0d9b1e47bd..93fb744df83a 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -451,8 +451,8 @@ static bool MakeBookRegionOrPoint(const SwFltStackEntry& rEntry, SwDoc& rDoc, { if (rEntry.MakeRegion(rDoc, rRegion, SwFltStackEntry::RegionMode::CheckNodes)) { - if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode() - != rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode()) + if (rRegion.GetPoint()->GetNode().FindTableBoxStartNode() + != rRegion.GetMark()->GetNode().FindTableBoxStartNode()) { rRegion.Exchange(); // invalid range rRegion.DeleteMark(); // -> both to mark @@ -589,7 +589,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, if (MakeBookRegionOrPoint(rEntry, m_rDoc, aRegion)) { SwTextNode const*const pTextNode( - aRegion.End()->nNode.GetNode().GetTextNode()); + aRegion.End()->GetNode().GetTextNode()); SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt( aRegion.End()->nContent.GetIndex() - 1, true) : nullptr; if (pField) @@ -664,7 +664,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwContentNode* pNd = nullptr; if( !pTOXAttr->HadBreakItem() || !pTOXAttr->HadPageDescItem() ) { - pNd = pPoint->nNode.GetNode().GetContentNode(); + pNd = pPoint->GetNode().GetContentNode(); if( pNd ) { const SfxItemSet* pSet = pNd->GetpSwAttrSet(); diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index cee719277383..b18549e1c113 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2139,7 +2139,7 @@ void SwHTMLWriter::OutCSS1_FrameFormatBackground( const SwFrameFormat& rFrameFor const SwPosition *pAnchorPos = rAnchor.GetContentAnchor(); if (RndStdIds::FLY_AT_PAGE != eAnchorId && pAnchorPos) { - const SwNode& rNode = pAnchorPos->nNode.GetNode(); + const SwNode& rNode = pAnchorPos->GetNode(); if( rNode.IsContentNode() ) { // If the frame is linked to a content-node, diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx index 23c7128719a1..dc71483ab82b 100644 --- a/sw/source/filter/html/htmlcss1.cxx +++ b/sw/source/filter/html/htmlcss1.cxx @@ -1934,7 +1934,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SvxCSS1PropertyInfo &rPropInfo, // Absolute positioned objects are page-bound, when they // aren't in a frame and otherwise frame-bound. const SwStartNode *pFlySttNd = - m_pPam->GetPoint()->nNode.GetNode().FindFlyStartNode(); + m_pPam->GetPoint()->GetNode().FindFlyStartNode(); if( pFlySttNd ) { aAnchor.SetType( RndStdIds::FLY_AT_FLY ); diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx index 240c206c61e2..9e0a707ea21e 100644 --- a/sw/source/filter/html/htmldrawreader.cxx +++ b/sw/source/filter/html/htmldrawreader.cxx @@ -154,7 +154,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj, SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eTopType ) { const SwStartNode *pFlySttNd = - m_pPam->GetPoint()->nNode.GetNode().FindFlyStartNode(); + m_pPam->GetPoint()->GetNode().FindFlyStartNode(); if( pFlySttNd ) { @@ -406,7 +406,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable ) 0 }; SwTextNode const*const pTextNd = - m_pPam->GetPoint()->nNode.GetNode().GetTextNode(); + m_pPam->GetPoint()->GetNode().GetTextNode(); if( pTextNd ) { const SfxItemSet& rItemSet = pTextNd->GetAnyFormatColl().GetAttrSet(); diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index 35525b5d93d5..5b08ad274f3c 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -320,7 +320,7 @@ void SwHTMLWriter::CollectFlyFrames() // spacing. if( text::RelOrientation::FRAME == eHoriRel && (pAPos = rAnchor.GetContentAnchor()) != nullptr && - (pACNd = pAPos->nNode.GetNode().GetContentNode()) != nullptr ) + (pACNd = pAPos->GetNode().GetContentNode()) != nullptr ) { const SvxLRSpaceItem& rLRItem = pACNd->GetAttr(RES_LR_SPACE); diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx index 024c3c13727b..c1b548c104d3 100644 --- a/sw/source/filter/html/htmlform.cxx +++ b/sw/source/filter/html/htmlform.cxx @@ -516,7 +516,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height ) const SwDoc *pDoc = pFrameFormat->GetDoc(); const SwPosition* pAPos = pFrameFormat->GetAnchor().GetContentAnchor(); SwTableNode *pTableNd; - if (pAPos && nullptr != (pTableNd = pAPos->nNode.GetNode().FindTableNode())) + if (pAPos && nullptr != (pTableNd = pAPos->GetNode().FindTableNode())) { const bool bLastGrf = !pTableNd->GetTable().DecGrfsThatResize(); SwHTMLTableLayout *pLayout = @@ -1051,7 +1051,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl( SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.m_eTopType ) { const SwStartNode *pFlySttNd = - m_pPam->GetPoint()->nNode.GetNode().FindFlyStartNode(); + m_pPam->GetPoint()->GetNode().FindFlyStartNode(); if( pFlySttNd ) { diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 5ab311e4dc08..1fbfc6f6c0b2 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -345,7 +345,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) } SwTextNode* pOldTextNd = - bAppended ? nullptr : m_pPam->GetPoint()->nNode.GetNode().GetTextNode(); + bAppended ? nullptr : m_pPam->GetPoint()->GetNode().GetTextNode(); m_pPam->Move( fnMoveBackward ); @@ -725,7 +725,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) } SwTextNode* pOldTextNd = - bAppended ? nullptr : m_pPam->GetPoint()->nNode.GetNode().GetTextNode(); + bAppended ? nullptr : m_pPam->GetPoint()->GetNode().GetTextNode(); m_pPam->Move( fnMoveBackward ); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 6b4157be45fc..fb9645b7c267 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -2423,7 +2423,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail, // as they would only shrink but never grow m_xLayoutInfo->SetMustNotRecalc( true ); if( m_pContext->GetFrameFormat()->GetAnchor().GetContentAnchor() - ->nNode.GetNode().FindTableNode() ) + ->GetNode().FindTableNode() ) { sal_uInt32 nMax = m_xLayoutInfo->GetMax(); if( nMax > USHRT_MAX ) @@ -2546,7 +2546,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection const SwStartNode *pStNd; if (m_xTable->m_bFirstCell ) { - SwNode *const pNd = & m_pPam->GetPoint()->nNode.GetNode(); + SwNode *const pNd = & m_pPam->GetPoint()->GetNode(); pNd->GetTextNode()->ChgFormatColl( pColl ); pStNd = pNd->FindTableBoxStartNode(); m_xTable->m_bFirstCell = false; @@ -2595,7 +2595,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) SwTextFormatColl *pColl = m_pCSS1Parser->GetTextCollFromPool( nPoolId ); - SwNode *const pNd = & m_pPam->GetPoint()->nNode.GetNode(); + SwNode *const pNd = & m_pPam->GetPoint()->GetNode(); const SwStartNode *pStNd; if (m_xTable->m_bFirstCell) { @@ -2631,7 +2631,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId ) pColl ); m_pPam->GetPoint()->nNode = pStNd->GetIndex() + 1; - SwTextNode *pTextNd = m_pPam->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNd = m_pPam->GetPoint()->GetNode().GetTextNode(); m_pPam->GetPoint()->nContent.Assign( pTextNd, 0 ); m_xTable->IncBoxCount(); } @@ -2671,7 +2671,7 @@ sal_Int32 SwHTMLParser::StripTrailingLF() const sal_Int32 nLen = m_pPam->GetPoint()->nContent.GetIndex(); if( nLen ) { - SwTextNode* pTextNd = m_pPam->GetPoint()->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNd = m_pPam->GetPoint()->GetNode().GetTextNode(); // careful, when comments aren't ignored!!! if( pTextNd ) { @@ -3129,7 +3129,7 @@ void CellSaveStruct::CheckNoBreak( const SwPosition& rPos ) } else if( m_nNoBreakEndContentPos + 1 == rPos.nContent.GetIndex() ) { - SwTextNode const*const pTextNd(rPos.nNode.GetNode().GetTextNode()); + SwTextNode const*const pTextNd(rPos.GetNode().GetTextNode()); if( pTextNd ) { sal_Unicode const cLast = @@ -3491,9 +3491,9 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, m_pPam->Move( fnMoveBackward ); } - SwNode const*const pNd = & m_pPam->GetPoint()->nNode.GetNode(); + SwNode const*const pNd = & m_pPam->GetPoint()->GetNode(); SwTextNode *const pOldTextNd = (!bAppended && !bForceFrame) ? - pSavePos->nNode.GetNode().GetTextNode() : nullptr; + pSavePos->GetNode().GetTextNode() : nullptr; if (pFrameFormat && pOldTextNd) { @@ -3559,7 +3559,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, } } - SwNode const*const pNd = & m_pPam->GetPoint()->nNode.GetNode(); + SwNode const*const pNd = & m_pPam->GetPoint()->GetNode(); const SwStartNode *pStNd = (m_xTable->m_bFirstCell ? pNd->FindTableNode() : pNd->FindTableBoxStartNode() ); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 1092cc9e424f..801ca7da058b 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -837,7 +837,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) { if( pCurrentNd->CanJoinNext( &pPos->nNode )) { - SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pNextNd = pPos->GetNode().GetTextNode(); pPos->nContent.Assign( pNextNd, 0 ); m_pPam->SetMark(); m_pPam->DeleteMark(); pNextNd->JoinPrev(); @@ -857,7 +857,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) { if( pPos->nContent.GetIndex() ) // then there was no <p> at the end m_pPam->Move( fnMoveForward, GoInNode ); // therefore to the next - SwTextNode* pTextNode = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pPos->GetNode().GetTextNode(); SwNodeIndex aPrvIdx( pPos->nNode ); if( pTextNode && pTextNode->CanJoinPrev( &aPrvIdx ) && *m_pSttNdIdx <= aPrvIdx ) @@ -875,9 +875,9 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) if( pPrev->HasSwAttrSet() ) pTextNode->SetAttr( *pPrev->GetpSwAttrSet() ); - if( &m_pPam->GetBound().nNode.GetNode() == pPrev ) + if( &m_pPam->GetBound().GetNode() == pPrev ) m_pPam->GetBound().nContent.Assign( pTextNode, 0 ); - if( &m_pPam->GetBound(false).nNode.GetNode() == pPrev ) + if( &m_pPam->GetBound(false).GetNode() == pPrev ) m_pPam->GetBound(false).nContent.Assign( pTextNode, 0 ); pTextNode->JoinPrev(); @@ -1523,7 +1523,7 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) if( !aToken.isEmpty() && ' '==aToken[0] && !IsReadPRE() ) { sal_Int32 nPos = m_pPam->GetPoint()->nContent.GetIndex(); - const SwTextNode* pTextNode = nPos ? m_pPam->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; + const SwTextNode* pTextNode = nPos ? m_pPam->GetPoint()->GetNode().GetTextNode() : nullptr; if (pTextNode) { const OUString& rText = pTextNode->GetText(); @@ -2197,7 +2197,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum ) m_aParaAttrs.clear(); SwTextNode *pTextNode = (AM_SPACE==eMode || AM_NOSPACE==eMode) ? - m_pPam->GetPoint()->nNode.GetNode().GetTextNode() : nullptr; + m_pPam->GetPoint()->GetNode().GetTextNode() : nullptr; if (pTextNode) { @@ -2592,7 +2592,7 @@ void SwHTMLParser::Show() // is the current node not visible anymore, then we use a bigger increment if( pVSh ) { - m_nParaCnt = (m_pPam->GetPoint()->nNode.GetNode().IsInVisibleArea(pVSh)) + m_nParaCnt = (m_pPam->GetPoint()->GetNode().IsInVisibleArea(pVSh)) ? 5 : 50; } } diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index fd93238ec12c..78a70f5e90ac 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -576,7 +576,7 @@ WW8TableInfo::processSwTableByLayout(const SwTable * pTable, RowEndInners_t &rLa bool bDone = false; do { - SwNode & rNode = aPam.GetPoint()->nNode.GetNode(); + SwNode & rNode = aPam.GetPoint()->GetNode(); insertTableNodeInfo(&rNode, pTable, pTableBox, 0, 0, 1, & aRect); @@ -701,7 +701,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, bool bDone = false; while (!bDone) { - SwNode & rNode = aPaM.GetPoint()->nNode.GetNode(); + SwNode & rNode = aPaM.GetPoint()->GetNode(); pNodeInfo = insertTableNodeInfo(&rNode, pTable, pBoxToSet, nRow, nCell, nDepth); @@ -771,7 +771,7 @@ WW8TableInfo::processTableBox(const SwTable * pTable, do { - SwNode & rNode = aPaM.GetPoint()->nNode.GetNode(); + SwNode & rNode = aPaM.GetPoint()->GetNode(); if (rNode.IsStartNode()) { diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 38c0bcd2b224..ce2d8d27f4e9 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6639,7 +6639,7 @@ void DocxAttributeOutput::WriteFlyFrame(const ww8::Frame& rFrame) if(aAPos) { //Get the text node what the formula anchored to - const SwTextNode* pTextNode = aAPos->nNode.GetNode().GetTextNode(); + const SwTextNode* pTextNode = aAPos->GetNode().GetTextNode(); if(pTextNode && pTextNode->Len() == 1) { //Get the paragraph alignment diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 70c5f63faa4f..0cc32ff159a4 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -124,7 +124,7 @@ namespace { SwPosition aPos(rpFly->GetNdIndex()); - if (SwTextNode* pTextNd = aPos.nNode.GetNode().GetTextNode()) + if (SwTextNode* pTextNd = aPos.GetNode().GetTextNode()) { aPos.nContent.Assign(pTextNd, 0); } @@ -144,7 +144,7 @@ namespace explicit anchoredto(SwNodeOffset nNode) : mnNode(nNode) {} bool operator()(const ww8::Frame &rFrame) const { - return (mnNode == rFrame.GetPosition().nNode.GetNode().GetIndex()); + return (mnNode == rFrame.GetPosition().GetNode().GetIndex()); } }; } @@ -721,7 +721,7 @@ namespace sw SameOpenRedlineType(eType)); if (aResult != maStack.rend()) { - SwTextNode *const pNode(rPos.nNode.GetNode().GetTextNode()); + SwTextNode *const pNode(rPos.GetNode().GetTextNode()); sal_Int32 const nIndex(rPos.nContent.GetIndex()); // HACK to prevent overlap of field-mark and redline, // which would destroy field-mark invariants when the redline @@ -729,7 +729,7 @@ namespace sw if (pNode && nIndex > 0 && pNode->GetText()[nIndex - 1] == CH_TXT_ATR_FIELDEND) { - SwPosition const end(*rPos.nNode.GetNode().GetTextNode(), + SwPosition const end(*rPos.GetNode().GetTextNode(), nIndex - 1); sw::mark::IFieldmark *const pFieldMark( rPos.GetDoc().getIDocumentMarkAccess()->getFieldmarkAt(end)); diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx index 93d170dc381a..12b949184baa 100644 --- a/sw/source/filter/ww8/writerhelper.hxx +++ b/sw/source/filter/ww8/writerhelper.hxx @@ -124,7 +124,7 @@ namespace ww8 The SwTextNode this frame is anchored inside */ const SwContentNode *GetContentNode() const - { return maPos.nNode.GetNode().GetContentNode(); } + { return maPos.GetNode().GetContentNode(); } /** Get the type of frame that this wraps diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 1d8c99349163..0bd3f19388ca 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -2395,10 +2395,10 @@ bool WinwordAnchoring::ConvertPosition( SwFormatHoriOrient& _iorHoriOri, bool bConvDueToAnchoredAtColBreakPara( false ); if ( ( (eAnchor == RndStdIds::FLY_AT_PARA) || (eAnchor == RndStdIds::FLY_AT_CHAR) ) && _rFrameFormat.GetAnchor().GetContentAnchor() && - _rFrameFormat.GetAnchor().GetContentAnchor()->nNode.GetNode().IsTextNode() ) + _rFrameFormat.GetAnchor().GetContentAnchor()->GetNode().IsTextNode() ) { SwTextNode& rAnchorTextNode = - dynamic_cast<SwTextNode&>(_rFrameFormat.GetAnchor().GetContentAnchor()->nNode.GetNode()); + dynamic_cast<SwTextNode&>(_rFrameFormat.GetAnchor().GetContentAnchor()->GetNode()); const SvxFormatBreakItem& rBreak = rAnchorTextNode.GetAttr(RES_BREAK); if (rBreak.GetBreak() == SvxBreak::ColumnBefore) { diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index cd48428cadb0..6f260a25c1c6 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1692,7 +1692,7 @@ SvxFrameDirection MSWordExportBase::TrueFrameDirection( const SwFrameFormat &rFl if ((RndStdIds::FLY_AT_PAGE != pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor() ) { - pFlyFormat = pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat(); + pFlyFormat = pAnchor->GetContentAnchor()->GetNode().GetFlyFormat(); } else pFlyFormat = nullptr; @@ -1746,7 +1746,7 @@ std::shared_ptr<SvxBrushItem> WW8Export::TrueFrameBgBrush(const SwFrameFormat &r pAnchor->GetContentAnchor()) { pFlyFormat = - pAnchor->GetContentAnchor()->nNode.GetNode().GetFlyFormat(); + pAnchor->GetContentAnchor()->GetNode().GetFlyFormat(); } else pFlyFormat = nullptr; @@ -1854,9 +1854,9 @@ static SwTextFormatColl& lcl_getFormatCollection( MSWordExportBase& rExport, con // Looking for deletions, which ends in current pTextNode if( RedlineType::Delete == pRedl->GetRedlineData().GetType() && pEnd->nNode == *pTextNode && pStt->nNode != *pTextNode && - pStt->nNode.GetNode().IsTextNode() ) + pStt->GetNode().IsTextNode() ) { - pTextNode = pStt->nNode.GetNode().GetTextNode(); + pTextNode = pStt->GetNode().GetTextNode(); nMax = nPos; nPos = 0; } @@ -3452,7 +3452,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const ww8::Frame& rFormat, const P if ( !m_rWW8Export.IsInTable() && rFormat.IsInline() ) { //Test to see if this textbox contains only a single graphic/ole - SwTextNode* pParTextNode = rAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); + SwTextNode* pParTextNode = rAnch.GetContentAnchor()->GetNode().GetTextNode(); if ( pParTextNode && !m_rWW8Export.m_rDoc.GetNodes()[ nStt ]->IsNoTextNode() ) bDone = true; } @@ -3465,7 +3465,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const ww8::Frame& rFormat, const P if ( m_rWW8Export.m_pParentFrame ) { /* Munge flys in fly into absolutely positioned elements for word 6 */ - const SwTextNode* pParTextNode = rAnch.GetContentAnchor()->nNode.GetNode().GetTextNode(); + const SwTextNode* pParTextNode = rAnch.GetContentAnchor()->GetNode().GetTextNode(); const SwRect aPageRect = pParTextNode->FindPageFrameRect(); aOffset = rFrameFormat.FindLayoutRect().Pos(); diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e8c8ac75e41d..f5f3814f6631 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2767,7 +2767,7 @@ public: //skipped cell to output it in a sane sequence. See ooo47778-3.sxw for one of these //horrors. So if we are at the end of the selection, but this end point is a table //cell whose next cell is in the selection allow jumping back to it - const SwNode* pCurrentNode = &m_pCurPam->GetPoint()->nNode.GetNode(); + const SwNode* pCurrentNode = &m_pCurPam->GetPoint()->GetNode(); const SwNode* pNextNode = pTableInfo->getNextNode(pCurrentNode); if (pNextNode && pCurrentNode != pNextNode) @@ -2907,7 +2907,7 @@ void MSWordExportBase::WriteText() if ( &rNd == &rNd.GetNodes().GetEndOfContent() ) break; - const SwNode * pCurrentNode = &m_pCurPam->GetPoint()->nNode.GetNode(); + const SwNode * pCurrentNode = &m_pCurPam->GetPoint()->GetNode(); const SwNode * pNextNode = m_pTableInfo->getNextNode(pCurrentNode); if (pCurrentNode == pNextNode) @@ -2949,7 +2949,7 @@ void WW8Export::WriteMainText() // save the StyleId of the last paragraph. Because WW97 take the style // from the last CR, that will be written after footer/Header/footnotes/ // annotation etc. - const SwTextNode* pLastNd = m_pCurPam->GetMark()->nNode.GetNode().GetTextNode(); + const SwTextNode* pLastNd = m_pCurPam->GetMark()->GetNode().GetTextNode(); if( pLastNd ) m_nLastFormatId = GetId( static_cast<SwTextFormatColl&>(pLastNd->GetAnyFormatColl()) ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 247959a1d267..e7623d4510a3 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -1448,7 +1448,7 @@ const SfxPoolItem* SwWW8FltControlStack::GetFormatAttr(const SwPosition& rPos, const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich); if (!pItem) { - SwContentNode const*const pNd = rPos.nNode.GetNode().GetContentNode(); + SwContentNode const*const pNd = rPos.GetNode().GetContentNode(); if (!pNd) pItem = &m_rDoc.GetAttrPool().GetDefaultItem(nWhich); else @@ -1570,7 +1570,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos, const SwPosition& rBkMrkPos = pMark->GetMarkPos(); - SwTextNode* pText = rBkMrkPos.nNode.GetNode().GetTextNode(); + SwTextNode* pText = rBkMrkPos.GetNode().GetTextNode(); if( pText && rBkMrkPos.nContent.GetIndex() ) { SwTextAttr* const pFootnote = pText->GetTextAttrForCharAt( @@ -4081,13 +4081,13 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) if (m_bCareFirstParaEndInToc) { m_bCareFirstParaEndInToc = false; - if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTextNode() && m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0) + if (m_pPaM->End() && m_pPaM->End()->GetNode().GetTextNode() && m_pPaM->End()->GetNode().GetTextNode()->Len() == 0) bSplit = false; } if (m_bCareLastParaEndInToc) { m_bCareLastParaEndInToc = false; - if (m_pPaM->End() && m_pPaM->End()->nNode.GetNode().GetTextNode() && m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0) + if (m_pPaM->End() && m_pPaM->End()->GetNode().GetTextNode() && m_pPaM->End()->GetNode().GetTextNode()->Len() == 0) bSplit = false; } if (bSplit) @@ -4607,7 +4607,7 @@ void wwSectionManager::InsertSegments() } const SwPosition* pPos = aSectPaM.GetPoint(); - SwTextNode const*const pSttNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode const*const pSttNd = pPos->GetNode().GetTextNode(); const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : nullptr; if (pTableNd) { @@ -5206,7 +5206,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss) m_rDoc.getIDocumentContentOperations().SplitNode( *pPos, false ); // another split, if insertion position was not at the end of the current paragraph. - SwTextNode const*const pTextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode const*const pTextNd = pPos->GetNode().GetTextNode(); if ( pTextNd->GetText().getLength() ) { m_rDoc.getIDocumentContentOperations().SplitNode( *pPos, false ); @@ -5418,7 +5418,7 @@ ErrCode SwWW8ImplReader::CoreLoad(WW8Glossary const *pGloss) if ( ppBkmk != pMarkAccess->getBookmarksEnd() && IDocumentMarkAccess::GetType(**ppBkmk) == IDocumentMarkAccess::MarkType::BOOKMARK ) { - SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().GetNode().GetTextNode(); if ( pTextNode ) { diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index f38bde4ac35a..972df1225e66 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2389,7 +2389,7 @@ void WW8TabDesc::CreateSwTable() { const SwPosition* pAPos = pFormat->GetAnchor().GetContentAnchor(); - if (pAPos && &pAPos->nNode.GetNode() == &pPoint->nNode.GetNode()) + if (pAPos && &pAPos->GetNode() == &pPoint->GetNode()) { bInsNode = true; bSetMinHeight = true; @@ -2465,7 +2465,7 @@ void WW8TabDesc::CreateSwTable() // contains a Pagedesc. If so that Pagedesc would be moved to the // row after the table, that would be wrong. So delete and // set later to the table format. - if (SwTextNode *const pNd = m_xTmpPos->GetPoint()->nNode.GetNode().GetTextNode()) + if (SwTextNode *const pNd = m_xTmpPos->GetPoint()->GetNode().GetTextNode()) { if (const SfxItemSet* pSet = pNd->GetpSwAttrSet()) { diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 0de01678a4bd..41b88884287a 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -559,8 +559,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() m_aTOXEndCps.insert(nCP); m_bLoadingTOXCache = false; if ( m_pPaM->End() && - m_pPaM->End()->nNode.GetNode().GetTextNode() && - m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() == 0 ) + m_pPaM->End()->GetNode().GetTextNode() && + m_pPaM->End()->GetNode().GetTextNode()->Len() == 0 ) { JoinNode(*m_pPaM); } @@ -594,7 +594,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() //Move outside the section associated with this type of field SwPosition aRestorePos(m_aFieldStack.back().maStartPos); - SwContentNode* pNd = aRestorePos.nNode.GetNode().GetContentNode(); + SwContentNode* pNd = aRestorePos.GetNode().GetContentNode(); sal_Int32 nMaxValidIndex = pNd ? pNd->Len() : 0; if (aRestorePos.nContent.GetIndex() > nMaxValidIndex) { @@ -3442,8 +3442,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) //#i10028# inserting a toc implicitly acts like a parabreak in word and writer if ( m_pPaM->End() && - m_pPaM->End()->nNode.GetNode().GetTextNode() && - m_pPaM->End()->nNode.GetNode().GetTextNode()->Len() != 0 ) + m_pPaM->End()->GetNode().GetTextNode() && + m_pPaM->End()->GetNode().GetTextNode()->Len() != 0 ) { m_bCareFirstParaEndInToc = true; } @@ -3456,7 +3456,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) SwFltTOX aFltTOX( pBase ); // test if there is already a break item on this node - if(SwContentNode* pNd = pPos->nNode.GetNode().GetContentNode()) + if(SwContentNode* pNd = pPos->GetNode().GetContentNode()) { const SfxItemSet* pSet = pNd->GetpSwAttrSet(); if( pSet ) diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index abc318a8e84c..72cde2bb5946 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const tools::Long nTextPos) bool insert = true; SwPaM pam( *mrReader.m_pLastAnchorPos ); if( pam.Move(fnMoveBackward, GoInNode)) - if( SwTextNode* txtNode = pam.GetPoint()->nNode.GetNode().GetTextNode()) + if( SwTextNode* txtNode = pam.GetPoint()->GetNode().GetTextNode()) if( txtNode->Len() == 0 ) insert = false; if( insert ) @@ -2824,13 +2824,13 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr, // #i103711# if ( bFirstLineOfStSet ) { - const SwNode* pNd = &(m_pPaM->GetPoint()->nNode.GetNode()); + const SwNode* pNd = &(m_pPaM->GetPoint()->GetNode()); m_aTextNodesHavingFirstLineOfstSet.insert( pNd ); } // #i105414# if ( bLeftIndentSet ) { - const SwNode* pNd = &(m_pPaM->GetPoint()->nNode.GetNode()); + const SwNode* pNd = &(m_pPaM->GetPoint()->GetNode()); m_aTextNodesHavingLeftIndentSet.insert( pNd ); } } diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx index 6d1aaa9b37af..3fae08a5271b 100644 --- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx +++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx @@ -162,7 +162,7 @@ XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc) { rPos.nNode = *m_pIndex; rPos.nNode++; // pIndex points to previous index !!! - rPos.nContent.Assign( rPos.nNode.GetNode().GetContentNode(), 0 ); + rPos.nContent.Assign( rPos.GetNode().GetContentNode(), 0 ); } } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index a3b7485fd9d3..d86bf0973a44 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -718,7 +718,7 @@ void SwXMLImport::endDocument() SwNodeOffset nNodeIdx = pPos->nNode.GetIndex(); pDoc = &pPaM->GetDoc(); - OSL_ENSURE( pPos->nNode.GetNode().IsContentNode(), + OSL_ENSURE( pPos->GetNode().IsContentNode(), "insert position is not a content node" ); if( !IsInsertMode() ) { @@ -744,7 +744,7 @@ void SwXMLImport::endDocument() // the next and the previous one. if( pCurrNd->CanJoinNext( &pPos->nNode )) { - SwTextNode* pNextNd = pPos->nNode.GetNode().GetTextNode(); + SwTextNode* pNextNd = pPos->GetNode().GetTextNode(); bool endNodeFound = pDoc->GetNodes()[nNodeIdx-1]->IsEndNode(); SwNode *pLastPar = pDoc->GetNodes()[nNodeIdx -2]; if ( !pLastPar->IsTextNode() ) { diff --git a/sw/source/ui/misc/contentcontroldlg.cxx b/sw/source/ui/misc/contentcontroldlg.cxx index 95c86120e497..a59854200bc0 100644 --- a/sw/source/ui/misc/contentcontroldlg.cxx +++ b/sw/source/ui/misc/contentcontroldlg.cxx @@ -72,7 +72,7 @@ SwContentControlDlg::SwContentControlDlg(weld::Window* pParent, SwWrtShell& rWrt m_xMoveDownBtn->connect_clicked(LINK(this, SwContentControlDlg, MoveDownHdl)); const SwPosition* pStart = rWrtShell.GetCursor()->Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (!pTextNode) { return; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index cf73c8c91947..d683185f657a 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1312,7 +1312,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if ( pRedline->GetType() == RedlineType::Delete ) { SwTableNode* pTableNd = - pRedline->GetPoint()->nNode.GetNode().FindTableNode(); + pRedline->GetPoint()->GetNode().FindTableNode(); if ( pTableNd && pTableNd != pOldTableNd && pTableNd->GetTable().HasDeletedRow() ) { diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index f4b37ce7a634..50dccbcded98 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1331,7 +1331,7 @@ SwPasteContext::~SwPasteContext() if (!pCursor) return; - if (!pCursor->GetPoint()->nNode.GetNode().IsTextNode()) + if (!pCursor->GetPoint()->GetNode().IsTextNode()) // Non-text was pasted. return; diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 56daa35f786a..92d1d75d4cd4 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -107,9 +107,9 @@ namespace { bool aAnchorBInFooter = false; // is the anchor placed in Footnote or the Footer? - if( aPosAnchorA.nNode.GetNode().FindFootnoteStartNode() || aPosAnchorA.nNode.GetNode().FindFooterStartNode() ) + if( aPosAnchorA.GetNode().FindFootnoteStartNode() || aPosAnchorA.GetNode().FindFooterStartNode() ) aAnchorAInFooter = true; - if( aPosAnchorB.nNode.GetNode().FindFootnoteStartNode() || aPosAnchorB.nNode.GetNode().FindFooterStartNode() ) + if( aPosAnchorB.GetNode().FindFootnoteStartNode() || aPosAnchorB.GetNode().FindFooterStartNode() ) aAnchorBInFooter = true; // fdo#34800 diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 01dbb8e4f23b..e5b3709d613f 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -1554,7 +1554,7 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt) const SwPosition* pAnchorPos = rFormatAnchor.GetContentAnchor(); if (pAnchorPos) { - SwTextNode* pTextNode = pAnchorPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchorPos->GetNode().GetTextNode(); if (pTextNode) { SwTextAttr* pAttr = pTextNode->GetTextAttrAt( @@ -2470,7 +2470,7 @@ KEYINPUT_CHECKTABLE_INSDEL: if (rSh.CursorInsideContentControl()) { const SwPosition* pStart = rSh.GetCursor()->Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (pTextNode) { sal_Int32 nIndex = pStart->nContent.GetIndex(); @@ -2944,8 +2944,8 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) if (!rSh.GetViewOptions()->IsHideWhitespaceMode()) { SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint()); - const bool bWasInHeader = aPam.GetPoint()->nNode.GetNode().FindHeaderStartNode() != nullptr; - const bool bWasInFooter = aPam.GetPoint()->nNode.GetNode().FindFooterStartNode() != nullptr; + const bool bWasInHeader = aPam.GetPoint()->GetNode().FindHeaderStartNode() != nullptr; + const bool bWasInFooter = aPam.GetPoint()->GetNode().FindFooterStartNode() != nullptr; // Is the cursor in a part like similar to the one we clicked on? For example, // if the cursor is in a header and we click on an empty header... don't change anything to @@ -4768,7 +4768,7 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt) const SwPosition* pAnchorPos = rFormatAnchor.GetContentAnchor(); if (pAnchorPos) { - SwTextNode* pTextNode = pAnchorPos->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchorPos->GetNode().GetTextNode(); if (pTextNode) { SwTextAttr* pAttr = pTextNode->GetTextAttrAt( @@ -5838,7 +5838,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) const SwPosition& rPos = *rSh.GetCursor()->GetPoint(); SwDocShell* pDocSh = m_rView.GetDocShell(); SwDoc *pDoc = pDocSh->GetDoc(); - SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.nNode.GetNode(), rPos.nContent.GetIndex() ); + SwExtTextInput* pInput = pDoc->GetExtTextInput( rPos.GetNode(), rPos.nContent.GetIndex() ); if ( pInput ) { const SwPosition& rStart = *pInput->Start(); @@ -6526,7 +6526,7 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r SwPaM aPam( *rSh.GetCurrentShellCursor().GetPoint() ); rSh.GetLayout()->GetModelPositionForViewPoint( aPam.GetPoint(), aPt, nullptr, true ); - const SwStartNode* pStartFly = aPam.GetPoint()->nNode.GetNode().FindFlyStartNode(); + const SwStartNode* pStartFly = aPam.GetPoint()->GetNode().FindFlyStartNode(); if ( pStartFly ) { bOverFly = true; @@ -6536,8 +6536,8 @@ bool SwEditWin::IsOverHeaderFooterFly( const Point& rDocPos, FrameControlType& r const SwPosition* pAnchor = pFlyFormat->GetAnchor( ).GetContentAnchor( ); if ( pAnchor ) { - bool bInHeader = pAnchor->nNode.GetNode( ).FindHeaderStartNode( ) != nullptr; - bool bInFooter = pAnchor->nNode.GetNode( ).FindFooterStartNode( ) != nullptr; + bool bInHeader = pAnchor->GetNode( ).FindHeaderStartNode( ) != nullptr; + bool bInFooter = pAnchor->GetNode( ).FindFooterStartNode( ) != nullptr; bRet = bInHeader || bInFooter; if ( bInHeader ) diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index a7aeb028c45e..3c4802b84f79 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -201,7 +201,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) IDocumentMarkAccess::GetType(**ppBkmk) == IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK ) { - SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = (*ppBkmk)->GetMarkStart().GetNode().GetTextNode(); if ( pTextNode ) { sText = sw::GetExpandTextMerged(rSh.GetLayout(), *pTextNode, true, false, ExpandMode(0)); diff --git a/sw/source/uibase/lingu/hhcwrp.cxx b/sw/source/uibase/lingu/hhcwrp.cxx index 72651c5fc40f..967bf5ae7299 100644 --- a/sw/source/uibase/lingu/hhcwrp.cxx +++ b/sw/source/uibase/lingu/hhcwrp.cxx @@ -508,12 +508,12 @@ void SwHHCWrapper::Convert() SwPaM *pCursor = m_pView->GetWrtShell().GetCursor(); auto [pSttPos, pEndPos] = pCursor->StartEnd(); // SwPosition* - if (pSttPos->nNode.GetNode().IsTextNode() && - pEndPos->nNode.GetNode().IsTextNode()) + if (pSttPos->GetNode().IsTextNode() && + pEndPos->GetNode().IsTextNode()) { m_pConvArgs.reset( new SwConversionArgs( GetSourceLanguage(), - pSttPos->nNode.GetNode().GetTextNode(), pSttPos->nContent, - pEndPos->nNode.GetNode().GetTextNode(), pEndPos->nContent ) ); + pSttPos->GetNode().GetTextNode(), pSttPos->nContent, + pEndPos->GetNode().GetTextNode(), pEndPos->nContent ) ); } else // we are not in the text (maybe a graphic or OLE object is selected) let's start from the top { @@ -523,7 +523,7 @@ void SwHHCWrapper::Convert() aPam.Move( fnMoveBackward, GoInDoc ); // move to start of document pSttPos = aPam.GetPoint(); //! using a PaM here makes sure we will get only text nodes - SwTextNode *pTextNode = pSttPos->nNode.GetNode().GetTextNode(); + SwTextNode *pTextNode = pSttPos->GetNode().GetTextNode(); // just in case we check anyway... if (!pTextNode || !pTextNode->IsTextNode()) return; diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 2b12439494b8..df1dd5feedff 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -805,7 +805,7 @@ void SwRedlineAcceptDlg::InsertParents(SwRedlineTable::size_type nStart, SwRedli SwRedlineTable::size_type nNewTableParent = SwRedlineTable::npos; if ( // not recognized yet as tracked table row change nLastChangeInRow == SwRedlineTable::npos && - nullptr != ( pTableBox = pSh->GetRedline(i).Start()->nNode.GetNode().GetTableBox() ) && + nullptr != ( pTableBox = pSh->GetRedline(i).Start()->GetNode().GetTableBox() ) && nullptr != ( pTableLine = pTableBox->GetUpper() ) && // it's a tracked row change based on the cached row data RedlineType::None != pTableLine->GetRedlineType() ) diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 88a4c3e10c15..204646a5f13d 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -478,7 +478,7 @@ static bool lcl_CursorInDeletedTable(SwWrtShell &rSh) if ( rSh.GetLayout()->IsHideRedlines() ) return false; - SwTableNode* pTableNd = rSh.GetCursor()->GetPoint()->nNode.GetNode().FindTableNode(); + SwTableNode* pTableNd = rSh.GetCursor()->GetPoint()->GetNode().FindTableNode(); return pTableNd && pTableNd->GetTable().IsDeleted(); } diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 2d1043d068f4..a29fc014c41e 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -639,7 +639,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) SwPaM* pCursorPos = rSh.GetCursor(); if( pCursorPos ) { - LanguageType nLang = pCursorPos->GetPoint()->nNode.GetNode().GetTextNode()->GetLang(pCursorPos->GetPoint()->nContent.GetIndex()); + LanguageType nLang = pCursorPos->GetPoint()->GetNode().GetTextNode()->GetLang(pCursorPos->GetPoint()->nContent.GetIndex()); if (nLang == LANGUAGE_HUNGARIAN) nInsertFormat = rSh.GetNumberFormatter()->GetFormatIndex(NF_DATE_SYSTEM_LONG, nLang); } diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index 2e539c0a1308..7f0430d271d1 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -103,7 +103,7 @@ void SwEditWinUIObject::execute(const OUString& rAction, TextFrameIndex const nEndPos(aEndPos.toInt32()); auto & shell = getWrtShell(mxEditWin); - if (shell.GetCursor_()->GetPoint()->nNode.GetNode().GetTextNode()) + if (shell.GetCursor_()->GetPoint()->GetNode().GetTextNode()) { shell.Push(); shell.MovePara(GoCurrPara, fnParaEnd); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 0e3fb80bad1f..e534be0fa2ee 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -864,7 +864,7 @@ void SwView::Execute(SfxRequest &rReq) if ( !pRedline && m_pWrtShell->IsCursorInTable() ) { nRedline = 0; - auto pTabLine = pCursor->Start()->nNode.GetNode().GetTableBox()->GetUpper(); + auto pTabLine = pCursor->Start()->GetNode().GetTableBox()->GetUpper(); if ( RedlineType::None != pTabLine->GetRedlineType() ) { @@ -893,7 +893,7 @@ void SwView::Execute(SfxRequest &rReq) pRedline = rRedlineTable[nRedline]; // until next redline is not in the same row - SwTableBox* pTableBox = pRedline->Start()->nNode.GetNode().GetTableBox(); + SwTableBox* pTableBox = pRedline->Start()->GetNode().GetTableBox(); if ( !pTableBox || pTableBox->GetUpper() != pTabLine ) break; diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index b6885e87d644..249dce2e0e94 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -168,7 +168,7 @@ void SwView::ExecLingu(SfxRequest &rReq) // remember cursor position data for later restoration of the cursor const SwPosition *pPoint = m_pWrtShell->GetCursor()->GetPoint(); - bool bRestoreCursor = pPoint->nNode.GetNode().IsTextNode(); + bool bRestoreCursor = pPoint->GetNode().IsTextNode(); const SwNodeIndex aPointNodeIndex( pPoint->nNode ); sal_Int32 nPointIndex = pPoint->nContent.GetIndex(); @@ -641,7 +641,7 @@ bool SwView::ExecSpellPopup(const Point& rPt) SwCursorShell *pCursorShell = m_pWrtShell.get(); SwPaM *pCursor = pCursorShell->GetCursor(); SwPosition aPoint(*pCursor->GetPoint()); - const SwTextNode *pNode = aPoint.nNode.GetNode().GetTextNode(); + const SwTextNode *pNode = aPoint.GetNode().GetTextNode(); // Spell-check in case the idle jobs haven't had a chance to kick in. // This makes it possible to suggest spelling corrections for diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index cc26c1613a5b..bcb5f55c2ad7 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -429,7 +429,7 @@ void SwView::GetState(SfxItemSet &rSet) if (nullptr == pDoc->getIDocumentRedlineAccess().GetRedline(*pCursor->Start(), nullptr) && // except in the case of an inserted or deleted table row ( !m_pWrtShell->IsCursorInTable() || - (pTableBox = pCursor->Start()->nNode.GetNode().GetTableBox() ) == nullptr || + (pTableBox = pCursor->Start()->GetNode().GetTableBox() ) == nullptr || RedlineType::None == pTableBox->GetUpper()->GetRedlineType() ) ) { bDisable = true; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 7a6dea5d614d..ced3a3d19a33 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3381,7 +3381,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) { SwWrtShell* pWrtShell = m_pDocShell->GetWrtShell(); const SwPosition* pStart = pWrtShell->GetCursor()->Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (!pTextNode) { return; @@ -3435,7 +3435,7 @@ void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments) { SwWrtShell* pWrtShell = m_pDocShell->GetWrtShell(); const SwPosition* pStart = pWrtShell->GetCursor()->Start(); - SwTextNode* pTextNode = pStart->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pStart->GetNode().GetTextNode(); if (!pTextNode) { return; diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index 7c560fad3807..4c0e853df434 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -492,7 +492,7 @@ bool SwWrtShell::DelRight(bool const isReplaceHeuristic) if (pAnchor) { - SwTextNode* pTextNode = pAnchor->nNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = pAnchor->GetNode().GetTextNode(); if (pTextNode) { const SwTextField* pField( diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index d01467cfa3b9..b0b4c30d1dad 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -89,7 +89,7 @@ bool SwWrtShell::InsertField2(SwField const& rField, SwPaM* pAnnotationRange) if ( IsTableMode() ) { GetTableCrs()->Normalize( false ); - const SwPosition rStartPos( *(GetTableCrs()->GetMark()->nNode.GetNode().GetContentNode()), 0 ); + const SwPosition rStartPos( *(GetTableCrs()->GetMark()->GetNode().GetContentNode()), 0 ); KillPams(); if ( !IsEndOfPara() ) { |