From ab0d9af99b2dc69fa8e7463fb33ca28cbccf484d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Aug 2022 11:47:57 +0200 Subject: rename SwPaM::GetNode to GetPointNode/GetContentNode Using a parameter to select point/mark makes the code much harder to read Change-Id: I4ac8b904ac423e2b99253b7e4b6adc72c8afe1a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138083 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/crsrsh.hxx | 2 +- sw/inc/pam.hxx | 10 +- sw/qa/core/doc/doc.cxx | 4 +- sw/qa/core/fields/fields.cxx | 2 +- sw/qa/core/txtnode/txtnode.cxx | 2 +- sw/qa/core/unocore/unocore.cxx | 16 +- sw/qa/core/uwriter.cxx | 44 +++--- sw/qa/extras/htmlexport/htmlexport.cxx | 2 +- sw/qa/extras/htmlimport/htmlimport.cxx | 2 +- sw/qa/extras/tiledrendering/tiledrendering.cxx | 16 +- sw/qa/extras/uiwriter/uiwriter.cxx | 16 +- sw/qa/extras/uiwriter/uiwriter2.cxx | 30 ++-- sw/qa/extras/uiwriter/uiwriter3.cxx | 16 +- sw/qa/extras/uiwriter/uiwriter4.cxx | 4 +- sw/qa/extras/uiwriter/uiwriter5.cxx | 10 +- sw/qa/extras/uiwriter/uiwriter6.cxx | 20 +-- sw/qa/extras/uiwriter/uiwriter7.cxx | 166 ++++++++++----------- sw/qa/extras/unowriter/unowriter.cxx | 2 +- sw/qa/uibase/wrtsh/wrtsh.cxx | 20 +-- sw/source/core/crsr/crsrsh.cxx | 20 +-- sw/source/core/crsr/crstrvl.cxx | 8 +- sw/source/core/crsr/swcrsr.cxx | 34 ++--- sw/source/core/crsr/trvlfnfl.cxx | 2 +- sw/source/core/crsr/trvlreg.cxx | 2 +- sw/source/core/crsr/trvltbl.cxx | 2 +- .../core/doc/DocumentContentOperationsManager.cxx | 6 +- sw/source/core/doc/doc.cxx | 4 +- sw/source/core/doc/docnew.cxx | 10 +- sw/source/core/doc/docredln.cxx | 2 +- sw/source/core/doc/number.cxx | 2 +- sw/source/core/doc/textboxhelper.cxx | 2 +- sw/source/core/docnode/ndtbl.cxx | 6 +- sw/source/core/docnode/ndtbl1.cxx | 2 +- sw/source/core/edit/acorrect.cxx | 16 +- sw/source/core/edit/autofmt.cxx | 12 +- sw/source/core/edit/edattr.cxx | 2 +- sw/source/core/edit/eddel.cxx | 8 +- sw/source/core/edit/editsh.cxx | 24 +-- sw/source/core/edit/edlingu.cxx | 10 +- sw/source/core/edit/ednumber.cxx | 10 +- sw/source/core/edit/edtab.cxx | 6 +- sw/source/core/edit/edws.cxx | 8 +- sw/source/core/frmedt/fecopy.cxx | 24 +-- sw/source/core/frmedt/fefly1.cxx | 2 +- sw/source/core/frmedt/fetab.cxx | 4 +- sw/source/core/frmedt/tblsel.cxx | 6 +- sw/source/core/layout/trvlfrm.cxx | 10 +- sw/source/core/table/swnewtable.cxx | 4 +- sw/source/core/text/frmcrsr.cxx | 12 +- sw/source/core/text/itrform2.cxx | 2 +- sw/source/core/undo/unattr.cxx | 6 +- sw/source/core/undo/undel.cxx | 2 +- sw/source/core/undo/undobj.cxx | 10 +- sw/source/core/undo/undobj1.cxx | 2 +- sw/source/core/undo/unmove.cxx | 4 +- sw/source/core/undo/unovwr.cxx | 4 +- sw/source/core/undo/unredln.cxx | 4 +- sw/source/core/undo/unsort.cxx | 2 +- sw/source/core/undo/unspnd.cxx | 2 +- sw/source/core/undo/untbl.cxx | 12 +- sw/source/core/unocore/unocrsrhelper.cxx | 36 ++--- sw/source/core/unocore/unodraw.cxx | 6 +- sw/source/core/unocore/unofield.cxx | 4 +- sw/source/core/unocore/unoframe.cxx | 8 +- sw/source/core/unocore/unoftn.cxx | 4 +- sw/source/core/unocore/unolinebreak.cxx | 2 +- sw/source/core/unocore/unoobj.cxx | 14 +- sw/source/core/unocore/unoobj2.cxx | 14 +- sw/source/core/unocore/unoport.cxx | 2 +- sw/source/core/unocore/unoportenum.cxx | 2 +- sw/source/core/unocore/unoredline.cxx | 10 +- sw/source/core/unocore/unorefmk.cxx | 8 +- sw/source/core/unocore/unosect.cxx | 4 +- sw/source/core/unocore/unotbl.cxx | 10 +- sw/source/core/unocore/unotext.cxx | 38 ++--- sw/source/filter/basflt/fltshell.cxx | 4 +- sw/source/filter/basflt/shellio.cxx | 2 +- sw/source/filter/docx/swdocxreader.cxx | 2 +- sw/source/filter/html/htmlatr.cxx | 2 +- sw/source/filter/html/htmlfld.cxx | 2 +- sw/source/filter/html/htmlftn.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 6 +- sw/source/filter/html/htmlnumreader.cxx | 8 +- sw/source/filter/html/htmlnumwriter.cxx | 4 +- sw/source/filter/html/htmltab.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 10 +- sw/source/filter/html/wrthtml.cxx | 6 +- sw/source/filter/ww8/docxattributeoutput.cxx | 10 +- sw/source/filter/ww8/rtfexport.cxx | 2 +- sw/source/filter/ww8/wrtw8sty.cxx | 10 +- sw/source/filter/ww8/wrtww8.cxx | 6 +- sw/source/filter/ww8/ww8atr.cxx | 2 +- sw/source/filter/ww8/ww8par.cxx | 18 +-- sw/source/filter/ww8/ww8par2.cxx | 14 +- sw/source/filter/ww8/ww8par3.cxx | 6 +- sw/source/filter/ww8/ww8par5.cxx | 4 +- sw/source/filter/ww8/ww8par6.cxx | 8 +- sw/source/filter/xml/xmltbli.cxx | 2 +- sw/source/uibase/app/docsh.cxx | 2 +- .../uibase/dialog/SwSpellDialogChildWindow.cxx | 8 +- sw/source/uibase/dochdl/swdtflvr.cxx | 22 +-- sw/source/uibase/shells/basesh.cxx | 4 +- sw/source/uibase/shells/langhelper.cxx | 2 +- sw/source/uibase/shells/tabsh.cxx | 2 +- .../uibase/sidebar/WriterInspectorTextPanel.cxx | 4 +- sw/source/uibase/uiview/swcli.cxx | 2 +- sw/source/uibase/uno/unotxdoc.cxx | 2 +- sw/source/uibase/uno/unotxvw.cxx | 8 +- sw/source/uibase/wrtsh/delete.cxx | 8 +- sw/source/uibase/wrtsh/wrtsh1.cxx | 4 +- 110 files changed, 528 insertions(+), 528 deletions(-) diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d0770ef65cbc..306acf96f3fc 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -901,7 +901,7 @@ inline bool SwCursorShell::IsMultiSelection() const inline const SwTableNode* SwCursorShell::IsCursorInTable() const { - return m_pCurrentCursor->GetNode().FindTableNode(); + return m_pCurrentCursor->GetPointNode().FindTableNode(); } inline bool SwCursorShell::IsCursorPtAtEnd() const diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index f25b9c052551..d5d6c74e7031 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -230,7 +230,7 @@ public: { /** clear the mark position; this helps if mark's SwContentIndex is registered at some node, and that node is then deleted */ - *m_pMark = SwPosition( GetNode().GetNodes() ); + *m_pMark = SwPosition( GetPointNode().GetNodes() ); m_pMark = m_pPoint; } } @@ -276,15 +276,13 @@ public: { if ((*m_pPoint) <= (*m_pMark)) return { m_pPoint, m_pMark }; else return { m_pMark, m_pPoint }; } /// @return current Node at Point/Mark - SwNode & GetNode ( bool bPoint = true ) const - { - return ( bPoint ? m_pPoint->nNode : m_pMark->nNode ).GetNode(); - } + SwNode& GetPointNode() const { return m_pPoint->nNode.GetNode(); } + SwNode& GetMarkNode() const { return m_pMark->nNode.GetNode(); } /// @return current ContentNode at Point/Mark SwContentNode* GetContentNode( bool bPoint = true ) const { - return GetNode(bPoint).GetContentNode(); + return (bPoint ? m_pPoint->nNode : m_pMark->nNode).GetNode().GetContentNode(); } /** diff --git a/sw/qa/core/doc/doc.cxx b/sw/qa/core/doc/doc.cxx index 30bb1ffbf264..87bfd2697621 100644 --- a/sw/qa/core/doc/doc.cxx +++ b/sw/qa/core/doc/doc.cxx @@ -90,7 +90,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testNumDownIndent) SwEditWin& rEditWin = pDocShell->GetView()->GetEditWin(); KeyEvent aKeyEvent(0, KEY_TAB); rEditWin.KeyInput(aKeyEvent); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: \tB @@ -187,7 +187,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreDocTest, testIMEGrouping) // Then make sure that gets grouped together to a single undo action: SwWrtShell* pWrtShell = pDocShell->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(OUString("ab"), pTextNode->GetText()); // Without the accompanying fix in place, this test would have failed with: // - Expected: 1 diff --git a/sw/qa/core/fields/fields.cxx b/sw/qa/core/fields/fields.cxx index 0c57584939b4..6875b1b2c1ae 100644 --- a/sw/qa/core/fields/fields.cxx +++ b/sw/qa/core/fields/fields.cxx @@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(Test, testAuthorityTooltip) auto pField = dynamic_cast( SwCursorShell::GetFieldAtCursor(pCursor, /*bIncludeInputFieldAtStart=*/true)); CPPUNIT_ASSERT(pField); - SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode(); const SwTextAttr* pTextAttr = pTextNode->GetSwpHints().Get(0); const SwRootFrame* pLayout = pWrtShell->GetLayout(); OUString aTooltip = pField->GetAuthority(pTextAttr, pLayout); diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx index bad6155de8c0..d975c32c10fd 100644 --- a/sw/qa/core/txtnode/txtnode.cxx +++ b/sw/qa/core/txtnode/txtnode.cxx @@ -238,7 +238,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testCheckboxContentControlKeyboard) rEditWin.KeyInput(aKeyEvent); // Then make sure the state is toggled: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl diff --git a/sw/qa/core/unocore/unocore.cxx b/sw/qa/core/unocore/unocore.cxx index 1068892af94b..a8075211d06c 100644 --- a/sw/qa/core/unocore/unocore.cxx +++ b/sw/qa/core/unocore/unocore.cxx @@ -238,7 +238,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testLineBreakInsert) // Then make sure that both the line break and its matching text attribute is inserted: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: "\n" (newline) @@ -333,7 +333,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlInsert) // Then make sure that the text attribute is inserted: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); // Without the accompanying fix in place, this test would have failed, as the @@ -421,7 +421,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlTextPortionEnum) // Also test the doc model, make sure that there is a dummy character at the start and end, so // the user can explicitly decide if they want to expand the content control or not: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - OUString aText = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); + OUString aText = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText(); // Without the accompanying fix in place, this test would have failed with: // - Expected: ^Atest^A // - Actual : ^Atest @@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlCheckbox) // Then make sure that the specified properties are set: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -506,7 +506,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDropdown) // Then make sure that the specified properties are set: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -572,7 +572,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlPicture) // Then make sure that the specified properties are set: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -619,7 +619,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlDate) // Then make sure that the specified properties are set: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -701,7 +701,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreUnocoreTest, testContentControlPlainText) // Then make sure that the text attribute is inserted: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); CPPUNIT_ASSERT(pAttr); diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 79545969c457..45e35a636716 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -302,7 +302,7 @@ static SwTextNode* getModelToViewTestDocument(SwDoc *pDoc) pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); pDoc->getIDocumentContentOperations().InsertString(aPaM, "AAAAA BBBBB "); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); sal_Int32 nPos = aPaM.GetPoint()->GetContentIndex(); pTextNode->InsertItem(aFootnote, nPos, nPos); pDoc->getIDocumentContentOperations().InsertString(aPaM, " CCCCC "); @@ -354,7 +354,7 @@ static SwTextNode* getModelToViewTestDocument2(SwDoc *pDoc) (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_LISTENTRY] <<= vListEntries; (*pFieldmark->GetParameters())[ODF_FORMDROPDOWN_RESULT] <<= sal_Int32(0); pDoc->getIDocumentContentOperations().InsertString(aPaM, "CCCCC"); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(static_cast(11), pTextNode->GetText().getLength()); @@ -581,7 +581,7 @@ void SwDocTest::testSwScanner() SwNodeIndex aIdx(m_pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_MESSAGE("Has Text Node", pTextNode); @@ -618,7 +618,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem ); SwDocStat aDocStat; - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, IDEOGRAPHICFULLSTOP_D.getLength()); CPPUNIT_ASSERT_EQUAL(static_cast(2), aDocStat.nChar); @@ -651,7 +651,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aWestLangItem ); SwDocStat aDocStat; - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, test.getLength()); CPPUNIT_ASSERT_EQUAL_MESSAGE("words", static_cast(58), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL_MESSAGE("Asian characters and Korean syllables", static_cast(43), aDocStat.nAsianWord); @@ -671,7 +671,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeThree); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, aShouldBeThree.getLength()); CPPUNIT_ASSERT_EQUAL(static_cast(3), aDocStat.nWord); @@ -686,7 +686,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aShouldBeFive); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); aDocStat.Reset(); pTextNode->CountWords(aDocStat, 0, aShouldBeFive.getLength()); CPPUNIT_ASSERT_EQUAL(static_cast(5), aDocStat.nWord); @@ -698,7 +698,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); sal_Int32 nPos = aPaM.GetPoint()->GetContentIndex(); SwFormatFootnote aFootnote; aFootnote.SetNumStr("banana"); @@ -731,7 +731,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt)); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); aDocStat.Reset(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(static_cast(1), aDocStat.nWord); @@ -748,7 +748,7 @@ void SwDocTest::testSwScanner() static constexpr OUStringLiteral aString = u"Lorem ipsum"; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, aString); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(static_cast(2), aDocStat.nWord); @@ -809,7 +809,7 @@ void SwDocTest::testSwScanner() aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 0); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "redline-new-text "); aDocStat.Reset(); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->SetWordCountDirty(true); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(static_cast(2), aDocStat.nWord); @@ -829,7 +829,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', ' ')); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(12), aDocStat.nCharExcludingSpaces); @@ -838,7 +838,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " = ")); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -847,7 +847,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " _ ")); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -856,7 +856,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", " -- ")); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(5), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(14), aDocStat.nCharExcludingSpaces); @@ -865,7 +865,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '_')); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -874,7 +874,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', '-')); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -883,7 +883,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2012)); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -892,7 +892,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2015)); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(3), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -903,7 +903,7 @@ void SwDocTest::testSwScanner() //and endash as word separators for word-counting m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2013)); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -912,7 +912,7 @@ void SwDocTest::testSwScanner() m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replace('X', 0x2014)); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); @@ -922,7 +922,7 @@ void SwDocTest::testSwScanner() static constexpr OUStringLiteral sChunk = u" \u2013 "; m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, sTemplate.replaceAll("X", sChunk)); - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pTextNode->CountWords(aDocStat, 0, pTextNode->Len()); CPPUNIT_ASSERT_EQUAL(sal_uLong(4), aDocStat.nWord); CPPUNIT_ASSERT_EQUAL(sal_uLong(13), aDocStat.nCharExcludingSpaces); diff --git a/sw/qa/extras/htmlexport/htmlexport.cxx b/sw/qa/extras/htmlexport/htmlexport.cxx index d5fabe41245c..e3f2afb6de97 100644 --- a/sw/qa/extras/htmlexport/htmlexport.cxx +++ b/sw/qa/extras/htmlexport/htmlexport.cxx @@ -2183,7 +2183,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, testTrailingLineBreak) CPPUNIT_ASSERT(pTextDoc); pDoc = pTextDoc->GetDocShell()->GetDoc(); pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - OUString aActual = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); + OUString aActual = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText(); // Without the accompanying fix in place, this test would have failed, as the trailing // line-break was lost. CPPUNIT_ASSERT_EQUAL(OUString("test\n"), aActual); diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx b/sw/qa/extras/htmlimport/htmlimport.cxx index 19c776fe687e..866477d5ac30 100644 --- a/sw/qa/extras/htmlimport/htmlimport.cxx +++ b/sw/qa/extras/htmlimport/htmlimport.cxx @@ -206,7 +206,7 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, testImageWidthAuto) SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); CPPUNIT_ASSERT(pTextDoc); SwTextAttr const*const pAttr(pTextDoc->GetDocShell()->GetDoc()->GetEditShell()-> - GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); + GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT(pAttr); SwFrameFormat const*const pFmt(pAttr->GetFlyCnt().GetFrameFormat()); SwFormatFrameSize const& rSize(pFmt->GetFormatAttr(RES_FRM_SIZE)); diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 32233cda4349..d4cbf8d60c41 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -1193,14 +1193,14 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReordering) pWrtShell2->SplitNode(); SfxLokHelper::setView(nView1); pWrtShell1->SttEndDoc(/*bStt=*/true); - SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetPointNode().GetTextNode(); // View 1 types into the first paragraph. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'a', 0); Scheduler::ProcessEventsToIdle(); SfxLokHelper::setView(nView2); pWrtShell2->SttEndDoc(/*bStt=*/false); - SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetPointNode().GetTextNode(); // View 2 types into the second paragraph. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'z', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'z', 0); @@ -1238,7 +1238,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReorderingRedo) pWrtShell2->SplitNode(); SfxLokHelper::setView(nView1); pWrtShell1->SttEndDoc(/*bStt=*/true); - SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetPointNode().GetTextNode(); // View 1 types into the first paragraph, twice. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'f', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'f', 0); @@ -1250,7 +1250,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReorderingRedo) Scheduler::ProcessEventsToIdle(); SfxLokHelper::setView(nView2); pWrtShell2->SttEndDoc(/*bStt=*/false); - SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetPointNode().GetTextNode(); // View 2 types into the second paragraph. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'z', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'z', 0); @@ -1292,14 +1292,14 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testUndoReorderingMulti) pWrtShell2->SplitNode(); SfxLokHelper::setView(nView1); pWrtShell1->SttEndDoc(/*bStt=*/true); - SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode1 = pWrtShell1->GetCursor()->GetPointNode().GetTextNode(); // View 1 types into the first paragraph. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'a', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'a', 0); Scheduler::ProcessEventsToIdle(); SfxLokHelper::setView(nView2); pWrtShell2->SttEndDoc(/*bStt=*/false); - SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode2 = pWrtShell2->GetCursor()->GetPointNode().GetTextNode(); // View 2 types into the second paragraph, twice. pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYINPUT, 'x', 0); pXTextDocument->postKeyEvent(LOK_KEYEVENT_KEYUP, 'x', 0); @@ -3582,7 +3582,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDropDownContentControl) pXTextDocument->executeContentControlEvent(aArguments); // Then make sure that the document is updated accordingly: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: green // - Actual : choose an item @@ -3703,7 +3703,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDateContentControl) pXTextDocument->executeContentControlEvent(aArguments); // Then make sure that the document is updated accordingly: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed with: // - Expected: 2022-05-30 // - Actual : choose a date diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index f18b5868a802..d1dc0564daa2 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -148,7 +148,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceForward) pDoc->getIDocumentContentOperations().InsertString(aPaM, ORIGINAL_REPLACE_CONTENT); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); lcl_selectCharacters(aPaM, 5, 9); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); @@ -503,7 +503,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testReplaceBackward) SwPaM aPaM(aIdx); pDoc->getIDocumentContentOperations().InsertString(aPaM, "toto titi tutu"); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); lcl_selectCharacters(aPaM, 9, 5); pDoc->getIDocumentContentOperations().ReplaceRange(aPaM, "toto", false); @@ -573,7 +573,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testImportRTF) CPPUNIT_ASSERT(pRTFReader != nullptr); CPPUNIT_ASSERT_EQUAL(ERRCODE_NONE, aReader.Read(*pRTFReader)); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(OUString("fooHello world!"), pDoc->GetNodes()[nIndex - 1]->GetTextNode()->GetText()); CPPUNIT_ASSERT_EQUAL(OUString("bar"), pDoc->GetNodes()[nIndex]->GetTextNode()->GetText()); } @@ -1055,7 +1055,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionBlank) aWrap.Convert(); // Then - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(OUString(), pTextNode->GetText()); } @@ -1079,7 +1079,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionNonChineseText) aWrap.Convert(); // Then - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(OUString(NON_CHINESE_CONTENT), pTextNode->GetText()); } @@ -1103,7 +1103,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionTraditionalToSimplifie aWrap.Convert(); // Then - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(OUString(CHINESE_SIMPLIFIED_CONTENT), pTextNode->GetText()); } @@ -1127,7 +1127,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testChineseConversionSimplifiedToTraditiona aWrap.Convert(); // Then - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(OUString(CHINESE_TRADITIONAL_CONTENT), pTextNode->GetText()); } @@ -1429,7 +1429,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest, testTdf68183) SwNodeIndex aIdx(pDoc->GetNodes().GetEndOfContent(), -1); SwPaM aPaM(aIdx); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); CPPUNIT_ASSERT_EQUAL(false, pTextNode->GetSwAttrSet().HasItem(RES_PARATR_RSID)); // Then enable storing of RSID and make sure that the attribute is inserted. diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 8a903e4988af..8be6eb520413 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -832,17 +832,17 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "blahblah", false); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Redo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("blahblah"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Undo(); @@ -853,17 +853,17 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "x", false); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Redo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("x"), pCursor->GetPointNode().GetTextNode()->GetText()); rUndoManager.Undo(); @@ -876,14 +876,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("xyz"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetPointNode().GetTextNode()->GetText()); pWrtShell->StartOfSection(false); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText()); @@ -893,7 +893,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("xyz"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText()); @@ -905,7 +905,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("bar"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("bar\nquux\n"), pWrtShell->GetCursor()->GetText()); @@ -914,7 +914,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("xyz"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText()); @@ -923,7 +923,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("bar"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("bar\nquux\n"), pWrtShell->GetCursor()->GetText()); @@ -932,14 +932,14 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pWrtShell->StartOfSection(false); CPPUNIT_ASSERT_EQUAL(OUString("xyz"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("xyz\n\nquux\n"), pWrtShell->GetCursor()->GetText()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); - CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString("foo"), pCursor->GetPointNode().GetTextNode()->GetText()); pWrtShell->StartOfSection(false); pWrtShell->EndOfSection(true); CPPUNIT_ASSERT_EQUAL(OUString("foo"), pWrtShell->GetCursor()->GetText()); @@ -1952,7 +1952,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf108687_tabstop) { SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf108687_tabstop.odt"); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwNodeOffset nStartIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nStartIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(SwNodeOffset(9), nStartIndex); // Now pressing 'tab' should jump to the radio buttons. diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 79f8b9cf27ea..24d34f512388 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -769,7 +769,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf61154) const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); SwCursorShell* pShell(pDoc->GetEditShell()); - SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTitleNode = pShell->GetCursor()->GetPointNode().GetTextNode(); SwNodeIndex aIdx(*pTitleNode); // table of contents node shouldn't contain tracked deletion @@ -818,7 +818,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf100691) const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); SwCursorShell* pShell(pDoc->GetEditShell()); - SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTitleNode = pShell->GetCursor()->GetPointNode().GetTextNode(); SwNodeIndex aIdx(*pTitleNode); // table of contents node shouldn't contain invisible text @@ -1394,7 +1394,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20tocmark%19C%7Ctoxmark"), url); rView.JumpToSwMark(url.subView(1)); // SfxApplication::OpenDocExec_Impl eats the "#" CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "tocmark"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } @@ -1409,7 +1409,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url); rView.JumpToSwMark(url.subView(1)); CPPUNIT_ASSERT_EQUAL(OUString("foo"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } @@ -1429,7 +1429,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UUser-Defined%7Ctoxmark"), url); rView.JumpToSwMark(url.subView(1)); CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the first"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } @@ -1444,7 +1444,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#2%19the%20udmark%19UUser-Defined%7Ctoxmark"), url); rView.JumpToSwMark(url.subView(1)); CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_INWORD) + "udmark the 2nd"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } @@ -1459,7 +1459,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#__RefHeading___Toc105_706348105"), url); rView.JumpToSwMark(url.subView(1)); CPPUNIT_ASSERT_EQUAL(OUString("foo"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } @@ -1479,7 +1479,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testToxmarkLinks) CPPUNIT_ASSERT_EQUAL(OUString("#1%19the%20udmark%19UNewUD!%7C%7Ctoxmark"), url); rView.JumpToSwMark(url.subView(1)); CPPUNIT_ASSERT_EQUAL(OUString("the udmark"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); pWrtShell->Pop(SwCursorShell::PopMode::DeleteCurrent); } } diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index 1ae2c41366b3..acfea225418f 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -116,7 +116,7 @@ static OUString lcl_translitTest(SwDoc& rDoc, const SwPaM& rPaM, Transliteration utl::TransliterationWrapper aTrans(::comphelper::getProcessComponentContext(), nType); rDoc.getIDocumentContentOperations().TransliterateText(rPaM, aTrans); //SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - return rPaM.GetNode(false).GetTextNode()->GetText(); + return rPaM.GetMarkNode().GetTextNode()->GetText(); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testTdf146449) @@ -1195,7 +1195,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest4, testRedlineCopyPaste) SwPaM aPaM(aIdx); pDoc->getIDocumentContentOperations().InsertString(aPaM, "abzdezgh"); - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); // Turn on track changes, make changes, turn off track changes uno::Reference xPropertySet(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/extras/uiwriter/uiwriter5.cxx b/sw/qa/extras/uiwriter/uiwriter5.cxx index 4f12060a4cf8..4c0f776c7fc8 100644 --- a/sw/qa/extras/uiwriter/uiwriter5.cxx +++ b/sw/qa/extras/uiwriter/uiwriter5.cxx @@ -2537,7 +2537,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143904) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT(pWrtShell); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {}); pWrtShell->Down(false); @@ -2545,7 +2545,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf143904) SwTextNode* pTextNodeA1 = static_cast(pDoc->GetNodes()[nIndex]); CPPUNIT_ASSERT(pTextNodeA1->GetText().startsWith("Insert")); - nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNodeA2 = static_cast(pDoc->GetNodes()[nIndex]); CPPUNIT_ASSERT_EQUAL(OUString("foo"), pTextNodeA2->GetText()); CPPUNIT_ASSERT_EQUAL(false, pTextNodeA2->GetSwAttrSet().HasItem(RES_CHRATR_FONT)); @@ -2560,7 +2560,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf90069) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT(pWrtShell); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); dispatchCommand(mxComponent, ".uno:InsertRowsAfter", {}); pWrtShell->Down(false); @@ -2568,7 +2568,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf90069) SwTextNode* pTextNodeA1 = static_cast(pDoc->GetNodes()[nIndex]); CPPUNIT_ASSERT(pTextNodeA1->GetText().startsWith("Insert")); - nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNodeA2 = static_cast(pDoc->GetNodes()[nIndex]); CPPUNIT_ASSERT_EQUAL(OUString("foo"), pTextNodeA2->GetText()); CPPUNIT_ASSERT_EQUAL(true, pTextNodeA2->GetSwAttrSet().HasItem(RES_CHRATR_FONT)); @@ -2583,7 +2583,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest5, testTdf109266) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); CPPUNIT_ASSERT(pWrtShell); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNode = static_cast(pDoc->GetNodes()[nIndex]); CPPUNIT_ASSERT_EQUAL(OUString("Lorem ipsum..."), pTextNode->GetText()); diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 11129f9d1138..5c314179ca93 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -162,7 +162,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testLinesMoveBackwardsInSectionInTable) // Remove paragraph "4". SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - while (pWrtShell->GetCursor()->GetNode().GetIndex() < nPara4Node) + while (pWrtShell->GetCursor()->GetPointNode().GetIndex() < nPara4Node) pWrtShell->Down(/*bSelect=*/false); pWrtShell->EndPara(); pWrtShell->Up(/*bSelect=*/true); @@ -469,7 +469,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf112160) // Append a new paragraph to the end of the A2 cell. SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - while (pWrtShell->GetCursor()->GetNode().GetIndex() < nA2CellNode) + while (pWrtShell->GetCursor()->GetPointNode().GetIndex() < nA2CellNode) pWrtShell->Down(/*bSelect=*/false); pWrtShell->EndPara(); pWrtShell->SplitNode(); @@ -525,7 +525,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfContents) const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); SwCursorShell* pShell(pDoc->GetEditShell()); - SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTitleNode = pShell->GetCursor()->GetPointNode().GetTextNode(); SwNodeIndex aIdx(*pTitleNode); // skip the title pDoc->GetNodes().GoNext(&aIdx); @@ -552,7 +552,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfFigures) const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); SwCursorShell* pShell(pDoc->GetEditShell()); - SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTitleNode = pShell->GetCursor()->GetPointNode().GetTextNode(); SwNodeIndex aIdx(*pTitleNode); // skip the title @@ -577,7 +577,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf99689TableOfTables) const SwTOXBase* pTOXBase = pWrtShell->GetCurTOX(); pWrtShell->UpdateTableOf(*pTOXBase); SwCursorShell* pShell(pDoc->GetEditShell()); - SwTextNode* pTitleNode = pShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTitleNode = pShell->GetCursor()->GetPointNode().GetTextNode(); SwNodeIndex aIdx(*pTitleNode); // skip the title @@ -943,11 +943,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) pWrtShell->GotoTable(rTableName); do { - const SwStartNode* pNd = pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode(); + const SwStartNode* pNd = pWrtShell->GetCursor()->GetPointNode().FindTableBoxStartNode(); pWrtShell->DelRight(); - CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode()); + CPPUNIT_ASSERT_EQUAL(pNd, + pWrtShell->GetCursor()->GetPointNode().FindTableBoxStartNode()); pWrtShell->DelLeft(); - CPPUNIT_ASSERT_EQUAL(pNd, pWrtShell->GetCursor()->GetNode().FindTableBoxStartNode()); + CPPUNIT_ASSERT_EQUAL(pNd, + pWrtShell->GetCursor()->GetPointNode().FindTableBoxStartNode()); } while (pWrtShell->GoNextCell(false)); } } @@ -1056,7 +1058,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf51223) SwDoc* pDoc = createSwDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); pWrtShell->Insert("i"); pWrtShell->SplitNode(true); CPPUNIT_ASSERT_EQUAL(OUString("I"), diff --git a/sw/qa/extras/uiwriter/uiwriter7.cxx b/sw/qa/extras/uiwriter/uiwriter7.cxx index 37e0e276a566..a24201b78b2f 100644 --- a/sw/qa/extras/uiwriter/uiwriter7.cxx +++ b/sw/qa/extras/uiwriter/uiwriter7.cxx @@ -338,7 +338,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) CPPUNIT_ASSERT_EQUAL(sal_Int32(4), ReplaceCount); // check of the end result CPPUNIT_ASSERT_EQUAL(OUString("xCelqy xWorqd xThzq xis xa xtasq"), - pCursor->GetNode().GetTextNode()->GetText()); + pCursor->GetPointNode().GetTextNode()->GetText()); // regex: use positive look-ahead assertion xReplaceDes->setSearchString("Wor(?=qd xThzq xis xa xtasq)"); xReplaceDes->setReplaceString("&p"); // testing & reference @@ -351,7 +351,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTextSearch) CPPUNIT_ASSERT_EQUAL(sal_Int32(5), ReplaceCount); // one of the 6 "x" must not be replaced // check of the end result CPPUNIT_ASSERT_EQUAL(OUString("mCelqy xWorpqd mThzq mis ma mtasq"), - pCursor->GetNode().GetTextNode()->GetText()); + pCursor->GetPointNode().GetTextNode()->GetText()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf69282) @@ -578,7 +578,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf72788) rIDCO.InsertPoolItem(*pCursor, aWeightItem); SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items); //Add selected text's attributes to aSet - pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 5, 12); + pCursor->GetPointNode().GetTextNode()->GetParaAttr(aSet, 5, 12); SfxPoolItem const* pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); //Check that bold is active on the selection and it's in aSet CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem == aWeightItem)); @@ -593,7 +593,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf72788) pCursor->Move(fnMoveForward); } //Clear all the Direct Formatting ( Ctrl + M ) - SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode(); SwContentIndex aSt(pTextNode, 0); sal_Int32 nEnd = pTextNode->Len(); pTextNode->RstTextAttr(aSt, nEnd - aSt.GetIndex()); @@ -856,7 +856,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old footnote 1 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd1 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd1 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote1 = pTextNd1->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote1(pFootnote1->GetFootnote()); @@ -865,7 +865,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote1->GetSeqRefNo()); //old footnote 2 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd2 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd2 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote2 = pTextNd2->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote2(pFootnote2->GetFootnote()); @@ -874,7 +874,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote2->GetSeqRefNo()); //old footnote 3 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd3 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd3 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote3 = pTextNd3->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote3(pFootnote3->GetFootnote()); @@ -897,7 +897,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny); //new footnote 1 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd4 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd4 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote4 = pTextNd4->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote4(pFootnote4->GetFootnote()); @@ -925,7 +925,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(4)), aAny); //new footnote 1 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd11 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd11 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote11 = pTextNd11->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote11(pFootnote11->GetFootnote()); @@ -955,7 +955,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(2)), aAny); //old footnote 1 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd12 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd12 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote12 = pTextNd12->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote12(pFootnote12->GetFootnote()); @@ -964,7 +964,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(sal_uInt16(2), pTFNote12->GetSeqRefNo()); //old footnote 2 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd13 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd13 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote13 = pTextNd13->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote13(pFootnote13->GetFootnote()); @@ -973,7 +973,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), pTFNote13->GetSeqRefNo()); //old footnote 3 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd14 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd14 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote14 = pTextNd14->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote14(pFootnote14->GetFootnote()); @@ -996,7 +996,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf77342) CPPUNIT_ASSERT_EQUAL(uno::Any(sal_uInt16(3)), aAny); //old footnote 4 pCursor->Move(fnMoveForward); - SwTextNode* pTextNd15 = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd15 = pCursor->GetPointNode().GetTextNode(); SwTextAttr* const pFootnote15 = pTextNd15->GetTextAttrForCharAt(pCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FTN); const SwFormatFootnote& rFootnote15(pFootnote15->GetFootnote()); @@ -1570,13 +1570,13 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf75137) SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwShellCursor* pShellCursor = pWrtShell->getShellCursor(true); pWrtShell->InsertFootnote("This is first footnote"); - SwNodeOffset firstIndex = pShellCursor->GetNode().GetIndex(); + SwNodeOffset firstIndex = pShellCursor->GetPointNode().GetIndex(); pShellCursor->GotoFootnoteAnchor(); pWrtShell->InsertFootnote("This is second footnote"); pWrtShell->Up(false); - SwNodeOffset secondIndex = pShellCursor->GetNode().GetIndex(); + SwNodeOffset secondIndex = pShellCursor->GetPointNode().GetIndex(); pWrtShell->Down(false); - SwNodeOffset thirdIndex = pShellCursor->GetNode().GetIndex(); + SwNodeOffset thirdIndex = pShellCursor->GetPointNode().GetIndex(); CPPUNIT_ASSERT_EQUAL(firstIndex, thirdIndex); CPPUNIT_ASSERT(firstIndex != secondIndex); } @@ -1823,16 +1823,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsCharTdf107512) pShell->SelectTextModel(1, 4); rIDCO.InsertPoolItem(*pShell->GetCursor(), hidden); // now we have "\1foo\1" with the "foo" hidden - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL( OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), - pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); SfxPoolItem const* pItem; SfxItemSet query(pDoc->GetAttrPool(), svl::Items); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 1, 4); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); CPPUNIT_ASSERT(static_cast(pItem)->GetValue()); query.ClearItem(RES_CHRATR_HIDDEN); @@ -1840,56 +1840,56 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsCharTdf107512) // delete from the start pShell->SelectTextModel(0, 4); rIDCO.DeleteAndJoin(*pShell->GetCursor()); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Undo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); CPPUNIT_ASSERT_EQUAL( OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), - pShell->GetCursor()->GetNode().GetTextNode()->GetText()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 1, 4); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); CPPUNIT_ASSERT(static_cast(pItem)->GetValue()); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Redo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Undo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); CPPUNIT_ASSERT_EQUAL( OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), - pShell->GetCursor()->GetNode().GetTextNode()->GetText()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 1, 4); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); CPPUNIT_ASSERT(static_cast(pItem)->GetValue()); query.ClearItem(RES_CHRATR_HIDDEN); @@ -1897,56 +1897,56 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsCharTdf107512) // delete from the end pShell->SelectTextModel(1, 5); rIDCO.DeleteAndJoin(*pShell->GetCursor()); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Undo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); CPPUNIT_ASSERT_EQUAL( OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), - pShell->GetCursor()->GetNode().GetTextNode()->GetText()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 1, 4); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); CPPUNIT_ASSERT(static_cast(pItem)->GetValue()); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Redo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); rUndoManager.Undo(); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT( - pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 0, RES_TXTATR_FLYCNT)); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->GetTextAttrForCharAt( + 4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); CPPUNIT_ASSERT_EQUAL( OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), - pShell->GetCursor()->GetNode().GetTextNode()->GetText()); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); - pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); + pShell->GetCursor()->GetPointNode().GetTextNode()->GetParaAttr(query, 1, 4); CPPUNIT_ASSERT_EQUAL(SfxItemState::SET, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); CPPUNIT_ASSERT(static_cast(pItem)->GetValue()); query.ClearItem(RES_CHRATR_HIDDEN); @@ -1975,7 +1975,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoCharAttribute) rIDCO.InsertPoolItem(*pCursor, aWeightItem); SfxItemSet aSet(pDoc->GetAttrPool(), svl::Items); // Adds selected text's attributes to aSet - pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 10, 19); + pCursor->GetPointNode().GetTextNode()->GetParaAttr(aSet, 10, 19); SfxPoolItem const* pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); // Check that bold is active on the selection; checks if it's in aSet CPPUNIT_ASSERT_EQUAL(true, (*pPoolItem == aWeightItem)); @@ -1983,7 +1983,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoCharAttribute) rUndoManager.Undo(); // Check that bold is no longer active aSet.ClearItem(RES_CHRATR_WEIGHT); - pCursor->GetNode().GetTextNode()->GetParaAttr(aSet, 10, 19); + pCursor->GetPointNode().GetTextNode()->GetParaAttr(aSet, 10, 19); pPoolItem = aSet.GetItem(RES_CHRATR_WEIGHT); CPPUNIT_ASSERT_EQUAL(false, (*pPoolItem == aWeightItem)); } @@ -2005,20 +2005,20 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUndoDelAsChar) pShell->Left(1, SwCursorSkipMode::Chars); rIDCO.DeleteAndJoin(*pShell->GetCursor()); CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT(!pShell->GetCursor()->GetNode().GetTextNode()->HasHints()); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT(!pShell->GetCursor()->GetPointNode().GetTextNode()->HasHints()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->HasHints()); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->HasHints()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); rUndoManager.Redo(); CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT(!pShell->GetCursor()->GetNode().GetTextNode()->HasHints()); - CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT(!pShell->GetCursor()->GetPointNode().GetTextNode()->HasHints()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); rUndoManager.Undo(); CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); - CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->HasHints()); - CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetNode().GetTextNode()->Len()); + CPPUNIT_ASSERT(pShell->GetCursor()->GetPointNode().GetTextNode()->HasHints()); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), pShell->GetCursor()->GetPointNode().GetTextNode()->Len()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testTdf86639) @@ -2325,16 +2325,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest7, testUnicodeNotationToggle) uno::Sequence aPropertyValues; pWrtShell->EndPara(); - sOriginalDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); + sOriginalDocString = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText(); CPPUNIT_ASSERT_EQUAL(OUString("uU+002b"), sOriginalDocString); dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues); sExpectedString = "u+"; - sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); + sDocString = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText(); CPPUNIT_ASSERT_EQUAL(sDocString, sExpectedString); dispatchCommand(mxComponent, ".uno:UnicodeNotationToggle", aPropertyValues); - sDocString = pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText(); + sDocString = pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText(); CPPUNIT_ASSERT_EQUAL(sDocString, sOriginalDocString); } diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx index 02b3002fd13c..2c2bd6f6f03d 100644 --- a/sw/qa/extras/unowriter/unowriter.cxx +++ b/sw/qa/extras/unowriter/unowriter.cxx @@ -739,7 +739,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testSelectionInTableEnum) pWrtShell->Down(/*bSelect=*/false); pWrtShell->EndPara(/*bSelect=*/true); CPPUNIT_ASSERT_EQUAL(OUString("A1"), - pWrtShell->GetCursor()->GetNode().GetTextNode()->GetText()); + pWrtShell->GetCursor()->GetPointNode().GetTextNode()->GetText()); // Access the selection. uno::Reference xModel(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/uibase/wrtsh/wrtsh.cxx b/sw/qa/uibase/wrtsh/wrtsh.cxx index b5bf67899b0d..fb0d9d80d64a 100644 --- a/sw/qa/uibase/wrtsh/wrtsh.cxx +++ b/sw/qa/uibase/wrtsh/wrtsh.cxx @@ -76,7 +76,7 @@ CPPUNIT_TEST_FIXTURE(Test, testGotoContentControl) // When going to that content control in placeholder mode: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwNodeOffset nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + SwNodeOffset nIndex = pWrtShell->GetCursor()->GetPointNode().GetIndex(); SwTextNode* pTextNode = pDoc->GetNodes()[nIndex]->GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); @@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTickCheckboxContentControl) // When clicking on that content control: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -140,7 +140,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertContentControl) pWrtShell->InsertContentControl(SwContentControlType::RICH_TEXT); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); // Without the accompanying fix in place, this test would have failed, nothing happened on // InsertContentControl(). CPPUNIT_ASSERT(pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL)); @@ -156,7 +156,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertCheckboxContentControl) pWrtShell->InsertContentControl(SwContentControlType::CHECKBOX); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -202,7 +202,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSelectDropdownContentControl) // When clicking on that content control: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -228,7 +228,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertDropdownContentControl) pWrtShell->InsertContentControl(SwContentControlType::DROP_DOWN_LIST); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -296,7 +296,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertPictureContentControl) pWrtShell->InsertContentControl(SwContentControlType::PICTURE); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -329,7 +329,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSelectDateContentControl) // When clicking on that content control: SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -357,7 +357,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertDateContentControl) pWrtShell->InsertContentControl(SwContentControlType::DATE); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl @@ -378,7 +378,7 @@ CPPUNIT_TEST_FIXTURE(Test, testInsertPlainTextContentControl) pWrtShell->InsertContentControl(SwContentControlType::PLAIN_TEXT); // Then make sure that the matching text attribute is added to the document model: - SwTextNode* pTextNode = pWrtShell->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pWrtShell->GetCursor()->GetPointNode().GetTextNode(); SwTextAttr* pAttr = pTextNode->GetTextAttrForCharAt(0, RES_TXTATR_CONTENTCONTROL); auto pTextContentControl = static_txtattr_cast(pAttr); auto& rFormatContentControl diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index afd523c55ae3..7bd31be3fcdb 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -546,7 +546,7 @@ bool SwCursorShell::LRMargin( bool bLeft, bool bAPI) if ( bLeft && !bTableMode && bRet && bWasAtLM && !GetCursor_()->HasMark() ) { - const SwTextNode * pTextNd = GetCursor_()->GetNode().GetTextNode(); + const SwTextNode * pTextNd = GetCursor_()->GetPointNode().GetTextNode(); assert(sw::GetParaPropsNode(*GetLayout(), GetCursor_()->GetPoint()->GetNode()) == pTextNd); if ( pTextNd && pTextNd->HasVisibleNumberingOrBullet() ) SetInFrontOfLabel( true ); @@ -1149,7 +1149,7 @@ bool SwCursorShell::IsEndOfTable() const bool SwCursorShell::IsCursorInFootnote() const { - SwStartNodeType aStartNodeType = m_pCurrentCursor->GetNode().StartOfSectionNode()->GetStartNodeType(); + SwStartNodeType aStartNodeType = m_pCurrentCursor->GetPointNode().StartOfSectionNode()->GetStartNodeType(); return aStartNodeType == SwStartNodeType::SwFootnoteStartNode; } @@ -1603,8 +1603,8 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) if( pTstCursor->HasMark() && !m_pBlockCursor && SwDoc::IsIdxInTable( pTstCursor->GetPoint()->nNode ) && ( m_pTableCursor || - pTstCursor->GetNode().StartOfSectionNode() != - pTstCursor->GetNode( false ).StartOfSectionNode() ) && !mbSelectAll) + pTstCursor->GetPointNode().StartOfSectionNode() != + pTstCursor->GetMarkNode().StartOfSectionNode() ) && !mbSelectAll) { SwShellCursor* pITmpCursor = getShellCursor( true ); Point aTmpPt( pITmpCursor->GetPtPos() ); @@ -1777,7 +1777,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { SwShellCursor* pShellCursor = getShellCursor( true ); bool bChgState = true; - const SwSectionNode* pSectNd = pShellCursor->GetNode().FindSectionNode(); + const SwSectionNode* pSectNd = pShellCursor->GetPointNode().FindSectionNode(); if( pSectNd && ( pSectNd->GetSection().IsHiddenFlag() || ( !IsReadOnlyAvailable() && pSectNd->GetSection().IsProtectFlag() && @@ -2597,7 +2597,7 @@ OUString SwCursorShell::GetSelText() const else if( m_pCurrentCursor->GetPoint()->GetNodeIndex() == m_pCurrentCursor->GetMark()->GetNodeIndex() ) { - SwTextNode* pTextNd = m_pCurrentCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd = m_pCurrentCursor->GetPointNode().GetTextNode(); if( pTextNd ) { const sal_Int32 nStt = m_pCurrentCursor->Start()->GetContentIndex(); @@ -3190,22 +3190,22 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText ) // move forward into non-protected area. SwPaM aPam( rNdIdx.GetNode(), 0 ); - while( aPam.GetNode().IsProtect() && + while( aPam.GetPointNode().IsProtect() && aPam.Move( fnMoveForward, GoInContent ) ) ; // nothing to do in the loop; the aPam.Move does the moving! // didn't work? then go backwards! - if( aPam.GetNode().IsProtect() ) + if( aPam.GetPointNode().IsProtect() ) { SwPaM aTmpPaM( rNdIdx.GetNode(), 0 ); aPam = aTmpPaM; - while( aPam.GetNode().IsProtect() && + while( aPam.GetPointNode().IsProtect() && aPam.Move( fnMoveBackward, GoInContent ) ) ; // nothing to do in the loop; the aPam.Move does the moving! } // if we're successful, set the new position - if( ! aPam.GetNode().IsProtect() ) + if( ! aPam.GetPointNode().IsProtect() ) { *m_pCurrentCursor->GetPoint() = *aPam.GetPoint(); } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 01de0e18338e..ae45c38c46bb 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -1092,7 +1092,7 @@ bool SwCursorShell::GotoNextOutline() } SwCursor* pCursor = getShellCursor( true ); - SwNode* pNd = &(pCursor->GetNode()); + SwNode* pNd = &(pCursor->GetPointNode()); SwOutlineNodes::size_type nPos; bool bUseFirst = !rNds.GetOutLineNds().Seek_Entry( pNd, &nPos ); SwOutlineNodes::size_type const nStartPos(nPos); @@ -1157,7 +1157,7 @@ bool SwCursorShell::GotoPrevOutline() } SwCursor* pCursor = getShellCursor( true ); - SwNode* pNd = &(pCursor->GetNode()); + SwNode* pNd = &(pCursor->GetPointNode()); SwOutlineNodes::size_type nPos; bool bRet = false; (void)rNds.GetOutLineNds().Seek_Entry(pNd, &nPos); @@ -1215,7 +1215,7 @@ SwOutlineNodes::size_type SwCursorShell::GetOutlinePos(sal_uInt8 nLevel, SwPaM* SwPaM* pCursor = pPaM ? pPaM : getShellCursor(true); const SwNodes& rNds = GetDoc()->GetNodes(); - SwNode* pNd = &(pCursor->GetNode()); + SwNode* pNd = &(pCursor->GetPointNode()); SwOutlineNodes::size_type nPos; if( rNds.GetOutLineNds().Seek_Entry( pNd, &nPos )) nPos++; // is at correct position; take next for while @@ -1228,7 +1228,7 @@ SwOutlineNodes::size_type SwCursorShell::GetOutlinePos(sal_uInt8 nLevel, SwPaM* && pNd->GetTextNode()->GetAttrOutlineLevel()-1 <= nLevel) { if (pNd->GetIndex() < rNds.GetEndOfExtras().GetIndex() - && pCursor->GetNode().GetIndex() > rNds.GetEndOfExtras().GetIndex()) + && pCursor->GetPointNode().GetIndex() > rNds.GetEndOfExtras().GetIndex()) { // node found in extras but cursor position is not in extras return SwOutlineNodes::npos; diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 796ee5c53b49..02a721f4baa7 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -513,7 +513,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) nSttEndTable = rNds[ nSEIdx ]->StartOfSectionIndex() - 1; GetPoint()->nNode = nSttEndTable; - const SwNode* pMyNd = &(GetNode()); + const SwNode* pMyNd = &(GetPointNode()); if( pMyNd->IsSectionNode() || ( pMyNd->IsEndNode() && pMyNd->StartOfSectionNode()->IsSectionNode() ) ) @@ -617,7 +617,7 @@ bool SwCursor::IsInProtectTable( bool bMove, bool bChgCursor ) // search next valid box // if there is another StartNode after the EndNode of a cell then // there is another cell - SwNodeIndex aCellStt( *GetNode().FindTableBoxStartNode()->EndOfSectionNode(), 1 ); + SwNodeIndex aCellStt( *GetPointNode().FindTableBoxStartNode()->EndOfSectionNode(), 1 ); bool bProt = true; GoNextCell: for (;;) { @@ -667,7 +667,7 @@ SetNextCursor: { // if there is another EndNode in front of the StartNode than there // exists a previous cell - SwNodeIndex aCellStt( *GetNode().FindTableBoxStartNode(), -1 ); + SwNodeIndex aCellStt( *GetPointNode().FindTableBoxStartNode(), -1 ); SwNode* pNd; bool bProt = true; GoPrevCell: @@ -1212,7 +1212,7 @@ bool SwCursor::SelectWord( SwViewShell const * pViewShell, const Point* pPt ) bool SwCursor::IsStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) const { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { sal_Int32 nPtPos = GetPoint()->GetContentIndex(); @@ -1230,7 +1230,7 @@ bool SwCursor::IsStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayou bool SwCursor::IsEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) const { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { sal_Int32 nPtPos = GetPoint()->GetContentIndex(); @@ -1249,7 +1249,7 @@ bool SwCursor::IsEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) bool SwCursor::IsInWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) const { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { sal_Int32 nPtPos = GetPoint()->GetContentIndex(); @@ -1296,7 +1296,7 @@ bool SwCursor::IsStartEndSentence(bool bEnd, SwRootFrame const*const pLayout) co bool SwCursor::GoStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { SwCursorSaveState aSave( *this ); @@ -1325,7 +1325,7 @@ bool SwCursor::GoStartWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayou bool SwCursor::GoEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { SwCursorSaveState aSave( *this ); @@ -1355,7 +1355,7 @@ bool SwCursor::GoEndWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) bool SwCursor::GoNextWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { SwCursorSaveState aSave( *this ); @@ -1383,7 +1383,7 @@ bool SwCursor::GoNextWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout bool SwCursor::GoPrevWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { SwCursorSaveState aSave( *this ); @@ -1429,7 +1429,7 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType pLayout->GetModelPositionForViewPoint( GetPoint(), aPt ); } - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { // Should we select the whole fieldmark? @@ -1557,7 +1557,7 @@ static OUString lcl_MaskDeletedRedlines( const SwTextNode* pTextNd ) bool SwCursor::GoSentence(SentenceMoveType eMoveType, SwRootFrame const*const pLayout) { bool bRet = false; - SwTextNode* pTextNd = GetNode().GetTextNode(); + SwTextNode* pTextNd = GetPointNode().GetTextNode(); if (pTextNd) { OUString const sNodeText(lcl_MaskDeletedRedlines(pTextNd)); @@ -2002,8 +2002,8 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, // If the point/mark of the table cursor in the same box then set cursor to // beginning of the box - if( pTableCursor && GetNode().StartOfSectionNode() == - GetNode( false ).StartOfSectionNode() ) + if( pTableCursor && GetPointNode().StartOfSectionNode() == + GetMarkNode().StartOfSectionNode() ) { if ( End() != GetPoint() ) Exchange(); @@ -2043,7 +2043,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, // than one paragraph. If we want to go down, we have to set the // point to the last frame in the table box. This is only necessary // if we do not already have a table selection - const SwStartNode* pTableNd = GetNode().FindTableBoxStartNode(); + const SwStartNode* pTableNd = GetPointNode().FindTableBoxStartNode(); OSL_ENSURE( pTableNd, "pTableCursor without SwTableNode?" ); if ( pTableNd ) // safety first @@ -2528,8 +2528,8 @@ void SwTableCursor::DeleteBox(size_t const nPos) bool SwTableCursor::NewTableSelection() { bool bRet = false; - const SwNode *pStart = GetNode().FindTableBoxStartNode(); - const SwNode *pEnd = GetNode(false).FindTableBoxStartNode(); + const SwNode *pStart = GetPointNode().FindTableBoxStartNode(); + const SwNode *pEnd = GetMarkNode().FindTableBoxStartNode(); if( pStart && pEnd ) { const SwTableNode *pTableNode = pStart->FindTableNode(); diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 11ede589747c..752ecfa0462c 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -140,7 +140,7 @@ bool SwCursorShell::GotoFootnoteText() bool SwCursor::GotoFootnoteAnchor() { // jump from footnote to anchor - const SwNode* pSttNd = GetNode().FindFootnoteStartNode(); + const SwNode* pSttNd = GetPointNode().FindFootnoteStartNode(); if( pSttNd ) { // search in all footnotes in document for this StartIndex diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index c66692005d71..db4b5e3f44cd 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -181,7 +181,7 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegion, bool bInReadOnly ) { - SwNode& rCurrNd = rCurrentCursor.GetNode(); + SwNode& rCurrNd = rCurrentCursor.GetPointNode(); SwSectionNode* pNd = rCurrNd.FindSectionNode(); if( !pNd ) return false; diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index b431d9f48e13..7b8364959b9a 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -49,7 +49,7 @@ bool SwCursorShell::GoNextCell( bool bAppendLine ) // Check if we have to move the cursor to a covered cell before // proceeding: - const SwNode* pTableBoxStartNode = pCursor->GetNode().FindTableBoxStartNode(); + const SwNode* pTableBoxStartNode = pCursor->GetPointNode().FindTableBoxStartNode(); const SwTableBox* pTableBox = nullptr; if ( pCursor->GetCursorRowSpanOffset() ) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 759cb5024848..bd8b154b1323 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -793,7 +793,7 @@ namespace void lcl_SaveRedlines(const SwPaM& aPam, SaveRedlines_t& rArr) { - SwDoc& rDoc = aPam.GetNode().GetDoc(); + SwDoc& rDoc = aPam.GetPointNode().GetDoc(); auto [pStart, pEnd] = aPam.StartEnd(); // SwPosition* @@ -2496,7 +2496,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, *aSavePam.GetMark() = rPos; rPaM.SetMark(); // create a Sel. around the new range - pTNd = aSavePam.GetNode().GetTextNode(); + pTNd = aSavePam.GetPointNode().GetTextNode(); assert(!m_rDoc.GetIDocumentUndoRedo().DoesUndo()); bool bRemove = true; // Do two Nodes have to be joined at the SavePam? @@ -3205,7 +3205,7 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj( eAnchorId = aAnch.GetAnchorId(); if ( eAnchorId == RndStdIds::FLY_AT_FLY ) { - const SwStartNode* pStartNode = rRg.GetNode().FindFlyStartNode(); + const SwStartNode* pStartNode = rRg.GetPointNode().FindFlyStartNode(); assert(pStartNode); SwPosition aPos(*pStartNode); aAnch.SetAnchor( &aPos ); diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 6132efb16d97..0909e632ba74 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -1737,9 +1737,9 @@ void SwDoc::ChangeTOX(SwTOXBase & rTOX, const SwTOXBase & rNew) OUString SwDoc::GetPaMDescr(const SwPaM & rPam) { - if (&rPam.GetNode() == &rPam.GetNode(false)) + if (&rPam.GetPointNode() == &rPam.GetMarkNode()) { - SwTextNode * pTextNode = rPam.GetNode().GetTextNode(); + SwTextNode * pTextNode = rPam.GetPointNode().GetTextNode(); if (nullptr != pTextNode) { diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 45a8e40eb354..ff1659ee1d9d 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -1154,11 +1154,11 @@ SwNodeIndex SwDoc::AppendDoc(const SwDoc& rSource, sal_uInt16 const nStartPageNu SwPaM aInsertPam( GetNodes().GetEndOfContent() ); #ifdef DBG_UTIL - SAL_INFO( "sw.docappend", "Pam-Nd: " << aCpyPam.GetNode().GetIndex() - aCpyPam.GetNode( false ).GetIndex() + 1 - << " (0x" << std::hex << static_cast(aCpyPam.GetNode( false ).GetNodeType()) << std::dec - << " " << aCpyPam.GetNode( false ).GetIndex() - << " - 0x" << std::hex << static_cast(aCpyPam.GetNode().GetNodeType()) << std::dec - << " " << aCpyPam.GetNode().GetIndex() << ")" ); + SAL_INFO( "sw.docappend", "Pam-Nd: " << aCpyPam.GetPointNode().GetIndex() - aCpyPam.GetMarkNode().GetIndex() + 1 + << " (0x" << std::hex << static_cast(aCpyPam.GetMarkNode().GetNodeType()) << std::dec + << " " << aCpyPam.GetMarkNode().GetIndex() + << " - 0x" << std::hex << static_cast(aCpyPam.GetPointNode().GetNodeType()) << std::dec + << " " << aCpyPam.GetPointNode().GetIndex() << ")" ); #endif GetIDocumentUndoRedo().StartUndo( SwUndoId::INSGLOSSARY, nullptr ); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 586ef850f40e..9a09204a6b6b 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1989,7 +1989,7 @@ OUString SwRangeRedline::GetDescr(bool bSimplified) } OUString sDescr = DenoteSpecialCharacters(pPaM->GetText().replace('\n', ' '), /*bQuoted=*/!bSimplified); - if (const SwTextNode *pTextNode = pPaM->GetNode().GetTextNode()) + if (const SwTextNode *pTextNode = pPaM->GetPointNode().GetTextNode()) { if (const SwTextAttr* pTextAttr = pTextNode->GetFieldTextAttrAt(pPaM->GetPoint()->GetContentIndex() - 1, true )) { diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index 968734f907b2..23f910960d93 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -1519,7 +1519,7 @@ namespace numfunc return true; } - SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode(); if (!pTextNode) { return true; diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 12d7405d78fb..ad74f855d01f 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -141,7 +141,7 @@ void SwTextBoxHelper::create(SwFrameFormat* pShape, SdrObject* pObject, bool bCo if (sw::XTextRangeToSwPaM(aInternalPaM, xTextBox)) { SwAttrSet aSet(pShape->GetAttrSet()); - SwFormatContent aContent(aInternalPaM.GetNode().StartOfSectionNode()); + SwFormatContent aContent(aInternalPaM.GetPointNode().StartOfSectionNode()); aSet.Put(aContent); pShape->SetFormatAttr(aSet); } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 67eac9eb23d6..addb466c46d1 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1818,7 +1818,7 @@ void SwDoc::DeleteRow( const SwCursor& rCursor ) // - when there's another Line, we place it in that one // - when a Line precedes it, we place it in that one { - SwTableNode* pTableNd = rCursor.GetNode().FindTableNode(); + SwTableNode* pTableNd = rCursor.GetPointNode().FindTableNode(); if(dynamic_cast( & pTableNd->GetTable()) != nullptr) return; @@ -1919,7 +1919,7 @@ void SwDoc::DeleteCol( const SwCursor& rCursor ) SwEditShell* pESh = GetEditShell(); if( pESh ) { - const SwNode* pNd = rCursor.GetNode().FindTableBoxStartNode(); + const SwNode* pNd = rCursor.GetPointNode().FindTableBoxStartNode(); pESh->ParkCursor( *pNd ); } @@ -2210,7 +2210,7 @@ bool SwDoc::SplitTable( const SwSelBoxes& rBoxes, bool bVert, sal_uInt16 nCnt, TableMergeErr SwDoc::MergeTable( SwPaM& rPam ) { // Check if the current cursor's Point/Mark are inside a Table - SwTableNode* pTableNd = rPam.GetNode().FindTableNode(); + SwTableNode* pTableNd = rPam.GetPointNode().FindTableNode(); if( !pTableNd ) return TableMergeErr::NoSelection; SwTable& rTable = pTableNd->GetTable(); diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index e56232b41095..127e17a8c38e 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -152,7 +152,7 @@ static bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, { const SwPaM *pCurPam = &rCursor, *pSttPam = pCurPam; do { - const SwNode* pNd = pCurPam->GetNode().FindTableBoxStartNode(); + const SwNode* pNd = pCurPam->GetPointNode().FindTableBoxStartNode(); if( pNd ) { SwTableBox* pBox = const_cast(pNd->FindTableNode()->GetTable(). diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 2adb75fa02e0..40ce709cd8b2 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -143,7 +143,7 @@ void SwAutoCorrDoc::DeleteSelImpl(SwPaM & rDelPam) bool SwAutoCorrDoc::Delete( sal_Int32 nStt, sal_Int32 nEnd ) { - SwTextNode const*const pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode const*const pTextNd = m_rCursor.GetPointNode().GetTextNode(); SwTextFrame const*const pFrame(static_cast( pTextNd->getLayoutFrame(m_rEditSh.GetLayout()))); assert(pFrame); @@ -158,7 +158,7 @@ bool SwAutoCorrDoc::Delete( sal_Int32 nStt, sal_Int32 nEnd ) bool SwAutoCorrDoc::Insert( sal_Int32 nPos, const OUString& rText ) { - SwTextNode const*const pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode const*const pTextNd = m_rCursor.GetPointNode().GetTextNode(); SwTextFrame const*const pFrame(static_cast( pTextNd->getLayoutFrame(m_rEditSh.GetLayout()))); assert(pFrame); @@ -193,7 +193,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const // for (ranges.begin() + 1; ranges.end(); ) // DeleteImpl(*it) - SwTextNode * const pNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode * const pNd = m_rCursor.GetPointNode().GetTextNode(); if ( !pNd ) { return false; @@ -287,7 +287,7 @@ bool SwAutoCorrDoc::ReplaceRange( sal_Int32 nPos, sal_Int32 nSourceLength, const void SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, SfxPoolItem& rItem ) { - SwTextNode const*const pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode const*const pTextNd = m_rCursor.GetPointNode().GetTextNode(); SwTextFrame const*const pFrame(static_cast( pTextNd->getLayoutFrame(m_rEditSh.GetLayout()))); assert(pFrame); @@ -312,7 +312,7 @@ void SwAutoCorrDoc::SetAttr( sal_Int32 nStt, sal_Int32 nEnd, sal_uInt16 nSlotId, bool SwAutoCorrDoc::SetINetAttr( sal_Int32 nStt, sal_Int32 nEnd, const OUString& rURL ) { - SwTextNode const*const pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode const*const pTextNd = m_rCursor.GetPointNode().GetTextNode(); SwTextFrame const*const pFrame(static_cast( pTextNd->getLayoutFrame(m_rEditSh.GetLayout()))); assert(pFrame); @@ -377,7 +377,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // Found a beginning of a paragraph or a Blank, // search for the word Kuerzel (Shortcut) in the Auto - SwTextNode* pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode* pTextNd = m_rCursor.GetPointNode().GetTextNode(); OSL_ENSURE( pTextNd, "where is the TextNode?" ); bool bRet = false; @@ -444,7 +444,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // pTextNd may become invalid when change tracking is on and Edit -> Track Changes -> Show == OFF. // ReplaceRange shows changes, this moves deleted nodes from special section to document. // Then Show mode is disabled again. As a result pTextNd may be invalidated. - pTextNd = m_rCursor.GetNode().GetTextNode(); + pTextNd = m_rCursor.GetPointNode().GetTextNode(); } } else @@ -514,7 +514,7 @@ bool SwAutoCorrDoc::TransliterateRTLWord( sal_Int32& rSttPos, sal_Int32 nEndPos, if( m_bUndoIdInitialized ) m_bUndoIdInitialized = true; - SwTextNode* pTextNd = m_rCursor.GetNode().GetTextNode(); + SwTextNode* pTextNd = m_rCursor.GetPointNode().GetTextNode(); OSL_ENSURE( pTextNd, "where is the TextNode?" ); bool bRet = false; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 60b5848da13e..9708065c4a28 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -1247,7 +1247,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) m_aDelPam.SetMark(); m_aDelPam.GetMark()->nNode = m_pCurTextFrame->GetTextNodeFirst()->GetIndex() - 1; - SwTextNode* pTNd = m_aDelPam.GetNode( false ).GetTextNode(); + SwTextNode* pTNd = m_aDelPam.GetMarkNode().GetTextNode(); if( pTNd ) // first use the previous text node m_aDelPam.GetMark()->nContent.Assign(pTNd, pTNd->GetText().getLength()); @@ -1258,7 +1258,7 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) ? m_pCurTextFrame->GetMergedPara()->pLastNode : m_pCurTextNd )->GetIndex() + 1; - pTNd = m_aDelPam.GetNode( false ).GetTextNode(); + pTNd = m_aDelPam.GetMarkNode().GetTextNode(); if( pTNd ) { m_aDelPam.GetMark()->nContent.Assign( pTNd, 0 ); @@ -1270,10 +1270,10 @@ void SwAutoFormat::DelEmptyLine( bool bTstNextPara ) { // join with previous or next paragraph DeleteSel(m_aDelPam); } - assert(m_aDelPam.GetNode().IsTextNode()); + assert(m_aDelPam.GetPointNode().IsTextNode()); assert(!m_aDelPam.HasMark()); m_aDelPam.SetMark(); // mark remains at join position - m_pCurTextFrame = GetFrame(*m_aDelPam.GetNode().GetTextNode()); + m_pCurTextFrame = GetFrame(*m_aDelPam.GetPointNode().GetTextNode()); // replace until the end of the merged paragraph *m_aDelPam.GetPoint() = m_pCurTextFrame->MapViewToModelPos( TextFrameIndex(m_pCurTextFrame->GetText().getLength())); @@ -1333,7 +1333,7 @@ void SwAutoFormat::JoinPrevPara() m_aDelPam.SetMark(); --m_aDelPam.GetPoint()->nNode; - SwTextNode* pTNd = m_aDelPam.GetNode().GetTextNode(); + SwTextNode* pTNd = m_aDelPam.GetPointNode().GetTextNode(); if( pTNd ) { // use the previous text node first @@ -1695,7 +1695,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) SwTextFrame const*const pNextFrame = GetNextNode(false); assert(pNextFrame); m_aDelPam.GetMark()->nNode = *pNextFrame->GetTextNodeForParaProps(); - m_aDelPam.GetNode(false).GetTextNode()->SetAttrListLevel( nLvl ); + m_aDelPam.GetMarkNode().GetTextNode()->SetAttrListLevel( nLvl ); } const_cast(m_pCurTextFrame->GetTextNodeForParaProps())->SetAttrListLevel(nLvl); diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index cf2571d63410..01f29cd05b97 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -395,7 +395,7 @@ bool SwEditShell::GetCurFootnote( SwFormatFootnote* pFillFootnote ) { // The cursor must be positioned on the current footnotes anchor: SwPaM* pCursor = GetCursor(); - SwTextNode* pTextNd = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNd = pCursor->GetPointNode().GetTextNode(); if( !pTextNd ) return false; diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index d3fd0fc45b43..6b824a378bc5 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -47,9 +47,9 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool // 1. Point and Mark are in one box, delete selection as usual // 2. Point and Mark are in different boxes, search all selected boxes and delete content // 3. Point and Mark are at the document start and end, Point is in a table: delete selection as usual - if( rPam.GetNode().FindTableNode() && - rPam.GetNode().StartOfSectionNode() != - rPam.GetNode(false).StartOfSectionNode() && !bSelectAll ) + if( rPam.GetPointNode().FindTableNode() && + rPam.GetPointNode().StartOfSectionNode() != + rPam.GetMarkNode().StartOfSectionNode() && !bSelectAll ) { // group the Undo in the table if( pUndo && !*pUndo ) @@ -61,7 +61,7 @@ void SwEditShell::DeleteSel(SwPaM& rPam, bool const isArtificialSelection, bool const SwPosition* pEndSelPos = rPam.End(); do { aDelPam.SetMark(); - SwNode& rNd = aDelPam.GetNode(); + SwNode& rNd = aDelPam.GetPointNode(); const SwNode& rEndNd = *rNd.EndOfSectionNode(); if( pEndSelPos->GetNodeIndex() <= rEndNd.GetIndex() ) { diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 4de9589a3300..3593d7922a8b 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -282,7 +282,7 @@ bool SwEditShell::GetGrfSize(Size& rSz) const SwPaM* pCurrentCursor = GetCursor(); if( ( !pCurrentCursor->HasMark() || pCurrentCursor->GetPoint()->nNode == pCurrentCursor->GetMark()->nNode ) - && nullptr != ( pNoTextNd = pCurrentCursor->GetNode().GetNoTextNode() ) ) + && nullptr != ( pNoTextNd = pCurrentCursor->GetPointNode().GetNoTextNode() ) ) { rSz = pNoTextNd->GetTwipSize(); return true; @@ -318,13 +318,13 @@ void SwEditShell::GetGrfNms( OUString* pGrfName, OUString* pFltName, const tools::PolyPolygon *SwEditShell::GetGraphicPolygon() const { - SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetPointNode().GetNoTextNode(); return pNd->HasContour(); } void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) { - SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetPointNode().GetNoTextNode(); StartAllAction(); pNd->SetContour( pPoly ); SwFlyFrame *pFly = static_cast(pNd->getLayoutFrame(GetLayout())->GetUpper()); @@ -336,7 +336,7 @@ void SwEditShell::SetGraphicPolygon( const tools::PolyPolygon *pPoly ) void SwEditShell::ClearAutomaticContour() { - SwNoTextNode *pNd = GetCursor()->GetNode().GetNoTextNode(); + SwNoTextNode *pNd = GetCursor()->GetPointNode().GetNoTextNode(); OSL_ENSURE( pNd, "is no NoTextNode!" ); if( pNd->HasAutomaticContour() ) { @@ -364,7 +364,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const GetCursor()->GetPoint()->nNode == GetCursor()->GetMark()->nNode), "GetOLEObj: no OLENode." ); - SwOLENode *pOLENode = GetCursor()->GetNode().GetOLENode(); + SwOLENode *pOLENode = GetCursor()->GetPointNode().GetOLENode(); OSL_ENSURE( pOLENode, "GetOLEObj: no OLENode." ); SwOLEObj& rOObj = pOLENode->GetOLEObj(); return rOObj.GetObject(); @@ -390,7 +390,7 @@ bool SwEditShell::HasOLEObj( std::u16string_view rName ) const void SwEditShell::SetChartName( const OUString &rName ) { - SwOLENode *pONd = GetCursor()->GetNode().GetOLENode(); + SwOLENode *pONd = GetCursor()->GetPointNode().GetOLENode(); OSL_ENSURE( pONd, "ChartNode not found" ); pONd->SetChartTableName( rName ); } @@ -410,7 +410,7 @@ void SwEditShell::SetTableName( SwFrameFormat& rTableFormat, const OUString &rNe OUString SwEditShell::GetCurWord() const { const SwPaM& rPaM = *GetCursor(); - const SwTextNode* pNd = rPaM.GetNode().GetTextNode(); + const SwTextNode* pNd = rPaM.GetPointNode().GetTextNode(); if (!pNd) { return OUString(); @@ -485,7 +485,7 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const } } - SwTextNode const*const pTextNd = pCursor->GetNode(false).GetTextNode(); + SwTextNode const*const pTextNd = pCursor->GetMarkNode().GetTextNode(); if( pTextNd ) { SwTextFrame const*const pTextFrame(static_cast( @@ -505,7 +505,7 @@ void SwEditShell::ReplaceDropText( const OUString &rStr, SwPaM* pPaM ) { SwPaM* pCursor = pPaM ? pPaM : GetCursor(); if( !(pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode && - pCursor->GetNode().GetTextNode()->IsTextNode()) ) + pCursor->GetPointNode().GetTextNode()->IsTextNode()) ) return; StartAllAction(); @@ -536,7 +536,7 @@ OUString SwEditShell::Calculate() for(SwPaM& rCurrentPaM : GetCursor()->GetNext()->GetRingContainer()) { - SwTextNode* pTextNd = rCurrentPaM.GetNode().GetTextNode(); + SwTextNode* pTextNd = rCurrentPaM.GetPointNode().GetTextNode(); if(pTextNd) { const SwPosition *pStart = rCurrentPaM.Start(), *pEnd = rCurrentPaM.End(); @@ -598,7 +598,7 @@ sfx2::LinkManager& SwEditShell::GetLinkManager() void *SwEditShell::GetIMapInventor() const { // The node on which the cursor points should be sufficient as a unique identifier - return static_cast(&(GetCursor()->GetNode())); + return static_cast(&(GetCursor()->GetPointNode())); } // #i73788# @@ -610,7 +610,7 @@ Graphic SwEditShell::GetIMapGraphic() const SwPaM* pCursor = GetCursor(); if ( !pCursor->HasMark() ) { - SwNode& rNd =pCursor->GetNode(); + SwNode& rNd =pCursor->GetPointNode(); if( rNd.IsGrfNode() ) { SwGrfNode & rGrfNode(static_cast(rNd)); diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 33d7d26d7bd1..e6d3b6aeb3cd 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -920,7 +920,7 @@ uno::Reference< XSpellAlternatives > if (pPt && GetLayout()->GetModelPositionForViewPoint( &aPos, *const_cast(pPt), &eTmpState )) pNode = aPos.GetNode().GetTextNode(); if (nullptr == pNode) - pNode = pCursor->GetNode().GetTextNode(); + pNode = pCursor->GetPointNode().GetTextNode(); if (nullptr != pNode) pWrong = pNode->GetWrong(); if (nullptr != pWrong && !pNode->IsInProtectSect()) @@ -991,7 +991,7 @@ bool SwEditShell::GetGrammarCorrection( if (pPt && GetLayout()->GetModelPositionForViewPoint( &aPos, *const_cast(pPt), &eTmpState )) pNode = aPos.GetNode().GetTextNode(); if (nullptr == pNode) - pNode = pCursor->GetNode().GetTextNode(); + pNode = pCursor->GetPointNode().GetTextNode(); if (nullptr != pNode) pWrong = pNode->GetGrammarCheck(); if (nullptr != pWrong && !pNode->IsInProtectSect()) @@ -1248,7 +1248,7 @@ static SpellContentPositions lcl_CollectDeletedRedlines(SwEditShell const * pSh) { SwPaM *pCursor = pSh->GetCursor(); const SwPosition* pStartPos = pCursor->Start(); - const SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); + const SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode(); SwRedlineTable::size_type nAct = pDoc->getIDocumentRedlineAccess().GetRedlinePos( *pTextNode, RedlineType::Any ); const sal_Int32 nStartIndex = pStartPos->GetContentIndex(); @@ -1408,7 +1408,7 @@ bool SwSpellIter::SpellSentence(svx::SpellPortions& rPortions, bool bIsGrammarCh pMySh->GoEndSentence(); if( bGrammarErrorFound ) { - const ModelToViewHelper aConversionMap(static_cast(pCursor->GetNode()), pMySh->GetLayout()); + const ModelToViewHelper aConversionMap(static_cast(pCursor->GetPointNode()), pMySh->GetLayout()); const OUString& aExpandText = aConversionMap.getViewText(); sal_Int32 nSentenceEnd = aConversionMap.ConvertToViewPosition( aGrammarResult.nBehindEndOfSentencePosition ); @@ -1597,7 +1597,7 @@ void SwSpellIter::AddPortion(uno::Reference< XSpellAlternatives > const & xAl // iterate over the text to find changes in language // set the mark equal to the point *pCursor->GetMark() = aStart; - SwTextNode* pTextNode = pCursor->GetNode().GetTextNode(); + SwTextNode* pTextNode = pCursor->GetPointNode().GetTextNode(); LanguageType eStartLanguage = lcl_GetLanguage(*GetSh()); SpellContentPosition aNextRedline = lcl_FindNextDeletedRedline( rDeletedRedlines, aStart.GetContentIndex() ); diff --git a/sw/source/core/edit/ednumber.cxx b/sw/source/core/edit/ednumber.cxx index e06c8f86f4e4..e059de972dc4 100644 --- a/sw/source/core/edit/ednumber.cxx +++ b/sw/source/core/edit/ednumber.cxx @@ -444,11 +444,11 @@ bool SwEditShell::MoveNumParas( bool bUpperLower, bool bUpperLeft ) } else // move down { - assert(!aCursor.GetNode().IsTextNode() - || sw::IsParaPropsNode(*GetLayout(), *aCursor.GetNode().GetTextNode())); - const SwNumRule* pOrig = sw::GetParaPropsNode(*GetLayout(), *aCursor.GetNode(false).GetTextNode())->GetNumRule(); - if( aCursor.GetNode().IsTextNode() && - pOrig == aCursor.GetNode().GetTextNode()->GetNumRule() ) + assert(!aCursor.GetPointNode().IsTextNode() + || sw::IsParaPropsNode(*GetLayout(), *aCursor.GetPointNode().GetTextNode())); + const SwNumRule* pOrig = sw::GetParaPropsNode(*GetLayout(), *aCursor.GetMarkNode().GetTextNode())->GetNumRule(); + if( aCursor.GetPointNode().IsTextNode() && + pOrig == aCursor.GetPointNode().GetTextNode()->GetNumRule() ) { SwNodeOffset nStt = aCursor.GetPoint()->GetNodeIndex(), nIdx = nStt+1; if (SwTextNode const*const pStt = aCursor.GetPoint()->GetNode().GetTextNode()) diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 5cb985686d8f..8b6cf72e0531 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -440,7 +440,7 @@ OUString SwEditShell::GetTableBoxText() const void SwEditShell::SplitTable( SplitTable_HeadlineOption eMode ) { SwPaM *pCursor = GetCursor(); - if( pCursor->GetNode().FindTableNode() ) + if( pCursor->GetPointNode().FindTableNode() ) { StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr); @@ -457,7 +457,7 @@ bool SwEditShell::MergeTable( bool bWithPrev ) { bool bRet = false; SwPaM *pCursor = GetCursor(); - if( pCursor->GetNode().FindTableNode() ) + if( pCursor->GetPointNode().FindTableNode() ) { StartAllAction(); GetDoc()->GetIDocumentUndoRedo().StartUndo(SwUndoId::EMPTY, nullptr); @@ -475,7 +475,7 @@ bool SwEditShell::CanMergeTable( bool bWithPrev, bool* pChkNxtPrv ) const { bool bRet = false; const SwPaM *pCursor = GetCursor(); - const SwTableNode* pTableNd = pCursor->GetNode().FindTableNode(); + const SwTableNode* pTableNd = pCursor->GetPointNode().FindTableNode(); if( pTableNd && dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) == nullptr) { bool bNew = pTableNd->GetTable().IsNewModel(); diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 647e59e11b5b..abbb920afdc5 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -129,7 +129,7 @@ sal_uInt16 SwEditShell::GetCntType() const if( IsTableMode() ) nRet = CNT_TXT; else - switch( GetCursor()->GetNode().GetNodeType() ) + switch( GetCursor()->GetPointNode().GetNodeType() ) { case SwNodeType::Text: nRet = CNT_TXT; break; case SwNodeType::Grf: nRet = CNT_GRF; break; @@ -260,7 +260,7 @@ void SwEditShell::AutoCorrect( SvxAutoCorrect& rACorr, bool bInsert, StartAllAction(); SwPaM* pCursor = getShellCursor( true ); - SwTextNode* pTNd = pCursor->GetNode().GetTextNode(); + SwTextNode* pTNd = pCursor->GetPointNode().GetTextNode(); SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCursor, cChar ); // FIXME: this _must_ be called with reference to the actual node text! @@ -292,7 +292,7 @@ OUString SwEditShell::GetPrevAutoCorrWord(SvxAutoCorrect& rACorr) OUString sRet; SwPaM* pCursor = getShellCursor( true ); - SwTextNode* pTNd = pCursor->GetNode().GetTextNode(); + SwTextNode* pTNd = pCursor->GetPointNode().GetTextNode(); if (pTNd) { SwAutoCorrDoc aSwAutoCorrDoc( *this, *pCursor, 0 ); @@ -309,7 +309,7 @@ std::vector SwEditShell::GetChunkForAutoText() std::vector aRet; SwPaM* pCursor = getShellCursor(true); - SwTextNode* pTNd = pCursor->GetNode().GetTextNode(); + SwTextNode* pTNd = pCursor->GetPointNode().GetTextNode(); if (pTNd) { const auto pFrame = static_cast(pTNd->getLayoutFrame(GetLayout())); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 8efd7d4f4a2b..f2b737b9b5f1 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -348,11 +348,11 @@ bool SwFEShell::CopyDrawSel( SwFEShell& rDestShell, const Point& rSttPt, else { SwPaM *pCursor = rDestShell.GetCursor(); - if( pCursor->GetNode().IsNoTextNode() ) + if( pCursor->GetPointNode().IsNoTextNode() ) bRet = false; else bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), - pCursor->GetNode(), nullptr, rInsPt, + pCursor->GetPointNode(), nullptr, rInsPt, rDestShell, aAnchor, aNewAnch, false ); } @@ -507,10 +507,10 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, else { const SwPaM *pCursor = rDestShell.GetCursor(); - if( pCursor->GetNode().IsNoTextNode() ) + if( pCursor->GetPointNode().IsNoTextNode() ) bRet = false; else - bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), pCursor->GetNode(), + bRet = ::lcl_SetAnchor( *pCursor->GetPoint(), pCursor->GetPointNode(), pFly, rInsPt, rDestShell, aAnchor, aNewAnch, GetDoc() == rDestShell.GetDoc()); } @@ -588,7 +588,7 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, if( !oDstPos->GetNode().IsNoTextNode() ) bRet = true; } - else if( !rDestShell.GetCursor()->GetNode().IsNoTextNode() ) + else if( !rDestShell.GetCursor()->GetPointNode().IsNoTextNode() ) { oDstPos.emplace( *rDestShell.GetCursor()->GetPoint() ); bRet = true; @@ -631,7 +631,7 @@ bool SwFEShell::Copy( SwFEShell& rDestShell, const Point& rSttPt, GetLayout()->GetModelPositionForViewPoint( &aPos, aPt ); bRet = !aPos.GetNode().IsNoTextNode(); } - else if( rDestShell.GetCursor()->GetNode().IsNoTextNode() ) + else if( rDestShell.GetCursor()->GetPointNode().IsNoTextNode() ) bRet = false; if( bRet ) @@ -787,7 +787,7 @@ namespace { else if(RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId()) { Point aPt; - (void)lcl_SetAnchor(*rPaM.GetPoint(), rPaM.GetNode(), nullptr, aPt, rSh, aAnchor, aPt, false); + (void)lcl_SetAnchor(*rPaM.GetPoint(), rPaM.GetPointNode(), nullptr, aPt, rSh, aAnchor, aPt, false); } SwFrameFormat* pNew = rDoc.getIDocumentLayoutAccess().CopyLayoutFormat(*pCpyFormat, aAnchor, true, true); @@ -836,7 +836,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) SwNodeIndex aIdx( rClpDoc.GetNodes().GetEndOfExtras(), 2 ); // select content section, whatever it may contain SwPaM aCpyPam(aIdx, SwNodeIndex(rClpDoc.GetNodes().GetEndOfContent(), -1)); - if (SwContentNode *const pAtEnd = aCpyPam.GetNode(true).GetContentNode()) + if (SwContentNode *const pAtEnd = aCpyPam.GetPointNode().GetContentNode()) { aCpyPam.GetPoint()->AssignEndIndex(*pAtEnd); } @@ -846,7 +846,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) // (individual boxes in the area are retrieved via the layout) SwFieldType* pTableFieldTyp = GetDoc()->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Table ); - SwTableNode *const pSrcNd = aCpyPam.GetNode(false).GetTableNode(); + SwTableNode *const pSrcNd = aCpyPam.GetMarkNode().GetTableNode(); bool bRet = true; StartAllAction(); @@ -978,12 +978,12 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) // (else insert a nested table later, i.e. if nothing selected and // the cursor is not in the first paragraph, or the selected text // doesn't contain the first paragraph of the cell) - rPaM.GetNode().GetIndex() == rPaM.GetNode().FindTableBoxStartNode()->GetIndex() + 1) + rPaM.GetPointNode().GetIndex() == rPaM.GetPointNode().FindTableBoxStartNode()->GetIndex() + 1) { SwPosition aDestPos( *rPaM.GetPoint() ); bool bParkTableCursor = false; - const SwStartNode* pSttNd = rPaM.GetNode().FindTableBoxStartNode(); + const SwStartNode* pSttNd = rPaM.GetPointNode().FindTableBoxStartNode(); // TABLE IN TABLE: copy table in table // search boxes via the layout @@ -1159,7 +1159,7 @@ void SwFEShell::PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt1 return; } //if the page starts with a table a paragraph has to be inserted before - SwNode *const pTableNode = oSourcePam->GetNode().FindTableNode(); + SwNode *const pTableNode = oSourcePam->GetPointNode().FindTableNode(); if(pTableNode) { //insert a paragraph diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 9b19e049583b..f55dcc1aad53 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -867,7 +867,7 @@ void SwFEShell::Insert( const OUString& rGrfName, const OUString& rFltName, case RndStdIds::FLY_AT_FLY: if( !pAnchor->GetContentAnchor() ) { - lcl_SetNewFlyPos( pCursor->GetNode(), + lcl_SetNewFlyPos( pCursor->GetPointNode(), *pAnchor, GetCursorDocPos() ); } break; diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index dc43cd1f29f9..185040bdc022 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -513,7 +513,7 @@ TableMergeErr SwFEShell::MergeTab() if( IsTableMode() ) { SwShellTableCursor* pTableCursor = GetTableCursor(); - const SwTableNode* pTableNd = pTableCursor->GetNode().FindTableNode(); + const SwTableNode* pTableNd = pTableCursor->GetPointNode().FindTableNode(); if( dynamic_cast< const SwDDETable* >(&pTableNd->GetTable()) != nullptr ) { ErrorHandler::HandleError( ERR_TBLDDECHG_ERROR, GetFrameWeld(GetDoc()->GetDocShell()), @@ -949,7 +949,7 @@ bool SwFEShell::HasBoxSelection() const } SwNode* pNd; if( pPam->GetPoint()->GetNodeIndex() -1 == - ( pNd = &pPam->GetNode())->StartOfSectionIndex() && + ( pNd = &pPam->GetPointNode())->StartOfSectionIndex() && !pPam->GetPoint()->GetContentIndex() && pPam->GetMark()->GetNodeIndex() + 1 == pNd->EndOfSectionIndex()) diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 15f12182916f..4f377143ff24 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -166,7 +166,7 @@ void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, // Row-selection: // Check for complex tables. If Yes, search selected boxes via // the layout. Otherwise via the table structure (for macros !!) - const SwContentNode* pContentNd = rCursor.GetNode().GetContentNode(); + const SwContentNode* pContentNd = rCursor.GetPointNode().GetContentNode(); const SwTableNode* pTableNd = pContentNd ? pContentNd->FindTableNode() : nullptr; if( pTableNd && pTableNd->GetTable().IsNewModel() ) { @@ -187,7 +187,7 @@ void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTable& rTable = pTableNd->GetTable(); const SwTableLines& rLines = rTable.GetTabLines(); - const SwNode& rMarkNode = rCursor.GetNode( false ); + const SwNode& rMarkNode = rCursor.GetMarkNode(); const SwNodeOffset nMarkSectionStart = rMarkNode.StartOfSectionIndex(); const SwTableBox* pMarkBox = rTable.GetTableBox( nMarkSectionStart ); @@ -196,7 +196,7 @@ void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTableLine* pLine = pMarkBox ? pMarkBox->GetUpper() : nullptr; sal_uInt16 nSttPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nSttPos, "Where is my row in the table?" ); - pLine = rTable.GetTableBox( rCursor.GetNode().StartOfSectionIndex() )->GetUpper(); + pLine = rTable.GetTableBox( rCursor.GetPointNode().StartOfSectionIndex() )->GetUpper(); sal_uInt16 nEndPos = rLines.GetPos( pLine ); OSL_ENSURE( USHRT_MAX != nEndPos, "Where is my row in the table?" ); // pb: #i20193# if tableintable then nSttPos == nEndPos == USHRT_MAX diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index b5247220de5d..32c4d990fb55 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -615,7 +615,7 @@ bool SwFlyFrame::GetModelPositionForViewPoint( SwPosition *pPos, Point &rPoint, /** Layout dependent cursor travelling */ bool SwNoTextFrame::LeftMargin(SwPaM *pPam) const { - if( &pPam->GetNode() != GetNode() ) + if( &pPam->GetPointNode() != GetNode() ) return false; pPam->GetPoint()->AssignStartIndex(*GetNode()); return true; @@ -623,7 +623,7 @@ bool SwNoTextFrame::LeftMargin(SwPaM *pPam) const bool SwNoTextFrame::RightMargin(SwPaM *pPam, bool) const { - if( &pPam->GetNode() != GetNode() ) + if( &pPam->GetPointNode() != GetNode() ) return false; pPam->GetPoint()->AssignEndIndex(*GetNode()); return true; @@ -688,7 +688,7 @@ static const SwContentFrame * lcl_MissProtectedFrames( const SwContentFrame *pCn static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, GetNxtPrvCnt fnNxtPrv, bool bInReadOnly ) { - OSL_ENSURE( FrameContainsNode(*pStart, pPam->GetNode().GetIndex()), + OSL_ENSURE( FrameContainsNode(*pStart, pPam->GetPointNode().GetIndex()), "lcl_UpDown doesn't work for others." ); const SwContentFrame *pCnt = nullptr; @@ -698,8 +698,8 @@ static bool lcl_UpDown( SwPaM *pPam, const SwContentFrame *pStart, //going down. bool bTableSel = false; if ( pStart->IsInTab() && - pPam->GetNode().StartOfSectionNode() != - pPam->GetNode( false ).StartOfSectionNode() ) + pPam->GetPointNode().StartOfSectionNode() != + pPam->GetMarkNode().StartOfSectionNode() ) { bTableSel = true; const SwLayoutFrame *pCell = pStart->GetUpper(); diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 35fa006e903d..69f339f074d1 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -949,13 +949,13 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, { SwPaM aPam( *pBox->GetSttNd(), 0 ); aPam.GetPoint()->nNode++; - SwTextNode* pNd = aPam.GetNode().GetTextNode(); + SwTextNode* pNd = aPam.GetPointNode().GetTextNode(); while( pNd ) { pNd->SetCountedInList( false ); aPam.GetPoint()->nNode++; - pNd = aPam.GetNode().GetTextNode(); + pNd = aPam.GetPointNode().GetTextNode(); } } } diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index 429fba4598ef..d6a7b798f429 100644 --- a/sw/source/core/text/frmcrsr.cxx +++ b/sw/source/core/text/frmcrsr.cxx @@ -671,7 +671,7 @@ bool SwTextFrame::GetModelPositionForViewPoint(SwPosition* pPos, Point& rPoint, bool SwTextFrame::LeftMargin(SwPaM *pPam) const { - assert(GetMergedPara() || &pPam->GetNode() == static_cast(GetDep())); + assert(GetMergedPara() || &pPam->GetPointNode() == static_cast(GetDep())); SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); @@ -705,7 +705,7 @@ bool SwTextFrame::LeftMargin(SwPaM *pPam) const bool SwTextFrame::RightMargin(SwPaM *pPam, bool bAPI) const { - assert(GetMergedPara() || &pPam->GetNode() == static_cast(GetDep())); + assert(GetMergedPara() || &pPam->GetPointNode() == static_cast(GetDep())); SwTextFrame *pFrame = GetAdjFrameAtPos( const_cast(this), *pPam->GetPoint(), SwTextCursor::IsRightMargin() ); @@ -764,8 +764,8 @@ bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset, SwSetToRightMargin aSet; if( IsInTab() && - pPam->GetNode().StartOfSectionNode() != - pPam->GetNode( false ).StartOfSectionNode() ) + pPam->GetPointNode().StartOfSectionNode() != + pPam->GetMarkNode().StartOfSectionNode() ) { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. @@ -1151,8 +1151,8 @@ bool SwTextFrame::UnitDown_(SwPaM *pPam, const SwTwips nOffset, { if ( IsInTab() && - pPam->GetNode().StartOfSectionNode() != - pPam->GetNode( false ).StartOfSectionNode() ) + pPam->GetPointNode().StartOfSectionNode() != + pPam->GetMarkNode().StartOfSectionNode() ) { // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index bee45a3a7497..54f8e993b4cb 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -980,7 +980,7 @@ SwTextPortion *SwTextFormatter::WhichTextPor( SwTextFormatInfo &rInf ) const SwPaM aPam(aPosition); uno::Reference const xRet( SwUnoCursorHelper::GetNestedTextContent( - *aPam.GetNode().GetTextNode(), aPosition.GetContentIndex(), false) ); + *aPam.GetPointNode().GetTextNode(), aPosition.GetContentIndex(), false) ); if (xRet.is()) { const SwDoc & rDoc = rInf.GetTextFrame()->GetDoc(); diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index ce05b7e1c341..1101d12899c1 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -282,7 +282,7 @@ void SwUndoFormatAttr::RepeatImpl(::sw::RepeatContext & rContext) switch ( m_nFormatWhich ) { case RES_GRFFMTCOLL: { SwNoTextNode *const pNd = - rContext.GetRepeatPaM().GetNode().GetNoTextNode(); + rContext.GetRepeatPaM().GetPointNode().GetNoTextNode(); if( pNd ) { rDoc.SetAttr( pFormat->GetAttrSet(), *pNd->GetFormatColl() ); } @@ -293,7 +293,7 @@ void SwUndoFormatAttr::RepeatImpl(::sw::RepeatContext & rContext) case RES_CONDTXTFMTCOLL: { SwTextNode *const pNd = - rContext.GetRepeatPaM().GetNode().GetTextNode(); + rContext.GetRepeatPaM().GetPointNode().GetTextNode(); if( pNd ) { rDoc.SetAttr( pFormat->GetAttrSet(), *pNd->GetFormatColl() ); } @@ -305,7 +305,7 @@ void SwUndoFormatAttr::RepeatImpl(::sw::RepeatContext & rContext) // Steps: search in all FlyFrameFormats for the FlyContent attribute // and validate if the cursor is in the respective section SwFrameFormat *const pFly = - rContext.GetRepeatPaM().GetNode().GetFlyFormat(); + rContext.GetRepeatPaM().GetPointNode().GetFlyFormat(); if( pFly ) { // Bug 43672: do not set all attributes! if (SfxItemState::SET == diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index b1caa4c3677d..c6129993dbfa 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -432,7 +432,7 @@ SwUndoDelete::SwUndoDelete( m_nNdDiff -= rPam.GetPoint()->GetNodeIndex(); } - if( !rPam.GetNode().IsContentNode() ) + if( !rPam.GetPointNode().IsContentNode() ) rPam.GetPoint()->nContent.Assign( nullptr, 0 ); // is a history necessary here at all? diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 6c9fc50ae232..f5aca7ecb5b5 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -81,7 +81,7 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const { rPam.DeleteMark(); rPam.GetPoint()->nNode = m_nSttNode; - SwNode& rNd = rPam.GetNode(); + SwNode& rNd = rPam.GetPointNode(); if( rNd.IsContentNode() ) rPam.GetPoint()->nContent.Assign( rNd.GetContentNode(), m_nSttContent ); else if( bCorrToContent ) @@ -97,8 +97,8 @@ void SwUndRng::SetPaM( SwPaM & rPam, bool bCorrToContent ) const return; // nothing left to do rPam.GetPoint()->nNode = m_nEndNode; - if( rPam.GetNode().IsContentNode() ) - rPam.GetPoint()->nContent.Assign( rPam.GetNode().GetContentNode(), m_nEndContent ); + if( rPam.GetPointNode().IsContentNode() ) + rPam.GetPoint()->nContent.Assign( rPam.GetPointNode().GetContentNode(), m_nEndContent ); else if( bCorrToContent ) rPam.Move( fnMoveBackward, GoInContent ); else @@ -733,7 +733,7 @@ void SwUndoSaveContent::MoveToUndoNds( SwPaM& rPaM, SwNodeIndex* pNodeIdx, SwDoc& rDoc = rPaM.GetDoc(); ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); - SwNoTextNode* pCpyNd = rPaM.GetNode().GetNoTextNode(); + SwNoTextNode* pCpyNd = rPaM.GetPointNode().GetNoTextNode(); // here comes the actual delete (move) SwNodes & rNds = rDoc.GetUndoManager().GetUndoNodes(); @@ -784,7 +784,7 @@ void SwUndoSaveContent::MoveFromUndoNds( SwDoc& rDoc, SwNodeOffset nNodeIdx, GoInContent( aPaM, fnMoveBackward ); } - SwTextNode* pTextNd = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNd = aPaM.GetPointNode().GetTextNode(); if (!pEndNdIdx && pTextNd) { aPaM.SetMark(); diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx index c8af10da32d6..3b7e0289b74d 100644 --- a/sw/source/core/undo/undobj1.cxx +++ b/sw/source/core/undo/undobj1.cxx @@ -348,7 +348,7 @@ void SwUndoInsLayFormat::RepeatImpl(::sw::RepeatContext & rContext) else if( RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId() ) { SwStartNode const*const pSttNd = - rContext.GetRepeatPaM().GetNode().FindFlyStartNode(); + rContext.GetRepeatPaM().GetPointNode().FindFlyStartNode(); if( pSttNd ) { SwPosition aPos( *pSttNd ); diff --git a/sw/source/core/undo/unmove.cxx b/sw/source/core/undo/unmove.cxx index 8e8ac541acae..e5d629978ac5 100644 --- a/sw/source/core/undo/unmove.cxx +++ b/sw/source/core/undo/unmove.cxx @@ -199,8 +199,8 @@ void SwUndoMove::UndoImpl(::sw::UndoRedoContext & rContext) aPam.Exchange(); aPam.DeleteMark(); - if( aPam.GetNode().IsContentNode() ) - aPam.GetNode().GetContentNode()->ResetAllAttr(); + if( aPam.GetPointNode().IsContentNode() ) + aPam.GetPointNode().GetContentNode()->ResetAllAttr(); // the Pam will be dropped now } diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 9cc5ba2fbb7f..64421faed72f 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -184,7 +184,7 @@ void SwUndoOverwrite::UndoImpl(::sw::UndoRedoContext & rContext) rCurrentPam.DeleteMark(); rCurrentPam.GetPoint()->nNode = m_nStartNode; - SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode(); + SwTextNode* pTextNd = rCurrentPam.GetPointNode().GetTextNode(); assert(pTextNd); SwContentIndex& rIdx = rCurrentPam.GetPoint()->nContent; rIdx.Assign( pTextNd, m_nStartContent ); @@ -266,7 +266,7 @@ void SwUndoOverwrite::RedoImpl(::sw::UndoRedoContext & rContext) rCurrentPam.DeleteMark(); rCurrentPam.GetPoint()->nNode = m_nStartNode; - SwTextNode* pTextNd = rCurrentPam.GetNode().GetTextNode(); + SwTextNode* pTextNd = rCurrentPam.GetPointNode().GetTextNode(); assert(pTextNd); SwContentIndex& rIdx = rCurrentPam.GetPoint()->nContent; diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 20f54907e386..a4a8a4f4325f 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -208,7 +208,7 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( SetRedlineText(rRange.GetText()); if( SwUndoId::DELETE == mnUserId && m_nSttNode == m_nEndNode && m_nSttContent + 1 == m_nEndContent && - nullptr != (pTNd = rRange.GetNode().GetTextNode()) ) + nullptr != (pTNd = rRange.GetPointNode().GetTextNode()) ) { sal_Unicode const cCh = pTNd->GetText()[m_nSttContent]; if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh ) @@ -525,7 +525,7 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext) if( pCSttNd && !pCEndNd) { // #112139# Do not step behind the end of content. - SwNode & rTmp = rPam.GetNode(); + SwNode & rTmp = rPam.GetPointNode(); SwNode * pEnd = rDoc.GetNodes().DocumentSectionEndNode(&rTmp); if (&rTmp != pEnd) diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx index 9008860776a6..3a06ea4574c8 100644 --- a/sw/source/core/undo/unsort.cxx +++ b/sw/source/core/undo/unsort.cxx @@ -219,7 +219,7 @@ void SwUndoSort::RedoImpl(::sw::UndoRedoContext & rContext) // delete indices aIdxList.clear(); SetPaM(rPam, true); - SwTextNode const*const pTNd = rPam.GetNode().GetTextNode(); + SwTextNode const*const pTNd = rPam.GetPointNode().GetTextNode(); if( pTNd ) { rPam.GetPoint()->nContent = pTNd->GetText().getLength(); diff --git a/sw/source/core/undo/unspnd.cxx b/sw/source/core/undo/unspnd.cxx index 51afe0d8145e..75b6927282d8 100644 --- a/sw/source/core/undo/unspnd.cxx +++ b/sw/source/core/undo/unspnd.cxx @@ -147,7 +147,7 @@ void SwUndoSplitNode::RedoImpl(::sw::UndoRedoContext & rContext) { SwCursor & rPam( rContext.GetCursorSupplier().CreateNewShellCursor() ); rPam.GetPoint()->nNode = m_nNode; - SwTextNode * pTNd = rPam.GetNode().GetTextNode(); + SwTextNode * pTNd = rPam.GetPointNode().GetTextNode(); OSL_ENSURE(pTNd, "SwUndoSplitNode::RedoImpl(): SwTextNode expected"); if (!pTNd) return; diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 162a5e764e64..f0fac20af855 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -519,7 +519,7 @@ void SwUndoTableToText::UndoImpl(::sw::UndoRedoContext & rContext) pPam->DeleteMark(); pPam->GetPoint()->nNode = *pTableNd->EndOfSectionNode(); pPam->SetMark(); - pPam->GetPoint()->nNode = *pPam->GetNode().StartOfSectionNode(); + pPam->GetPoint()->nNode = *pPam->GetPointNode().StartOfSectionNode(); pPam->Move( fnMoveForward, GoInContent ); pPam->Exchange(); pPam->Move( fnMoveBackward, GoInContent ); @@ -657,7 +657,7 @@ void SwUndoTableToText::RedoImpl(::sw::UndoRedoContext & rContext) pPam->SetMark(); // log off all indices pPam->DeleteMark(); - SwTableNode* pTableNd = pPam->GetNode().GetTableNode(); + SwTableNode* pTableNd = pPam->GetPointNode().GetTableNode(); OSL_ENSURE( pTableNd, "Could not find any TableNode" ); if( auto pDDETable = dynamic_cast(&pTableNd->GetTable()) ) @@ -682,7 +682,7 @@ void SwUndoTableToText::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoTableToText::RepeatImpl(::sw::RepeatContext & rContext) { SwPaM *const pPam = & rContext.GetRepeatPaM(); - SwTableNode *const pTableNd = pPam->GetNode().FindTableNode(); + SwTableNode *const pTableNd = pPam->GetPointNode().FindTableNode(); if( pTableNd ) { // move cursor out of table @@ -819,7 +819,7 @@ void SwUndoTextToTable::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoTextToTable::RepeatImpl(::sw::RepeatContext & rContext) { // no Table In Table - if (!rContext.GetRepeatPaM().GetNode().FindTableNode()) + if (!rContext.GetRepeatPaM().GetPointNode().FindTableNode()) { rContext.GetDoc().TextToTable( m_aInsertTableOpts, rContext.GetRepeatPaM(), m_cSeparator, m_nAdjust, @@ -874,7 +874,7 @@ void SwUndoTableHeadline::RedoImpl(::sw::UndoRedoContext & rContext) void SwUndoTableHeadline::RepeatImpl(::sw::RepeatContext & rContext) { SwTableNode *const pTableNd = - rContext.GetRepeatPaM().GetNode().FindTableNode(); + rContext.GetRepeatPaM().GetPointNode().FindTableNode(); if( pTableNd ) { rContext.GetDoc().SetRowsToRepeat( pTableNd->GetTable(), m_nNewHeadline ); @@ -1845,7 +1845,7 @@ void SwUndoTableNdsChg::RedoImpl(::sw::UndoRedoContext & rContext) SwUndoTableMerge::SwUndoTableMerge( const SwPaM& rTableSel ) : SwUndo( SwUndoId::TABLE_MERGE, &rTableSel.GetDoc() ), SwUndRng( rTableSel ) { - const SwTableNode* pTableNd = rTableSel.GetNode().FindTableNode(); + const SwTableNode* pTableNd = rTableSel.GetPointNode().FindTableNode(); OSL_ENSURE( pTableNd, "Where is the TableNode?" ); m_pSaveTable.reset( new SaveTable( pTableNd->GetTable() ) ); m_nTableNode = pTableNd->GetIndex(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 3b5ff90c252b..781752e9935a 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -348,7 +348,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry const SwTextNode * pTmpNode = pNode; if (!pTmpNode) - pTmpNode = rPam.GetNode().GetTextNode(); + pTmpNode = rPam.GetPointNode().GetTextNode(); bool bRet = false; @@ -368,7 +368,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry const SwTextNode * pTmpNode = pNode; if (!pTmpNode) - pTmpNode = rPam.GetNode().GetTextNode(); + pTmpNode = rPam.GetPointNode().GetTextNode(); OUString sRet; if ( pTmpNode && pTmpNode->GetNum() ) @@ -385,7 +385,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry const SwTextNode * pTmpNode = pNode; if (!pTmpNode) - pTmpNode = rPam.GetNode().GetTextNode(); + pTmpNode = rPam.GetPointNode().GetTextNode(); sal_Int16 nRet = -1; if ( pTmpNode ) @@ -448,7 +448,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry break; } // a multi selection is not considered - const SwTextNode* pTextNd = rPam.GetNode().GetTextNode(); + const SwTextNode* pTextNd = rPam.GetPointNode().GetTextNode(); if ( pTextNd && pTextNd->IsInList() ) { switch (rEntry.nWID) @@ -534,9 +534,9 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry case FN_UNO_DOCUMENT_INDEX_MARK: { std::vector marks; - if (rPam.GetNode().IsTextNode()) + if (rPam.GetPointNode().IsTextNode()) { - marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt( + marks = rPam.GetPointNode().GetTextNode()->GetTextAttrsAt( rPam.GetPoint()->GetContentIndex(), RES_TXTATR_TOXMARK); } if (!marks.empty()) @@ -599,7 +599,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry case FN_UNO_TEXT_TABLE: case FN_UNO_CELL: { - SwStartNode* pSttNode = rPam.GetNode().StartOfSectionNode(); + SwStartNode* pSttNode = rPam.GetPointNode().StartOfSectionNode(); SwStartNodeType eType = pSttNode->GetStartNodeType(); if(SwTableBoxStartNode == eType) { @@ -627,14 +627,14 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry break; case FN_UNO_TEXT_FRAME: { - SwStartNode* pSttNode = rPam.GetNode().StartOfSectionNode(); + SwStartNode* pSttNode = rPam.GetPointNode().StartOfSectionNode(); SwStartNodeType eType = pSttNode->GetStartNodeType(); SwFrameFormat* pFormat; if(eType == SwFlyStartNode && nullptr != (pFormat = pSttNode->GetFlyFormat())) { // Create a wrapper only for text frames, not for graphic or OLE nodes. - if (pAny && !rPam.GetNode().IsNoTextNode()) + if (pAny && !rPam.GetPointNode().IsNoTextNode()) { uno::Reference const xFrame( SwXTextFrame::CreateXTextFrame(*pFormat->GetDoc(), pFormat)); @@ -678,8 +678,8 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry case FN_UNO_ENDNOTE: case FN_UNO_FOOTNOTE: { - SwTextAttr *const pTextAttr = rPam.GetNode().IsTextNode() ? - rPam.GetNode().GetTextNode()->GetTextAttrForCharAt( + SwTextAttr *const pTextAttr = rPam.GetPointNode().IsTextNode() ? + rPam.GetPointNode().GetTextNode()->GetTextAttrForCharAt( rPam.GetPoint()->GetContentIndex(), RES_TXTATR_FTN) : nullptr; if(pTextAttr) { @@ -704,9 +704,9 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry case FN_UNO_REFERENCE_MARK: { std::vector marks; - if (rPam.GetNode().IsTextNode()) + if (rPam.GetPointNode().IsTextNode()) { - marks = rPam.GetNode().GetTextNode()->GetTextAttrsAt( + marks = rPam.GetPointNode().GetTextNode()->GetTextAttrsAt( rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK); } if (!marks.empty()) @@ -726,8 +726,8 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry break; case FN_UNO_NESTED_TEXT_CONTENT: { - uno::Reference const xRet(rPam.GetNode().IsTextNode() - ? GetNestedTextContent(*rPam.GetNode().GetTextNode(), + uno::Reference const xRet(rPam.GetPointNode().IsTextNode() + ? GetNestedTextContent(*rPam.GetPointNode().GetTextNode(), rPam.GetPoint()->GetContentIndex(), false) : nullptr); if (xRet.is()) @@ -746,8 +746,8 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry case FN_UNO_CHARFMT_SEQUENCE: { - SwTextNode *const pTextNode = rPam.GetNode().GetTextNode(); - if (&rPam.GetNode() == &rPam.GetNode(false) + SwTextNode *const pTextNode = rPam.GetPointNode().GetTextNode(); + if (&rPam.GetPointNode() == &rPam.GetMarkNode() && pTextNode && pTextNode->GetpSwpHints()) { sal_Int32 nPaMStart = rPam.Start()->GetContentIndex(); @@ -809,7 +809,7 @@ bool getCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry sal_Int16 IsNodeNumStart(SwPaM const & rPam, PropertyState& eState) { - const SwTextNode* pTextNd = rPam.GetNode().GetTextNode(); + const SwTextNode* pTextNd = rPam.GetPointNode().GetTextNode(); // correction: check, if restart value is set at the text node and use // new method to retrieve the value if ( pTextNd && pTextNd->GetNumRule() && pTextNd->IsListRestart() && diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index c156969c0a8c..ac4d4a04abe9 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -665,7 +665,7 @@ void SwXDrawPage::add(const uno::Reference< drawing::XShape > & xShape) throw uno::RuntimeException(); if(RndStdIds::FLY_AT_FLY == aAnchor.GetAnchorId() && - !pInternalPam->GetNode().FindFlyStartNode()) + !pInternalPam->GetPointNode().FindFlyStartNode()) { aAnchor.SetType(RndStdIds::FLY_AS_CHAR); } @@ -1147,7 +1147,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a //The connection is removed now the attribute can be deleted. pTextNode->DeleteAttributes( RES_TXTATR_FLYCNT, nIdx ); //create a new one - SwTextNode *pNd = pInternalPam->GetNode().GetTextNode(); + SwTextNode *pNd = pInternalPam->GetPointNode().GetTextNode(); SAL_WARN_IF( !pNd, "sw.uno", "Cursor not at TextNode." ); SwFormatFlyCnt aFormat( pFormat ); pNd->InsertItem(aFormat, pInternalPam->GetPoint() @@ -1341,7 +1341,7 @@ void SwXShape::setPropertyValue(const OUString& rPropertyName, const uno::Any& a aPam.Move( fnMoveBackward, GoInDoc ); } //the RES_TXTATR_FLYCNT needs to be added now - SwTextNode *pNd = aPam.GetNode().GetTextNode(); + SwTextNode *pNd = aPam.GetPointNode().GetTextNode(); SAL_WARN_IF( !pNd, "sw.uno", "Cursor is not in a TextNode." ); SwFormatFlyCnt aFormat( pFlyFormat ); pNd->InsertItem(aFormat, diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 44559e89780c..ed7f4b848945 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -1961,7 +1961,7 @@ void SAL_CALL SwXTextField::attach( else pDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFormat, nInsertFlags); - SwTextAttr* pTextAttr = aPam.GetNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->GetContentIndex()-1, true ); + SwTextAttr* pTextAttr = aPam.GetPointNode().GetTextNode()->GetFieldTextAttrAt( aPam.GetPoint()->GetContentIndex()-1, true ); // What about updating the fields? (see fldmgr.cxx) if (!pTextAttr) @@ -2025,7 +2025,7 @@ void SAL_CALL SwXTextField::attach( } // keep inserted annotation { - SwTextField* pTextAttr = aEnd.GetNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->GetContentIndex()-1, true ); + SwTextField* pTextAttr = aEnd.GetPointNode().GetTextNode()->GetFieldTextAttrAt( aEnd.End()->GetContentIndex()-1, true ); if ( pTextAttr != nullptr ) { m_pImpl->SetFormatField(const_cast(&pTextAttr->GetFormatField()), m_pImpl->m_pDoc); diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 666a6e7e3a8c..1a42b81fb1f9 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -2776,7 +2776,7 @@ void SwXFrame::attachToRange(uno::Reference const& xTextRange, { eAnchorId = pItem->GetAnchorId(); if( RndStdIds::FLY_AT_FLY == eAnchorId && - !aPam.GetNode().FindFlyStartNode()) + !aPam.GetPointNode().FindFlyStartNode()) { // framebound only where a frame exists SwFormatAnchor aAnchor(RndStdIds::FLY_AT_PARA); @@ -3293,7 +3293,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() SwPaM aPam(rNode); aPam.Move(fnMoveForward, GoInNode); - SwTableNode* pTableNode = aPam.GetNode().FindTableNode(); + SwTableNode* pTableNode = aPam.GetPointNode().FindTableNode(); while( pTableNode ) { aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); @@ -3302,7 +3302,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursor() } const SwStartNode* pNewStartNode = - aPam.GetNode().FindSttNodeByType(SwFlyStartNode); + aPam.GetPointNode().FindSttNodeByType(SwFlyStartNode); if(!pNewStartNode || pNewStartNode != pOwnStartNode) { uno::RuntimeException aExcept; @@ -3326,7 +3326,7 @@ uno::Reference< text::XTextCursor > SwXTextFrame::createTextCursorByRange(const uno::Reference aRef; SwNode& rNode = pFormat->GetContent().GetContentIdx()->GetNode(); - if(aPam.GetNode().FindFlyStartNode() == rNode.FindFlyStartNode()) + if(aPam.GetPointNode().FindFlyStartNode() == rNode.FindFlyStartNode()) { aRef = static_cast( new SwXTextCursor(*pFormat->GetDoc(), this, CursorType::Frame, diff --git a/sw/source/core/unocore/unoftn.cxx b/sw/source/core/unocore/unoftn.cxx index 087f09db3a85..054119216f65 100644 --- a/sw/source/core/unocore/unoftn.cxx +++ b/sw/source/core/unocore/unoftn.cxx @@ -327,7 +327,7 @@ SwXFootnote::attach(const uno::Reference< text::XTextRange > & xTextRange) pNewDoc->getIDocumentContentOperations().InsertPoolItem(aPam, aFootNote, nInsertFlags); SwTextFootnote *const pTextAttr = static_cast( - aPam.GetNode().GetTextNode()->GetTextAttrForCharAt( + aPam.GetPointNode().GetTextNode()->GetTextAttrForCharAt( aPam.GetPoint()->GetContentIndex()-1, RES_TXTATR_FTN )); if (pTextAttr) @@ -442,7 +442,7 @@ SwXFootnote::createTextCursorByRange( SwTextFootnote const*const pTextFootnote = rFormat.GetTextFootnote(); SwNode const*const pFootnoteStartNode = &pTextFootnote->GetStartNode()->GetNode(); - const SwNode* pStart = aPam.GetNode().FindFootnoteStartNode(); + const SwNode* pStart = aPam.GetPointNode().FindFootnoteStartNode(); if (pStart != pFootnoteStartNode) { throw uno::RuntimeException(); diff --git a/sw/source/core/unocore/unolinebreak.cxx b/sw/source/core/unocore/unolinebreak.cxx index 948fc73a3ed6..4f4306bc20a0 100644 --- a/sw/source/core/unocore/unolinebreak.cxx +++ b/sw/source/core/unocore/unolinebreak.cxx @@ -160,7 +160,7 @@ void SAL_CALL SwXLineBreak::attach(const uno::Reference& xText SetAttrMode nInsertFlags = SetAttrMode::DEFAULT; rNewDoc.getIDocumentContentOperations().InsertPoolItem(aPam, aLineBreak, nInsertFlags); auto pTextAttr - = static_cast(aPam.GetNode().GetTextNode()->GetTextAttrForCharAt( + = static_cast(aPam.GetPointNode().GetTextNode()->GetTextAttrForCharAt( aPam.GetPoint()->GetContentIndex() - 1, RES_TXTATR_LINEBREAK)); if (pTextAttr) { diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 5692b190561c..6b0cbe6f305d 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -472,7 +472,7 @@ SwUnoCursorHelper::SetCursorPropertyValue( case FN_UNO_PARA_NUM_AUTO_FORMAT: { // multi selection is not considered - SwTextNode *const pTextNd = rPam.GetNode().GetTextNode(); + SwTextNode *const pTextNd = rPam.GetPointNode().GetTextNode(); if (!pTextNd) { throw lang::IllegalArgumentException(); @@ -990,7 +990,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) { rUnoCursor.Move( fnMoveBackward, GoInDoc ); //check, that the cursor is not in a table - SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode * pTableNode = rUnoCursor.GetPointNode().FindTableNode(); while (pTableNode) { rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); @@ -998,7 +998,7 @@ SwXTextCursor::gotoStart(sal_Bool Expand) pTableNode = pCNode ? pCNode->FindTableNode() : nullptr; } SwStartNode const*const pTmp = - rUnoCursor.GetNode().StartOfSectionNode(); + rUnoCursor.GetPointNode().StartOfSectionNode(); if (pTmp->IsSectionNode()) { SwSectionNode const*const pSectionStartNode = @@ -1109,7 +1109,7 @@ SwXTextCursor::gotoRange( ; } - const SwStartNode* pOwnStartNode = rOwnCursor.GetNode().FindSttNodeByType(eSearchNodeType); + const SwStartNode* pOwnStartNode = rOwnCursor.GetPointNode().FindSttNodeByType(eSearchNodeType); while ( pOwnStartNode != nullptr && pOwnStartNode->IsSectionNode()) { @@ -1117,7 +1117,7 @@ SwXTextCursor::gotoRange( } const SwStartNode* pTmp = - pPam->GetNode().FindSttNodeByType(eSearchNodeType); + pPam->GetPointNode().FindSttNodeByType(eSearchNodeType); while ( pTmp != nullptr && pTmp->IsSectionNode() ) { @@ -2112,7 +2112,7 @@ SwXTextCursor::setPropertyValue( } else if (rPropertyName == UNO_NAME_RESET_PARAGRAPH_LIST_ATTRIBUTES) { - SwTextNode* pTextNode= GetPaM()->GetNode().GetTextNode(); + SwTextNode* pTextNode= GetPaM()->GetPointNode().GetTextNode(); if(pTextNode) { @@ -2460,7 +2460,7 @@ void SAL_CALL SwXTextCursor::invalidateMarkings(::sal_Int32 nType) SwUnoCursor & rUnoCursor( GetCursorOrThrow() ); - SwNode& node = rUnoCursor.GetNode(); + SwNode& node = rUnoCursor.GetPointNode(); SwTextNode* txtNode = node.GetTextNode(); diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index ea529a09b1f1..d7f8176380bd 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -223,7 +223,7 @@ UnoActionRemoveContext::UnoActionRemoveContext(SwDoc *const pDoc) static SwDoc * lcl_IsNewStyleTable(SwUnoTableCursor const& rCursor) { - SwTableNode *const pTableNode = rCursor.GetNode().FindTableNode(); + SwTableNode *const pTableNode = rCursor.GetPointNode().FindTableNode(); return (pTableNode && !pTableNode->GetTable().IsNewModel()) ? &rCursor.GetDoc() : nullptr; @@ -283,7 +283,7 @@ void SwUnoCursorHelper::SetCursorAttr(SwPaM & rPam, if( rSet.GetItemState( RES_PARATR_OUTLINELEVEL, false ) >= SfxItemState::DEFAULT ) { - SwTextNode * pTmpNode = rPam.GetNode().GetTextNode(); + SwTextNode * pTmpNode = rPam.GetPointNode().GetTextNode(); if ( pTmpNode ) { rPam.GetDoc().GetNodes().UpdateOutlineNode( *pTmpNode ); @@ -556,7 +556,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() // os 2005-01-14: This part is only necessary to detect movements out // of a selection; if there is no selection we don't have to care - SwTableNode *const pTableNode = aNewCursor->GetNode().FindTableNode(); + SwTableNode *const pTableNode = aNewCursor->GetPointNode().FindTableNode(); bool bMovedFromTable = false; if (CursorType::SelectionInTable != m_eCursorType && pTableNode) { @@ -584,7 +584,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() { rUnoCursor.SetRemainInSection( false ); // what to do if already in a table? - SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode * pTableNode = rUnoCursor.GetPointNode().FindTableNode(); pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable ); if (pTableNode && (&pTableNode->GetTable() != m_pOwnTable)) { @@ -621,7 +621,7 @@ SwXParagraphEnumerationImpl::NextElement_Impl() (m_nEndIndex == pStart->GetNodeIndex()) ? m_nLastParaEnd : -1; // position in a table, or in a simple paragraph? - SwTableNode * pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode * pTableNode = rUnoCursor.GetPointNode().FindTableNode(); pTableNode = lcl_FindTopLevelTable( pTableNode, m_pOwnTable ); if (/*CursorType::TableText != eCursorType && CursorType::SelectionInTable != eCursorType && */ pTableNode && (&pTableNode->GetTable() != m_pOwnTable)) @@ -1765,10 +1765,10 @@ SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl( // into the array void SwXParaFrameEnumerationImpl::FillFrame() { - if(!m_pUnoCursor->GetNode().IsTextNode()) + if(!m_pUnoCursor->GetPointNode().IsTextNode()) return; // search for objects at the cursor - anchored at/as char - const auto pTextAttr = m_pUnoCursor->GetNode().GetTextNode()->GetTextAttrForCharAt( + const auto pTextAttr = m_pUnoCursor->GetPointNode().GetTextNode()->GetTextAttrForCharAt( m_pUnoCursor->GetPoint()->GetContentIndex(), RES_TXTATR_FLYCNT); if(!pTextAttr) return; diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 1a4c065df2cd..c722d60a83a4 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -168,7 +168,7 @@ OUString SwXTextPortion::getString() SwUnoCursor& rUnoCursor = GetCursor(); // TextPortions are always within a paragraph - SwTextNode* pTextNd = rUnoCursor.GetNode().GetTextNode(); + SwTextNode* pTextNd = rUnoCursor.GetPointNode().GetTextNode(); if ( pTextNd ) { const sal_Int32 nStt = rUnoCursor.Start()->GetContentIndex(); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 44b152d8c7fc..d38152b20aa0 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1394,7 +1394,7 @@ static void lcl_CreatePortions( pUnoCursor->DeleteMark(); } - SwTextNode * const pTextNode = pUnoCursor->GetNode().GetTextNode(); + SwTextNode * const pTextNode = pUnoCursor->GetPointNode().GetTextNode(); if (!pTextNode) { OSL_FAIL("lcl_CreatePortions: no TextNode - what now ?"); diff --git a/sw/source/core/unocore/unoredline.cxx b/sw/source/core/unocore/unoredline.cxx index 0805c01d3372..17ecf3c06a6f 100644 --- a/sw/source/core/unocore/unoredline.cxx +++ b/sw/source/core/unocore/unoredline.cxx @@ -105,7 +105,7 @@ uno::Reference SwXRedlineText::createTextCursor() // Patterned after SwXTextFrame::createTextCursor(). // skip all tables at the beginning - SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode(); bool bTable = pTableNode != nullptr; while( pTableNode != nullptr ) { @@ -113,7 +113,7 @@ uno::Reference SwXRedlineText::createTextCursor() SwContentNode* pContentNode = GetDoc()->GetNodes().GoNext(rUnoCursor.GetPoint()); pTableNode = pContentNode->FindTableNode(); } - if( bTable && rUnoCursor.GetNode().FindSttNodeByType( SwNormalStartNode ) + if( bTable && rUnoCursor.GetPointNode().FindSttNodeByType( SwNormalStartNode ) != GetStartNode() ) { // We have gone too far and have left our own redline. This means that @@ -402,9 +402,9 @@ uno::Any SwXRedline::getPropertyValue( const OUString& rPropertyName ) rPropertyName == UNO_NAME_REDLINE_END) { uno::Reference xRet; - SwNode* pNode = &m_pRedline->GetNode(); + SwNode* pNode = &m_pRedline->GetPointNode(); if(!bStart && m_pRedline->HasMark()) - pNode = &m_pRedline->GetNode(false); + pNode = &m_pRedline->GetMarkNode(); switch(pNode->GetNodeType()) { case SwNodeType::Section: @@ -539,7 +539,7 @@ uno::Reference< text::XTextCursor > SwXRedline::createTextCursor() rUnoCursor.Move(fnMoveForward, GoInNode); // is here a table? - SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode(); while( pTableNode ) { rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx index 8b2e570b1f37..d7c91d1501c7 100644 --- a/sw/source/core/unocore/unorefmk.cxx +++ b/sw/source/core/unocore/unorefmk.cxx @@ -213,7 +213,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, std::vector oldMarks; if (bMark) { - oldMarks = rPam.GetNode().GetTextNode()->GetTextAttrsAt( + oldMarks = rPam.GetPointNode().GetTextNode()->GetTextAttrsAt( rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK); } @@ -231,7 +231,7 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, // #i107672# // ensure that we do not retrieve a different mark at the same position std::vector const newMarks( - rPam.GetNode().GetTextNode()->GetTextAttrsAt( + rPam.GetPointNode().GetTextNode()->GetTextAttrsAt( rPam.GetPoint()->GetContentIndex(), RES_TXTATR_REFMARK)); std::vector::const_iterator const iter( std::find_if(newMarks.begin(), newMarks.end(), @@ -244,9 +244,9 @@ void SwXReferenceMark::Impl::InsertRefMark(SwPaM& rPam, } else { - SwTextNode *pTextNd = rPam.GetNode().GetTextNode(); + SwTextNode *pTextNd = rPam.GetPointNode().GetTextNode(); assert(pTextNd); - pTextAttr = pTextNd ? rPam.GetNode().GetTextNode()->GetTextAttrForCharAt( + pTextAttr = pTextNd ? rPam.GetPointNode().GetTextNode()->GetTextAttrForCharAt( rPam.GetPoint()->GetContentIndex() - 1, RES_TXTATR_REFMARK) : nullptr; } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index e28ab9e9ea2d..e7fe7aaa604c 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -1140,8 +1140,8 @@ SwXTextSection::Impl::GetPropertyValues_Impl( pFormat->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable(); for (SwRangeRedline* pRedline : rRedTable) { - const SwNode& rRedPointNode = pRedline->GetNode(); - const SwNode& rRedMarkNode = pRedline->GetNode(false); + const SwNode& rRedPointNode = pRedline->GetPointNode(); + const SwNode& rRedMarkNode = pRedline->GetMarkNode(); if ((&rRedPointNode == pSectNode) || (&rRedMarkNode == pSectNode)) { diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx index f28bbd930bb5..bc13a833cd4c 100644 --- a/sw/source/core/unocore/unotbl.cxx +++ b/sw/source/core/unocore/unotbl.cxx @@ -319,8 +319,8 @@ static uno::Any lcl_GetSpecialProperty(SwFrameFormat* pFormat, const SfxItemProp pTableNode = pTableNode->EndOfSectionNode(); for(const SwRangeRedline* pRedline : pFormat->GetDoc()->getIDocumentRedlineAccess().GetRedlineTable()) { - const SwNode& rRedPointNode = pRedline->GetNode(); - const SwNode& rRedMarkNode = pRedline->GetNode(false); + const SwNode& rRedPointNode = pRedline->GetPointNode(); + const SwNode& rRedMarkNode = pRedline->GetMarkNode(); if(&rRedPointNode == pTableNode || &rRedMarkNode == pTableNode) { const SwNode& rStartOfRedline = SwNodeIndex(rRedPointNode) <= SwNodeIndex(rRedMarkNode) ? @@ -935,7 +935,7 @@ uno::Reference SwXCell::createTextCursorByRange(const uno::Re throw uno::RuntimeException(); const SwStartNode* pSttNd = m_pStartNode ? m_pStartNode : m_pBox->GetSttNd(); // skip sections - SwStartNode* p1 = aPam.GetNode().StartOfSectionNode(); + SwStartNode* p1 = aPam.GetPointNode().StartOfSectionNode(); while(p1->IsSectionNode()) p1 = p1->StartOfSectionNode(); if( p1 != pSttNd ) @@ -1626,7 +1626,7 @@ void SwXTextTableCursor::setPropertyValue(const OUString& rPropertyName, const u if(pEntry->nFlags & beans::PropertyAttribute::READONLY) throw beans::PropertyVetoException("Property is read-only: " + rPropertyName, static_cast(this)); { - auto pSttNode = rUnoCursor.GetNode().StartOfSectionNode(); + auto pSttNode = rUnoCursor.GetPointNode().StartOfSectionNode(); const SwTableNode* pTableNode = pSttNode->FindTableNode(); lcl_FormatTable(pTableNode->GetTable().GetFrameFormat()); } @@ -1676,7 +1676,7 @@ uno::Any SwXTextTableCursor::getPropertyValue(const OUString& rPropertyName) SolarMutexGuard aGuard; SwUnoCursor& rUnoCursor = GetCursor(); { - auto pSttNode = rUnoCursor.GetNode().StartOfSectionNode(); + auto pSttNode = rUnoCursor.GetPointNode().StartOfSectionNode(); const SwTableNode* pTableNode = pSttNode->FindTableNode(); lcl_FormatTable(pTableNode->GetTable().GetFrameFormat()); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index dc524f88c651..4aa075ed0ffb 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -328,7 +328,7 @@ SwXText::insertString(const uno::Reference< text::XTextRange >& xTextRange, throw uno::RuntimeException(); } - const SwStartNode* pTmp(pPam->GetNode().StartOfSectionNode()); + const SwStartNode* pTmp(pPam->GetPointNode().StartOfSectionNode()); while (pTmp && pTmp->IsSectionNode()) { pTmp = pTmp->StartOfSectionNode(); @@ -555,7 +555,7 @@ SwXText::insertTextContent( } const SwStartNode* pTmp = - aPam.GetNode().FindSttNodeByType(eSearchNodeType); + aPam.GetPointNode().FindSttNodeByType(eSearchNodeType); // ignore SectionNodes while (pTmp && pTmp->IsSectionNode()) @@ -999,7 +999,7 @@ bool SwXText::Impl::CheckForOwnMember( comphelper::getFromUnoTunnel(xOwnCursor); OSL_ENSURE(pOwnCursor, "OTextCursorHelper::getUnoTunnelId() ??? "); const SwStartNode* pOwnStartNode = - pOwnCursor->GetPaM()->GetNode().StartOfSectionNode(); + pOwnCursor->GetPaM()->GetPointNode().StartOfSectionNode(); SwStartNodeType eSearchNodeType = SwNormalStartNode; switch (m_eType) { @@ -1014,7 +1014,7 @@ bool SwXText::Impl::CheckForOwnMember( ; } - const SwNode& rSrcNode = rPaM.GetNode(); + const SwNode& rSrcNode = rPaM.GetPointNode(); const SwStartNode* pTmp = rSrcNode.FindSttNodeByType(eSearchNodeType); // skip SectionNodes / TableNodes to be able to compare across table/section boundaries @@ -1603,12 +1603,12 @@ SwXText::convertToTextFrame( bool bIllegalException = false; bool bRuntimeException = false; OUString sMessage; - SwStartNode* pStartStartNode = pStartPam->GetNode().StartOfSectionNode(); + SwStartNode* pStartStartNode = pStartPam->GetPointNode().StartOfSectionNode(); while (pStartStartNode && pStartStartNode->IsSectionNode()) { pStartStartNode = pStartStartNode->StartOfSectionNode(); } - SwStartNode* pEndStartNode = pEndPam->GetNode().StartOfSectionNode(); + SwStartNode* pEndStartNode = pEndPam->GetPointNode().StartOfSectionNode(); while (pEndStartNode && pEndStartNode->IsSectionNode()) { pEndStartNode = pEndStartNode->StartOfSectionNode(); @@ -1645,7 +1645,7 @@ SwXText::convertToTextFrame( bParaBeforeInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aBefore ); pStartPam->DeleteMark(); *pStartPam->GetPoint() = aBefore; - pStartStartNode = pStartPam->GetNode().StartOfSectionNode(); + pStartStartNode = pStartPam->GetPointNode().StartOfSectionNode(); } if (pEndStartNode->GetStartNodeType() == SwTableBoxStartNode) { @@ -1655,7 +1655,7 @@ SwXText::convertToTextFrame( bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aTableEnd ); pEndPam->DeleteMark(); *pEndPam->GetPoint() = aTableEnd; - pEndStartNode = pEndPam->GetNode().StartOfSectionNode(); + pEndStartNode = pEndPam->GetPointNode().StartOfSectionNode(); } // now we should have the positions in the same hierarchy if ((pStartStartNode != pEndStartNode) || @@ -1755,13 +1755,13 @@ SwXText::convertToTextFrame( assert(!rNewFrame.getName().isEmpty()); } - SwTextNode *const pTextNode(pStartPam->GetNode().GetTextNode()); + SwTextNode *const pTextNode(pStartPam->GetPointNode().GetTextNode()); assert(pTextNode); if (!pTextNode || !pTextNode->Len()) // don't remove if it contains text! { { // has to be in a block to remove the SwIndexes before // DelFullPara is called - SwPaM aMovePam( pStartPam->GetNode() ); + SwPaM aMovePam( pStartPam->GetPointNode() ); if (aMovePam.Move( fnMoveForward, GoInContent )) { // move the anchor to the next paragraph @@ -1841,7 +1841,7 @@ SwXText::convertToTextFrame( else { // In case the frame has a table only, the cursor points to the end of the first cell of the table. - SwPaM aPaM(*pFrameCursor->GetPaM()->GetNode().FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode()); + SwPaM aPaM(*pFrameCursor->GetPaM()->GetPointNode().FindSttNodeByType(SwFlyStartNode)->EndOfSectionNode()); // Now we have the end of the frame -- the node before that will be the paragraph we want to remove. --aPaM.GetPoint()->nNode; m_pImpl->m_pDoc->getIDocumentContentOperations().DelFullPara(aPaM); @@ -2046,7 +2046,7 @@ void SwXText::Impl::ConvertCell( aEndCellPam.DeleteMark(); aEndCellPam.Move(fnMoveBackward, GoInNode); aEndCellPam.GetPoint()->nContent = - aEndCellPam.GetNode().GetTextNode()->Len(); + aEndCellPam.GetPointNode().GetTextNode()->Len(); } assert(aStartCellPam.Start()->GetContentIndex() == 0); @@ -2503,7 +2503,7 @@ rtl::Reference SwXBodyText::CreateTextCursor(const bool bIgnoreTa aPam.Move( fnMoveBackward, GoInDoc ); if (!bIgnoreTables) { - SwTableNode * pTableNode = aPam.GetNode().FindTableNode(); + SwTableNode * pTableNode = aPam.GetPointNode().FindTableNode(); while (pTableNode) { aPam.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); @@ -2547,12 +2547,12 @@ SwXBodyText::createTextCursorByRange( SwUnoInternalPaM aPam(*GetDoc()); if (::sw::XTextRangeToSwPaM(aPam, xTextPosition)) { - if ( !aPam.GetNode().GetTextNode() ) + if ( !aPam.GetPointNode().GetTextNode() ) throw uno::RuntimeException("Invalid text range" ); SwNode& rNode = GetDoc()->GetNodes().GetEndOfContent(); - SwStartNode* p1 = aPam.GetNode().StartOfSectionNode(); + SwStartNode* p1 = aPam.GetPointNode().StartOfSectionNode(); //document starts with a section? while(p1->IsSectionNode()) { @@ -2758,7 +2758,7 @@ uno::Reference SwXHeadFootText::CreateTextCursor(const bool b if (!bIgnoreTables) { // is there a table here? - SwTableNode* pTableNode = rUnoCursor.GetNode().FindTableNode(); + SwTableNode* pTableNode = rUnoCursor.GetPointNode().FindTableNode(); while (pTableNode) { rUnoCursor.GetPoint()->nNode = *pTableNode->EndOfSectionNode(); @@ -2766,7 +2766,7 @@ uno::Reference SwXHeadFootText::CreateTextCursor(const bool b pTableNode = pCont->FindTableNode(); } } - SwStartNode const*const pNewStartNode = rUnoCursor.GetNode().FindSttNodeByType( + SwStartNode const*const pNewStartNode = rUnoCursor.GetPointNode().FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); if (!pNewStartNode || (pNewStartNode != pOwnStartNode)) { @@ -2801,9 +2801,9 @@ uno::Reference SAL_CALL SwXHeadFootText::createTextCursorByRa SwPosition aPos(rNode); SwPaM aHFPam(aPos); aHFPam.Move(fnMoveForward, GoInNode); - SwStartNode* const pOwnStartNode = aHFPam.GetNode().FindSttNodeByType( + SwStartNode* const pOwnStartNode = aHFPam.GetPointNode().FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); - SwStartNode* const p1 = aPam.GetNode().FindSttNodeByType( + SwStartNode* const p1 = aPam.GetPointNode().FindSttNodeByType( (m_pImpl->m_bIsHeader) ? SwHeaderStartNode : SwFooterStartNode); if (p1 == pOwnStartNode) { diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index a4112636c88a..309a5289013a 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -632,9 +632,9 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, if (MakeBookRegionOrPoint(rEntry, m_rDoc, aRegion)) { SwFltRDFMark* pMark = static_cast(rEntry.m_pAttr.get()); - if (aRegion.GetNode().IsTextNode()) + if (aRegion.GetPointNode().IsTextNode()) { - SwTextNode& rTextNode = *aRegion.GetNode().GetTextNode(); + SwTextNode& rTextNode = *aRegion.GetPointNode().GetTextNode(); for (const std::pair& rAttribute : pMark->GetAttributes()) { diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index ec213c65a78e..3d3e40a6807e 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -226,7 +226,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) { *pUndoPam->GetMark() = *pPam->GetPoint(); ++pUndoPam->GetPoint()->nNode; - SwNode& rNd = pUndoPam->GetNode(); + SwNode& rNd = pUndoPam->GetPointNode(); if( rNd.IsContentNode() ) pUndoPam->GetPoint()->nContent.Assign( static_cast(&rNd), nSttContent ); diff --git a/sw/source/filter/docx/swdocxreader.cxx b/sw/source/filter/docx/swdocxreader.cxx index 2bd3f3474283..7006072fd854 100644 --- a/sw/source/filter/docx/swdocxreader.cxx +++ b/sw/source/filter/docx/swdocxreader.cxx @@ -169,7 +169,7 @@ bool SwDOCXReader::MakeEntries( SwDoc *pD, SwTextBlocks &rBlocks ) SwPaM aPam( aStart ); SwNodeIndex& rIdx = aPam.GetPoint()->nNode; ++rIdx; - aLNm = aPam.GetNode().GetTextNode()->GetText(); + aLNm = aPam.GetPointNode().GetTextNode()->GetText(); // is AutoText? bIsAutoText = aLNm.startsWith(AUTOTEXT_GALLERY); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 4692a6f56b94..0efbf982592d 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -447,7 +447,7 @@ static void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat, sal_uInt8 nBulletGrfLvl = 255; // The bullet graphic we want to output // Are we in a bulleted or numbered list? - const SwTextNode* pTextNd = rWrt.m_pCurrentPam->GetNode().GetTextNode(); + const SwTextNode* pTextNd = rWrt.m_pCurrentPam->GetPointNode().GetTextNode(); SwHTMLNumRuleInfo aNumInfo; if( rHWrt.GetNextNumInfo() ) diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index 84bd66a8057c..e5c46119fcbe 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -611,7 +611,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const char *pTag ) // will insert before the space. Then there are less problems // during formatting. (bug #40483#) const sal_Int32 nPos = m_pPam->GetPoint()->GetContentIndex(); - SwTextNode *pTextNd = m_pPam->GetNode().GetTextNode(); + SwTextNode *pTextNd = m_pPam->GetPointNode().GetTextNode(); bool bMoveFwd = false; if (nPos>0 && pTextNd && (' ' == pTextNd->GetText()[nPos-1])) { diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index 9e7ab7cc9a64..a3a1222a3050 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -201,7 +201,7 @@ void SwHTMLParser::FinishFootEndNote() m_xDoc->getIDocumentContentOperations().InsertPoolItem( *m_pPam, aFootnote ); SwTextFootnote * const pTextFootnote = static_cast( - m_pPam->GetNode().GetTextNode()->GetTextAttrForCharAt( + m_pPam->GetPointNode().GetTextNode()->GetTextAttrForCharAt( m_pPam->GetPoint()->GetContentIndex() - 1, RES_TXTATR_FTN ) ); // In header and footer no footnotes can be inserted. if (pTextFootnote) diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 1a6c3fac6863..fbc89f00475d 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -261,7 +261,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri, if( bMoveBackward ) m_pPam->Move( fnMoveBackward ); - if (aAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR && !m_pPam->GetNode().GetTextNode()) + if (aAnchor.GetAnchorId() == RndStdIds::FLY_AS_CHAR && !m_pPam->GetPointNode().GetTextNode()) { eState = SvParserState::Error; return; @@ -467,7 +467,7 @@ IMAGE_SETEVENT: !m_aBulletGrfs[GetNumInfo().GetDepth()-1].isEmpty() && m_aBulletGrfs[GetNumInfo().GetDepth()-1]==sGrfNm ) { - SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPam->GetPointNode().GetTextNode(); if( pTextNode && ! pTextNode->IsCountedInList()) { @@ -785,7 +785,7 @@ IMAGE_SETEVENT: aFrameSize.SetHeightPercent( nPercentHeight ); aFrameSet.Put( aFrameSize ); - const SwNodeType eNodeType = m_pPam->GetNode().GetNodeType(); + const SwNodeType eNodeType = m_pPam->GetPointNode().GetNodeType(); if (eNodeType != SwNodeType::Text && eNodeType != SwNodeType::Table) return; diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx index 7fb3777ccf0f..3564fd5ebac1 100644 --- a/sw/source/filter/html/htmlnumreader.cxx +++ b/sw/source/filter/html/htmlnumreader.cxx @@ -337,7 +337,7 @@ void SwHTMLParser::EndNumberBulletList( HtmlTokenId nToken ) bool bAppend = m_pPam->GetPoint()->GetContentIndex() > 0; if( !bAppend ) { - SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPam->GetPointNode().GetTextNode(); bAppend = (pTextNode && ! pTextNode->IsOutline() && pTextNode->IsCountedInList()) || @@ -395,7 +395,7 @@ void SwHTMLParser::EndNumberBulletList( HtmlTokenId nToken ) // On the last append, the NumRule item and NodeNum object were copied. // Now we need to delete them. ResetAttr deletes the NodeNum object as well - if (SwTextNode *pTextNode = m_pPam->GetNode().GetTextNode()) + if (SwTextNode *pTextNode = m_pPam->GetPointNode().GetTextNode()) pTextNode->ResetAttr(RES_PARATR_NUMRULE); rInfo.Clear(); @@ -467,7 +467,7 @@ void SwHTMLParser::NewNumberBulletListItem( HtmlTokenId nToken ) AppendTextNode( AM_NOSPACE, false ); m_bNoParSpace = false; // no space in
  • ! - SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPam->GetPointNode().GetTextNode(); if (!pTextNode) { SAL_WARN("sw.html", "No Text-Node at PaM-Position"); @@ -601,7 +601,7 @@ void SwHTMLParser::EndNumberBulletListItem( HtmlTokenId nToken, bool bSetColl ) void SwHTMLParser::SetNodeNum( sal_uInt8 nLevel ) { - SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPam->GetPointNode().GetTextNode(); if (!pTextNode) { SAL_WARN("sw.html", "No Text-Node at PaM-Position"); diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx index 6a353af603d6..b845c314430d 100644 --- a/sw/source/filter/html/htmlnumwriter.cxx +++ b/sw/source/filter/html/htmlnumwriter.cxx @@ -286,9 +286,9 @@ Writer& OutHTML_NumberBulletListStart( SwHTMLWriter& rWrt, sal_uInt16 nStartVal = rNumFormat.GetStart(); if( bStartValue && 1 == nStartVal && i == rInfo.GetDepth()-1 ) { - if ( rWrt.m_pCurrentPam->GetNode().GetTextNode()->GetNum() ) + if ( rWrt.m_pCurrentPam->GetPointNode().GetTextNode()->GetNum() ) { - nStartVal = static_cast< sal_uInt16 >( rWrt.m_pCurrentPam->GetNode() + nStartVal = static_cast< sal_uInt16 >( rWrt.m_pCurrentPam->GetPointNode() .GetTextNode()->GetNumberVector()[i] ); } else diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index edd0bef8b326..5d8b4b5aea29 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -5149,7 +5149,7 @@ std::shared_ptr SwHTMLParser::BuildTable(SvxAdjust eParentAdjust, SwStartNode *pTableStNd = pTCntxt->GetTableNode(); OSL_ENSURE( pTableStNd, "Where is the table node" ); - OSL_ENSURE( pTableStNd==m_pPam->GetNode().FindTableNode(), + OSL_ENSURE( pTableStNd == m_pPam->GetPointNode().FindTableNode(), "Are we in the wrong table?" ); SwNode* pNd; diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index e2c9d05e52b1..dd3f4f78839b 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -1778,10 +1778,10 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken ) if( m_nOpenParaToken != HtmlTokenId::NONE ) EndPara(); OSL_ENSURE(!m_xTable, "table in table not allowed here"); - if( !m_xTable && (IsNewDoc() || !m_pPam->GetNode().FindTableNode()) && + if( !m_xTable && (IsNewDoc() || !m_pPam->GetPointNode().FindTableNode()) && (m_pPam->GetPoint()->GetNodeIndex() > m_xDoc->GetNodes().GetEndOfExtras().GetIndex() || - !m_pPam->GetNode().FindFootnoteStartNode() ) ) + !m_pPam->GetPointNode().FindFootnoteStartNode() ) ) { if ( m_nParaCnt < 5 ) Show(); // show what we have up to here @@ -2361,7 +2361,7 @@ bool SwHTMLParser::AppendTextNode( SwHTMLAppendMode eMode, bool bUpdateNum ) SetNodeNum( nLvl ); } else - m_pPam->GetNode().GetTextNode()->ResetAttr( RES_PARATR_NUMRULE ); + m_pPam->GetPointNode().GetTextNode()->ResetAttr( RES_PARATR_NUMRULE ); } // We must set the attribute of the paragraph before now (because of JavaScript) @@ -4026,7 +4026,7 @@ void SwHTMLParser::EndPara( bool bReal ) if (HtmlTokenId::LI_ON==m_nOpenParaToken && m_xTable) { #if OSL_DEBUG_LEVEL > 0 - const SwNumRule *pNumRule = m_pPam->GetNode().GetTextNode()->GetNumRule(); + const SwNumRule *pNumRule = m_pPam->GetPointNode().GetTextNode()->GetNumRule(); OSL_ENSURE( pNumRule, "Where is the NumRule" ); #endif } @@ -5183,7 +5183,7 @@ void SwHTMLParser::InsertLineBreak() else { //
    is mapped an SwFormatLineBreak. - SwTextNode* pTextNode = m_pPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPam->GetPointNode().GetTextNode(); if (pTextNode) { SwFormatLineBreak aLineBreak(eClear); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 690f23c47d52..8ca66e05215d 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -484,7 +484,7 @@ ErrCode SwHTMLWriter::WriteStream() // respect table and section at document beginning { - SwTableNode * pTNd = m_pCurrentPam->GetNode().FindTableNode(); + SwTableNode * pTNd = m_pCurrentPam->GetPointNode().FindTableNode(); if( pTNd && m_bWriteAll ) { // start with table node !! @@ -497,7 +497,7 @@ ErrCode SwHTMLWriter::WriteStream() // first node (with can contain a page break) m_pStartNdIdx = new SwNodeIndex( m_pCurrentPam->GetPoint()->GetNode() ); - SwSectionNode * pSNd = m_pCurrentPam->GetNode().FindSectionNode(); + SwSectionNode * pSNd = m_pCurrentPam->GetPointNode().FindSectionNode(); while( pSNd ) { if( m_bWriteAll ) @@ -907,7 +907,7 @@ void SwHTMLWriter::Out_SwDoc( SwPaM* pPam ) (m_pCurrentPam->GetPoint()->GetNodeIndex() == m_pCurrentPam->GetMark()->GetNodeIndex() && m_pCurrentPam->GetPoint()->GetContentIndex() <= m_pCurrentPam->GetMark()->GetContentIndex()) ) { - SwNode& rNd = m_pCurrentPam->GetNode(); + SwNode& rNd = m_pCurrentPam->GetPointNode(); OSL_ENSURE( !(rNd.IsGrfNode() || rNd.IsOLENode()), "Unexpected Grf- or OLE-Node here" ); diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 8298af5de01b..1543df719fec 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -390,10 +390,10 @@ static void checkAndWriteFloatingTables(DocxAttributeOutput& rDocxAttributeOutpu const SwFormatAnchor& rAnchor = pFrameFormat->GetAnchor(); const SwPosition* pPosition = rAnchor.GetContentAnchor(); - if (!pPosition || ! rExport.m_pCurPam->GetNode().GetTextNode()) + if (!pPosition || ! rExport.m_pCurPam->GetPointNode().GetTextNode()) continue; - if (pPosition->nNode != rExport.m_pCurPam->GetNode().GetTextNode()->GetIndex()) + if (pPosition->nNode != rExport.m_pCurPam->GetPointNode().GetTextNode()->GetIndex()) continue; const SwNodeIndex* pStartNode = pFrameFormat->GetContent().GetContentIdx(); @@ -502,7 +502,7 @@ sal_Int32 DocxAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t p bool bEndParaSdt = false; if (m_aParagraphSdt.m_bStartedSdt) { - SwTextNode* pTextNode = m_rExport.m_pCurPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_rExport.m_pCurPam->GetPointNode().GetTextNode(); if (pTextNode && pTextNode->GetpSwAttrSet()) { const SfxItemSet* pSet = pTextNode->GetpSwAttrSet(); @@ -1501,7 +1501,7 @@ void DocxAttributeOutput::EndParagraphProperties(const SfxItemSet& rParagraphMar m_pSerializer->endElementNS( XML_w, XML_pPr ); // RDF metadata for this text node. - SwTextNode* pTextNode = m_rExport.m_pCurPam->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_rExport.m_pCurPam->GetPointNode().GetTextNode(); std::map aStatements; if (pTextNode) aStatements = SwRDFHelper::getTextNodeStatements("urn:bails", *pTextNode); @@ -7152,7 +7152,7 @@ void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW // Detect when the current node is the last node in the // document: the last section is written explicitly in // DocxExport::WriteMainText(), don't duplicate that here. - SwNodeIndex aCurrentNode(m_rExport.m_pCurPam->GetNode()); + SwNodeIndex aCurrentNode(m_rExport.m_pCurPam->GetPointNode()); SwNodeIndex aLastNode(m_rExport.m_rDoc.GetNodes().GetEndOfContent(), -1); bool bEmit = aCurrentNode != aLastNode; diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx index 7a0dee9c743b..e2ee0fb284ef 100644 --- a/sw/source/filter/ww8/rtfexport.cxx +++ b/sw/source/filter/ww8/rtfexport.cxx @@ -496,7 +496,7 @@ void RtfExport::WriteMainText() Strm().WriteChar('}'); // background } - SwTableNode* pTableNode = m_pCurPam->GetNode().FindTableNode(); + SwTableNode* pTableNode = m_pCurPam->GetPointNode().FindTableNode(); if (m_pWriter && m_pWriter->m_bWriteOnlyFirstTable && pTableNode != nullptr) { m_pCurPam->GetPoint()->nNode = *pTableNode; diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index d166b5d885c9..f0187d3a6230 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -995,7 +995,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) sal_uLong nRstLnNum = pSet ? pSet->Get( RES_LINENUMBER ).GetStartValue() : 0; - const SwTableNode* pTableNd = rExport.m_pCurPam->GetNode().FindTableNode(); + const SwTableNode* pTableNd = rExport.m_pCurPam->GetPointNode().FindTableNode(); const SwSectionNode* pSectNd = nullptr; if ( pTableNd ) { @@ -1570,12 +1570,12 @@ bool UsePrevSectionNextStyle(sal_uInt8 nBreakCode, const SwPageDesc* pPd, SwPaM aPaM(*pSectionStart); aPaM.Move(fnMoveBackward); - if (!aPaM.GetNode().IsTextNode()) + if (!aPaM.GetPointNode().IsTextNode()) { return false; } - SwTextNode* pTextNode = aPaM.GetNode().GetTextNode(); + SwTextNode* pTextNode = aPaM.GetPointNode().GetTextNode(); const SwAttrSet* pParaProps = &pTextNode->GetSwAttrSet(); sal_uInt32 nCharHeight = pParaProps->GetSize().GetHeight(); if (nCharHeight > 20) @@ -1584,12 +1584,12 @@ bool UsePrevSectionNextStyle(sal_uInt8 nBreakCode, const SwPageDesc* pPd, } aPaM.Move(fnMoveBackward); - if (!aPaM.GetNode().IsTextNode()) + if (!aPaM.GetPointNode().IsTextNode()) { return false; } - pTextNode = aPaM.GetNode().GetTextNode(); + pTextNode = aPaM.GetPointNode().GetTextNode(); pParaProps = &pTextNode->GetSwAttrSet(); return pParaProps->HasItem(RES_PAGEDESC); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index f6d5160cd92e..77a66658f8d4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -2787,7 +2787,7 @@ void MSWordExportBase::WriteText() TrackContentToExport aContentTracking(m_pCurPam.get(), m_nCurStart, m_nCurEnd); while (aContentTracking.contentRemainsToExport(m_pTableInfo.get())) { - SwNode& rNd = m_pCurPam->GetNode(); + SwNode& rNd = m_pCurPam->GetPointNode(); // no section breaks exported for Endnotes if ( rNd.IsTextNode() && m_nTextTyp != TXT_EDN && m_nTextTyp != TXT_FTN ) @@ -2962,7 +2962,7 @@ bool MSWordExportBase::IsInTable() const if (m_pCurPam != nullptr) { - SwNode& rNode = m_pCurPam->GetNode(); + SwNode& rNode = m_pCurPam->GetPointNode(); if (m_pTableInfo) { @@ -3815,7 +3815,7 @@ ErrCode SwWW8Writer::WriteStorageImpl() // Respect table at the beginning of the document { - SwTableNode* pTNd = m_pCurrentPam->GetNode().FindTableNode(); + SwTableNode* pTNd = m_pCurrentPam->GetPointNode().FindTableNode(); if( pTNd && m_bWriteAll ) // start with the table node !! m_pCurrentPam->GetPoint()->nNode = *pTNd; diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index d83af1e5a6c9..58d0a5bd4995 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -3293,7 +3293,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) const SwTextNode *pTextNd = GetExport().GetHdFtPageRoot(); if (!pTextNd) { - pTextNd = GetExport().m_pCurPam->GetNode().GetTextNode(); + pTextNd = GetExport().m_pCurPam->GetPointNode().GetTextNode(); } if (pTextNd) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 346c3d6cb699..065be5d855c4 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2416,7 +2416,7 @@ void wwSectionManager::SetHdFt(wwSection const &rSection, int nSect, void SwWW8ImplReader::AppendTextNode(SwPosition& rPos) { - SwTextNode* pText = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pText = m_pPaM->GetPointNode().GetTextNode(); const SwNumRule* pRule = nullptr; @@ -3552,7 +3552,7 @@ bool SwWW8ImplReader::HandlePageBreakChar() if (!m_nInTable) { bool IsTemp=true; - SwTextNode* pTemp = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pTemp = m_pPaM->GetPointNode().GetTextNode(); if (pTemp && pTemp->GetText().isEmpty() && (m_bFirstPara || m_bFirstParaOfPage)) { @@ -3573,7 +3573,7 @@ bool SwWW8ImplReader::HandlePageBreakChar() bParaEndAdded = true; if (0 >= m_pPaM->GetPoint()->GetContentIndex()) { - if (SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode()) + if (SwTextNode* pTextNode = m_pPaM->GetPointNode().GetTextNode()) { pTextNode->SetAttr( *GetDfltAttr(RES_PARATR_NUMRULE)); @@ -3862,20 +3862,20 @@ tools::Long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTextPos, tools::Long nTextEnd tools::Long nSkipChars = 0; WW8PLCFManResult aRes; - OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetPointNode().GetTextNode(), "Missing txtnode"); bool bStartAttr = m_xPlcxMan->Get(&aRes); // Get Attribute position again aRes.nCurrentCp = rTextPos; // Current Cp position bool bNewSection = (aRes.nFlags & MAN_MASK_NEW_SEP) && !m_bIgnoreText; if ( bNewSection ) // New Section { - OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetPointNode().GetTextNode(), "Missing txtnode"); // Create PageDesc and fill it m_aSectionManager.CreateSep(rTextPos); // -> 0xc was a Sectionbreak, but not a Pagebreak; // Create PageDesc and fill it m_bPgSecBreak = false; - OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetPointNode().GetTextNode(), "Missing txtnode"); } // New paragraph over Plcx.Fkp.papx @@ -4068,7 +4068,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) while (l < nTextEnd) { ReadAttrs( l, nNext, nTextEnd, bStartLine );// Takes SectionBreaks into account, too - OSL_ENSURE(m_pPaM->GetNode().GetTextNode(), "Missing txtnode"); + OSL_ENSURE(m_pPaM->GetPointNode().GetTextNode(), "Missing txtnode"); if (m_pPostProcessAttrsInfo != nullptr) PostProcessAttrs(); @@ -4103,7 +4103,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) if (SwTextNode* pPreviousNode = (bStartLine && m_xPreviousNode) ? m_xPreviousNode->GetTextNode() : nullptr) { - SwTextNode* pEndNd = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pEndNd = m_pPaM->GetPointNode().GetTextNode(); SAL_WARN_IF(!pEndNd, "sw.ww8", "didn't find textnode for dropcap"); if (pEndNd) { @@ -4140,7 +4140,7 @@ bool SwWW8ImplReader::ReadText(WW8_CP nStartCp, WW8_CP nTextLen, ManTypes nType) else if (m_bDropCap) { // If we have found a dropcap store the textnode - m_xPreviousNode.reset(new TextNodeListener(m_pPaM->GetNode().GetTextNode())); + m_xPreviousNode.reset(new TextNodeListener(m_pPaM->GetPointNode().GetTextNode())); SprmResult aDCS; if (m_bVer67) diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 9bdd867ad9eb..89338e5d0a67 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -188,7 +188,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote() //Get the footnote character and remove it from the txtnode. We'll //replace it with the footnote - SwTextNode* pText = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pText = m_pPaM->GetPointNode().GetTextNode(); sal_Int32 nPos = m_pPaM->GetPoint()->GetContentIndex(); OUString sChar; @@ -1039,7 +1039,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13) else m_nSwNumLevel = 0xff; // no number - SwTextNode* pNd = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pNd = m_pPaM->GetPointNode().GetTextNode(); if (!pNd) return; @@ -2648,13 +2648,13 @@ void WW8TabDesc::MergeCells() { SwPaM aPam( *m_pTabBox->GetSttNd(), 0 ); aPam.GetPoint()->nNode++; - SwTextNode* pNd = aPam.GetNode().GetTextNode(); + SwTextNode* pNd = aPam.GetPointNode().GetTextNode(); while( pNd ) { pNd->SetCountedInList( false ); aPam.GetPoint()->nNode++; - pNd = aPam.GetNode().GetTextNode(); + pNd = aPam.GetPointNode().GetTextNode(); } } @@ -2740,7 +2740,7 @@ void WW8TabDesc::ParkPaM() { m_pIo->m_pPaM->GetPoint()->nNode = nSttNd; } - while (m_pIo->m_pPaM->GetNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); + while (m_pIo->m_pPaM->GetPointNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); m_pIo->m_rDoc.SetTextFormatColl(*m_pIo->m_pPaM, const_cast(m_pIo->m_pDfltTextFormatColl)); @@ -2983,7 +2983,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) { m_pIo->m_pPaM->GetPoint()->nNode = nSttNd; } - while (m_pIo->m_pPaM->GetNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); + while (m_pIo->m_pPaM->GetPointNode().GetNodeType() != SwNodeType::Text && ++nSttNd < nEndNd); m_pIo->m_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); // Precautionally set now, otherwise the style is not set for cells // that are inserted for margin balancing. @@ -2993,7 +2993,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) } // Better to turn Snap to Grid off for all paragraphs in tables - SwTextNode *pNd = m_pIo->m_pPaM->GetNode().GetTextNode(); + SwTextNode *pNd = m_pIo->m_pPaM->GetPointNode().GetTextNode(); if(!pNd) return; diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index ee821eb75d11..d4081a4d055f 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -1665,7 +1665,7 @@ bool SwWW8ImplReader::SetTextFormatCollAndListLevel(const SwPaM& rRg, if( rStyleInfo.m_pFormat && rStyleInfo.m_bColl ) { bRes = m_rDoc.SetTextFormatColl(rRg, static_cast(rStyleInfo.m_pFormat)); - SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPaM->GetPointNode().GetTextNode(); OSL_ENSURE( pTextNode, "No Text-Node at PaM-Position" ); if ( !pTextNode ) { @@ -1809,7 +1809,7 @@ void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nCurrentLFO, if (!m_xLstManager) // are all list declarations read? return; - SwTextNode* pTextNd = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pTextNd = m_pPaM->GetPointNode().GetTextNode(); OSL_ENSURE(pTextNd, "No Text-Node at PaM-Position"); if (!pTextNd) return; @@ -2010,7 +2010,7 @@ void SwWW8ImplReader::Read_LFOPosition(sal_uInt16, const sal_uInt8* pData, // So instead use USHRT_MAX-1 for indicating an explicit "cancel numbering". RegisterNumFormat(USHRT_MAX-1, MAXLEVEL); } - else if (SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode()) + else if (SwTextNode* pTextNode = m_pPaM->GetPointNode().GetTextNode()) { // here a paragraph is being directly formatted diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 508cae886c1f..4447d124f267 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2584,7 +2584,7 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt //we have inserted a section before this point, so adjust pos //for future page/section segment insertion - m_aSectionManager.PrependedInlineNode(aTmpPos, m_pPaM->GetNode()); + m_aSectionManager.PrependedInlineNode(aTmpPos, m_pPaM->GetPointNode()); return eF_ResT::TEXT; } @@ -3500,7 +3500,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, OUString& rStr ) // inserting a toc inserts a section before this point, so adjust pos // for future page/section segment insertion - m_aSectionManager.PrependedInlineNode( *m_oPosAfterTOC->GetPoint(), aRegion.GetNode() ); + m_aSectionManager.PrependedInlineNode( *m_oPosAfterTOC->GetPoint(), aRegion.GetPointNode() ); } // Set end in stack diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index dabeae478f5c..26e4d1d9419c 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2497,7 +2497,7 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo, const WW8_TablePos *p { // ofz#34749 we shouldn't anchor anything into an 'extra' paragraph scheduled for // removal at end of import, but check if that scenario is happening - m_aExtraneousParas.remove_if_present(m_pPaM->GetNode().GetTextNode()); + m_aExtraneousParas.remove_if_present(m_pPaM->GetPointNode().GetTextNode()); m_xSFlyPara->SetFlyFormat(m_rDoc.MakeFlySection(WW8SwFlyPara::eAnchor, m_pPaM->GetPoint(), &aFlySet)); OSL_ENSURE(m_xSFlyPara->GetFlyFormat()->GetAnchor().GetAnchorId() == @@ -4229,7 +4229,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe // for list levels of mode LABEL_ALIGNMENT.(see ww8par3.cxx // W8ImplReader::RegisterNumFormatOnTextNode). // Need to apply the list format to the paragraph here. - SwTextNode* pTextNode = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pTextNode = m_pPaM->GetPointNode().GetTextNode(); if( pTextNode && pTextNode->AreListLevelIndentsApplicable() ) { SwNumRule * pNumRule = pTextNode->GetNumRule(); @@ -4319,7 +4319,7 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe if (!m_pCurrentColl) { - if (const SwTextNode* pNode = m_pPaM->GetNode().GetTextNode()) + if (const SwTextNode* pNode = m_pPaM->GetPointNode().GetTextNode()) { if ( const SwNumFormat *pNumFormat = GetNumFormatFromTextNode(*pNode) ) { @@ -4543,7 +4543,7 @@ void SwWW8ImplReader::Read_LineBreakClear(sal_uInt16 /*nId*/, const sal_uInt8* p { if (nLen == -1 && m_oLineBreakClear.has_value()) { - SwTextNode* pText = m_pPaM->GetNode().GetTextNode(); + SwTextNode* pText = m_pPaM->GetPointNode().GetTextNode(); sal_Int32 nPos = m_pPaM->GetPoint()->GetContentIndex(); if (!pText || !nPos) { diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 625d491785fd..9f61af14ec0d 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -2681,7 +2681,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection( if( m_bFirstSection ) { // The Cursor already is in the first section - pStNd = pTextCursor->GetPaM()->GetNode().FindTableBoxStartNode(); + pStNd = pTextCursor->GetPaM()->GetPointNode().FindTableBoxStartNode(); m_bFirstSection = false; GetImport().GetTextImport()->SetStyleAndAttrs( GetImport(), GetImport().GetTextImport()->GetCursor(), "Standard", true ); diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index ccd318a39828..b9a8430deedc 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1135,7 +1135,7 @@ IMPL_LINK( SwDocShell, Ole2ModifiedHdl, bool, bNewStatus, void ) SwOLENode* pOLENode = nullptr; if (!m_pWrtShell->IsTableMode()) { - pOLENode = m_pWrtShell->GetCursor()->GetNode().GetOLENode(); + pOLENode = m_pWrtShell->GetCursor()->GetPointNode().GetOLENode(); } if (pOLENode) { diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx index 0ea70eede278..08b99101eee6 100644 --- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx +++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx @@ -531,8 +531,8 @@ void SwSpellDialogChildWindow::GetFocus() case ShellMode::TableListText: { SwPaM* pCursor = pWrtShell->GetCursor(); - if(m_pSpellState->m_pPointNode != &pCursor->GetNode() || - m_pSpellState->m_pMarkNode != &pCursor->GetNode(false)|| + if(m_pSpellState->m_pPointNode != &pCursor->GetPointNode() || + m_pSpellState->m_pMarkNode != &pCursor->GetMarkNode()|| m_pSpellState->m_nPointPos != pCursor->GetPoint()->GetContentIndex()|| m_pSpellState->m_nMarkPos != pCursor->GetMark()->GetContentIndex()) bInvalidate = true; @@ -588,8 +588,8 @@ void SwSpellDialogChildWindow::LoseFocus() { // store a node pointer and a pam-position to be able to check on next GetFocus(); SwPaM* pCursor = pWrtShell->GetCursor(); - m_pSpellState->m_pPointNode = &pCursor->GetNode(); - m_pSpellState->m_pMarkNode = &pCursor->GetNode(false); + m_pSpellState->m_pPointNode = &pCursor->GetPointNode(); + m_pSpellState->m_pMarkNode = &pCursor->GetMarkNode(); m_pSpellState->m_nPointPos = pCursor->GetPoint()->GetContentIndex(); m_pSpellState->m_nMarkPos = pCursor->GetMark()->GetContentIndex(); diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 79aacea45325..6f25dd4bde44 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1340,7 +1340,7 @@ SwPasteContext::~SwPasteContext() // Restore point. ++m_oPaM->GetPoint()->nNode; - SwNode& rNode = m_oPaM->GetNode(); + SwNode& rNode = m_oPaM->GetPointNode(); if (!rNode.IsTextNode()) // Starting point is no longer text. return; @@ -1521,7 +1521,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt // convert the worksheet to a temporary native table using HTML format, and copy that into the original native table if (!bSingleCellTable && rData.HasFormat( SotClipboardFormatId::HTML ) && - SwDoc::IsInTable(rSh.GetCursor()->GetNode()) != nullptr && rSh.DoesUndo()) + SwDoc::IsInTable(rSh.GetCursor()->GetPointNode()) != nullptr && rSh.DoesUndo()) { SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher(); sal_uInt32 nLevel = 0; @@ -1534,13 +1534,13 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt pDispatch->Execute(FN_INSERT_NNBSP, SfxCallMode::SYNCHRON); pDispatch->Execute(FN_TABLE_DELETE_TABLE, SfxCallMode::SYNCHRON); nLevel++; - } while (SwDoc::IsInTable(rSh.GetCursor()->GetNode()) != nullptr); + } while (SwDoc::IsInTable(rSh.GetCursor()->GetPointNode()) != nullptr); if ( SwTransferable::PasteData( rData, rSh, EXCHG_OUT_ACTION_INSERT_STRING, nActionFlags, SotClipboardFormatId::HTML, nDestination, false, false, nullptr, 0, false, nAnchorType, bIgnoreComments, &aPasteContext, ePasteTable) ) { bool bFoundTemporaryTable = false; pDispatch->Execute(FN_LINE_UP, SfxCallMode::SYNCHRON); - if (SwDoc::IsInTable(rSh.GetCursor()->GetNode()) != nullptr) + if (SwDoc::IsInTable(rSh.GetCursor()->GetPointNode()) != nullptr) { bFoundTemporaryTable = true; pDispatch->Execute(FN_TABLE_SELECT_ALL, SfxCallMode::SYNCHRON); @@ -1570,7 +1570,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt // insert clipboard content as new table rows/columns before the actual row/column instead of overwriting it else if ( (rSh.GetTableInsertMode() != SwTable::SEARCH_NONE || ePasteTable == PasteTableType::PASTE_ROW || ePasteTable == PasteTableType::PASTE_COLUMN) && rData.HasFormat( SotClipboardFormatId::HTML ) && - SwDoc::IsInTable(rSh.GetCursor()->GetNode()) != nullptr ) + SwDoc::IsInTable(rSh.GetCursor()->GetPointNode()) != nullptr ) { OUString aExpand; sal_Int32 nIdx; @@ -1603,7 +1603,7 @@ bool SwTransferable::Paste(SwWrtShell& rSh, TransferableDataHelper& rData, RndSt // are we at the beginning of the cell? bool bStartTableBoxNode = // first paragraph of the cell? - rSh.GetCursor()->GetNode().GetIndex() == rSh.GetCursor()->GetNode().FindTableBoxStartNode()->GetIndex()+1 && + rSh.GetCursor()->GetPointNode().GetIndex() == rSh.GetCursor()->GetPointNode().FindTableBoxStartNode()->GetIndex()+1 && // beginning of the paragraph? !rSh.GetCursor()->GetPoint()->GetContentIndex(); SfxDispatcher* pDispatch = rSh.GetView().GetViewFrame()->GetDispatcher(); @@ -3970,7 +3970,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, : pTableNd->GetTable().GetTabLines().GetPos( rBoxes.back()->GetUpper() ) - pTableNd->GetTable().GetTabLines().GetPos( rBoxes.front()->GetUpper() ) + 1; bool bSelUpToDown = rBoxes.back() && rBoxes.back()->GetUpper() == - rSh.GetCursor()->GetNode().GetTableBox()->GetUpper(); + rSh.GetCursor()->GetPointNode().GetTableBox()->GetUpper(); SwUndoId eUndoId = bMove ? SwUndoId::UI_DRAG_AND_MOVE : SwUndoId::UI_DRAG_AND_COPY; @@ -3992,7 +3992,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, rSh.EnterStdMode(); rSh.SwCursorShell::SetCursor(rDragPt, false); - bool bPasteIntoTable = rSh.GetCursor()->GetNode().GetTableBox() != nullptr; + bool bPasteIntoTable = rSh.GetCursor()->GetPointNode().GetTableBox() != nullptr; // store cursor ::sw::mark::IMark* pMark = rSh.SetBookmark( @@ -4022,7 +4022,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, } else { - const SwTableBox* pBoxStt = rSh.GetCursor()->GetNode().GetTableBox(); + const SwTableBox* pBoxStt = rSh.GetCursor()->GetPointNode().GetTableBox(); SwTableLine* pLine = pBoxStt ? const_cast( pBoxStt->GetUpper()): nullptr; for (sal_Int32 nDeleted = 0; bNeedTrack && nDeleted < nSelRows;) @@ -4031,7 +4031,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, if ( !rSh.Up(false) ) break; - const SwTableBox* pBox = rSh.GetCursor()->GetNode().GetTableBox(); + const SwTableBox* pBox = rSh.GetCursor()->GetPointNode().GetTableBox(); if ( !pBox ) break; @@ -4066,7 +4066,7 @@ bool SwTransferable::PrivateDrop( SwWrtShell& rSh, const Point& rDragPt, for (sal_Int32 nDeleted = 0; nDeleted < nSelRows - int(!bNeedTrack);) { - const SwTableBox* pBox = rSh.GetCursor()->GetNode().GetTableBox(); + const SwTableBox* pBox = rSh.GetCursor()->GetPointNode().GetTableBox(); if ( !pBox ) break; diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index c1f1b1ca22d8..4a365d33af11 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -208,7 +208,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) // is an outline node with folded content. if (rSh.IsEndPara()) { - SwNodeIndex aIdx(rSh.GetCursor()->GetNode()); + SwNodeIndex aIdx(rSh.GetCursor()->GetPointNode()); if (aIdx.GetNode().IsTextNode()) { bool bVisible = true; @@ -237,7 +237,7 @@ void SwBaseShell::ExecDelete(SfxRequest &rReq) // node is a content node without a layout frame. if (rSh.IsSttPara()) { - SwNodeIndex aIdx(rSh.GetCursor()->GetNode()); + SwNodeIndex aIdx(rSh.GetCursor()->GetPointNode()); if (aIdx.GetNode().IsTextNode()) { bool bVisible = true; diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx index 9900952c9d46..097a8b0d8408 100644 --- a/sw/source/uibase/shells/langhelper.cxx +++ b/sw/source/uibase/shells/langhelper.cxx @@ -515,7 +515,7 @@ namespace SwLangHelper // string for guessing language OUString aText; SwPaM *pCursor = rSh.GetCursor(); - SwTextNode *pNode = pCursor->GetNode().GetTextNode(); + SwTextNode *pNode = pCursor->GetPointNode().GetTextNode(); if (pNode) { aText = pNode->GetText(); diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx index 204646a5f13d..9a9182f40978 100644 --- a/sw/source/uibase/shells/tabsh.cxx +++ b/sw/source/uibase/shells/tabsh.cxx @@ -455,7 +455,7 @@ static bool lcl_BoxesInDeletedRows(SwWrtShell &rSh, const SwSelBoxes& rBoxes) bool bRet = true; SwRedlineTable::size_type nRedlinePos = 0; if ( rBoxes.empty() ) - bRet = rSh.GetCursor()->GetNode().GetTableBox()->GetUpper()->IsDeleted(nRedlinePos); + bRet = rSh.GetCursor()->GetPointNode().GetTableBox()->GetUpper()->IsDeleted(nRedlinePos); else { tools::Long nBoxes = rBoxes.size(); diff --git a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx index 913703366451..d7772596df70 100644 --- a/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx +++ b/sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx @@ -74,7 +74,7 @@ WriterInspectorTextPanel::WriterInspectorTextPanel(weld::Widget* pParent) // Update panel on start std::vector aStore; - if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) + if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetPointNode().GetTextNode()) UpdateTree(pDocSh, aStore, m_nParIdx); updateEntries(aStore, m_nParIdx); } @@ -735,7 +735,7 @@ IMPL_LINK(WriterInspectorTextPanel, AttrChangedNotify, LinkParamNone*, pLink, vo SwDocShell* pDocSh = m_pShell->GetDoc()->GetDocShell(); std::vector aStore; - if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetNode().GetTextNode()) + if (pDocSh && pDocSh->GetDoc()->GetEditShell()->GetCursor()->GetPointNode().GetTextNode()) UpdateTree(pDocSh, aStore, m_nParIdx); updateEntries(aStore, m_nParIdx); diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx index b8c7fc7b7a46..ea7093516e69 100644 --- a/sw/source/uibase/uiview/swcli.cxx +++ b/sw/source/uibase/uiview/swcli.cxx @@ -181,7 +181,7 @@ bool SwOleClient::IsProtected() const return false; } - SwOLENode* pOLENode = rWrtSh.GetCursor()->GetNode().GetOLENode(); + SwOLENode* pOLENode = rWrtSh.GetCursor()->GetPointNode().GetOLENode(); if (!pOLENode) { return false; diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index b8152b7ce248..87165dff6599 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -784,7 +784,7 @@ SwUnoCursor* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > pUnoCursor->DeleteMark(); } } - const SwNode& rRangeNode = pUnoCursor->GetNode(); + const SwNode& rRangeNode = pUnoCursor->GetPointNode(); bParentInExtra = rRangeNode.FindFlyStartNode() || rRangeNode.FindFootnoteStartNode() || rRangeNode.FindHeaderStartNode() || diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx index 7c9acfe5a65f..764479851d18 100644 --- a/sw/source/uibase/uno/unotxvw.cxx +++ b/sw/source/uibase/uno/unotxvw.cxx @@ -1076,20 +1076,20 @@ void SwXTextViewCursor::gotoRange( else if(nFrameType & FrameTypeFlags::FOOTNOTE) eSearchNodeType = SwFootnoteStartNode; - const SwStartNode* pOwnStartNode = aOwnPaM.GetNode(). + const SwStartNode* pOwnStartNode = aOwnPaM.GetPointNode(). FindSttNodeByType(eSearchNodeType); const SwNode* pSrcNode = nullptr; if(pCursor && pCursor->GetPaM()) { - pSrcNode = &pCursor->GetPaM()->GetNode(); + pSrcNode = &pCursor->GetPaM()->GetPointNode(); } else if (pRange) { SwPaM aPam(pRange->GetDoc().GetNodes()); if (pRange->GetPositions(aPam)) { - pSrcNode = &aPam.GetNode(); + pSrcNode = &aPam.GetPointNode(); } } else if (pPara && pPara->GetTextNode()) @@ -1458,7 +1458,7 @@ void SwXTextViewCursor::setPropertyValue( const OUString& rPropertyName, const SwWrtShell& rSh = m_pView->GetWrtShell(); SwPaM* pShellCursor = rSh.GetCursor(); - SwNode& rNode = pShellCursor->GetNode(); + SwNode& rNode = pShellCursor->GetPointNode(); if (!rNode.IsTextNode()) throw RuntimeException(); diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index dc5ce4b0865e..12a2f35b583a 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -199,7 +199,7 @@ bool SwWrtShell::DelLeft() // #i4032# Don't actually call a 'delete' if we // changed the table cell, compare DelRight(). const SwStartNode * pSNdOld = pWasInTableNd ? - GetCursor()->GetNode().FindTableBoxStartNode() : + GetCursor()->GetPointNode().FindTableBoxStartNode() : nullptr; // If the cursor is at the beginning of a paragraph, try to step @@ -215,7 +215,7 @@ bool SwWrtShell::DelLeft() if (bDoSomething) { const SwStartNode* pSNdNew = pIsInTableNd ? - GetCursor()->GetNode().FindTableBoxStartNode() : + GetCursor()->GetPointNode().FindTableBoxStartNode() : nullptr; // #i4032# Don't actually call a 'delete' if we @@ -344,7 +344,7 @@ bool SwWrtShell::DelRight(bool const isReplaceHeuristic) const SwTableNode* pWasInTableNd = IsCursorInTable(); // #108049# Save the startnode of the current cell const SwStartNode* pSNdOld = pWasInTableNd ? - GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; + GetCursor()->GetPointNode().FindTableBoxStartNode() : nullptr; bool bCheckDelFull = SelectionType::Text & nSelection && SwCursorShell::IsSttPara(); bool bDelFull = false; bool bDoNothing = false; @@ -365,7 +365,7 @@ bool SwWrtShell::DelRight(bool const isReplaceHeuristic) // #108049# Save the startnode of the current cell. // May be different to pSNdOld as we have moved. const SwStartNode* pSNdNew = pCurrTableNd ? - GetCursor()->GetNode().FindTableBoxStartNode() : nullptr; + GetCursor()->GetPointNode().FindTableBoxStartNode() : nullptr; // tdf#115132 Only keep cursor position instead of deleting // if we have moved to a different cell diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index e13d09a700c5..d2b02f64478c 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -141,7 +141,7 @@ static bool lcl_IsAllowed(const SwWrtShell* rSh) { if (rSh->GetViewOptions()->IsShowOutlineContentVisibilityButton() && rSh->IsEndPara()) { - SwTextNode* pTextNode = rSh->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = rSh->GetCursor()->GetPointNode().GetTextNode(); if (pTextNode && pTextNode->IsOutline()) { // disallow if this is an outline node having folded content @@ -1175,7 +1175,7 @@ void SwWrtShell::InsertFootnote(const OUString &rStr, bool bEndNote, bool bEdit // tdf#141634 static bool lcl_FoldedOutlineNodeEndOfParaSplit(SwWrtShell *pThis) { - SwTextNode* pTextNode = pThis->GetCursor()->GetNode().GetTextNode(); + SwTextNode* pTextNode = pThis->GetCursor()->GetPointNode().GetTextNode(); if (pTextNode && pTextNode->IsOutline()) { bool bVisible = true; -- cgit