From edc5240a96f003b9aec8f8d2ce92db39ad603fd7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 10 Aug 2022 13:43:56 +0200 Subject: rename SwPaM::GetContentNode to GetPointContentNode/GetMarkContentNode Using a parameter to select point/mark makes the code much harder to read Change-Id: Ic24098a6045ff2262d4c808228ded7bf8206fe8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138085 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/inc/pam.hxx | 6 ++--- sw/inc/unocrsrhelper.hxx | 4 ++-- sw/qa/core/uwriter.cxx | 18 +++++++-------- sw/qa/extras/uiwriter/uiwriter.cxx | 4 ++-- sw/qa/extras/uiwriter/uiwriter2.cxx | 12 +++++----- sw/qa/extras/uiwriter/uiwriter4.cxx | 4 ++-- sw/source/core/crsr/callnk.cxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 28 +++++++++++------------ sw/source/core/crsr/crstrvl.cxx | 4 ++-- sw/source/core/crsr/findattr.cxx | 10 ++++----- sw/source/core/crsr/findfmt.cxx | 2 +- sw/source/core/crsr/findtxt.cxx | 4 ++-- sw/source/core/crsr/pam.cxx | 2 +- sw/source/core/crsr/swcrsr.cxx | 38 ++++++++++++++++---------------- sw/source/core/crsr/trvltbl.cxx | 2 +- sw/source/core/doc/docbm.cxx | 4 ++-- sw/source/core/doc/doccomp.cxx | 6 ++--- sw/source/core/doc/docglos.cxx | 2 +- sw/source/core/doc/docredln.cxx | 8 +++---- sw/source/core/doc/docsort.cxx | 4 ++-- sw/source/core/docnode/ndtbl.cxx | 2 +- sw/source/core/docnode/ndtbl1.cxx | 14 ++++++------ sw/source/core/edit/acorrect.cxx | 2 +- sw/source/core/edit/eddel.cxx | 4 ++-- sw/source/core/edit/edfcol.cxx | 2 +- sw/source/core/edit/edfmt.cxx | 2 +- sw/source/core/edit/edglss.cxx | 6 ++--- sw/source/core/edit/edlingu.cxx | 2 +- sw/source/core/edit/edtab.cxx | 2 +- sw/source/core/frmedt/fecopy.cxx | 2 +- sw/source/core/frmedt/fedesc.cxx | 4 ++-- sw/source/core/frmedt/fefly1.cxx | 2 +- sw/source/core/frmedt/fews.cxx | 4 ++-- sw/source/core/frmedt/tblsel.cxx | 26 +++++++++++----------- sw/source/core/layout/layact.cxx | 2 +- sw/source/core/layout/trvlfrm.cxx | 6 ++--- sw/source/core/table/swnewtable.cxx | 2 +- sw/source/core/undo/undobj.cxx | 6 ++--- sw/source/core/undo/unins.cxx | 8 +++---- sw/source/core/undo/unredln.cxx | 10 ++++----- sw/source/core/undo/untbl.cxx | 2 +- sw/source/core/undo/untblk.cxx | 2 +- sw/source/core/unocore/unocrsr.cxx | 8 +++---- sw/source/core/unocore/unocrsrhelper.cxx | 6 ++--- sw/source/core/unocore/unoobj.cxx | 12 +++++----- sw/source/core/unocore/unoparagraph.cxx | 2 +- sw/source/core/unocore/unoportenum.cxx | 2 +- sw/source/core/view/vprint.cxx | 8 +++++-- sw/source/filter/basflt/shellio.cxx | 2 +- sw/source/filter/html/htmlgrin.cxx | 2 +- sw/source/filter/html/swhtml.cxx | 6 ++--- sw/source/filter/ww8/wrtw8sty.cxx | 2 +- sw/source/filter/ww8/ww8par.cxx | 12 +++++----- sw/source/filter/ww8/ww8par2.cxx | 8 +++---- sw/source/filter/xml/swxml.cxx | 10 ++++----- sw/source/filter/xml/xmlimp.cxx | 2 +- sw/source/uibase/docvw/edtwin.cxx | 4 ++-- sw/source/uibase/uiview/viewling.cxx | 4 ++-- sw/source/uibase/uno/unotxdoc.cxx | 2 +- 59 files changed, 185 insertions(+), 183 deletions(-) diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index d5d6c74e7031..90b6b8d00e71 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -280,10 +280,8 @@ public: SwNode& GetMarkNode() const { return m_pMark->nNode.GetNode(); } /// @return current ContentNode at Point/Mark - SwContentNode* GetContentNode( bool bPoint = true ) const - { - return (bPoint ? m_pPoint->nNode : m_pMark->nNode).GetNode().GetContentNode(); - } + SwContentNode* GetPointContentNode() const { return m_pPoint->nNode.GetNode().GetContentNode(); } + SwContentNode* GetMarkContentNode() const { return m_pMark->nNode.GetNode().GetContentNode(); } /** Normalizes PaM, i.e. sort point and mark. diff --git a/sw/inc/unocrsrhelper.hxx b/sw/inc/unocrsrhelper.hxx index dd9e44b21d96..014421371ba0 100644 --- a/sw/inc/unocrsrhelper.hxx +++ b/sw/inc/unocrsrhelper.hxx @@ -88,8 +88,8 @@ namespace SwUnoCursorHelper inline bool IsStartOfPara(SwPaM& rUnoCursor) { return rUnoCursor.GetPoint()->nContent == 0;} inline bool IsEndOfPara(SwPaM& rUnoCursor) - { return rUnoCursor.GetContentNode() && - rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len();} + { return rUnoCursor.GetPointContentNode() && + rUnoCursor.GetPoint()->nContent == rUnoCursor.GetPointContentNode()->Len();} void resetCursorPropertyValue(const SfxItemPropertyMapEntry& rEntry, SwPaM& rPam); /// @throws css::lang::IllegalArgumentException diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 45e35a636716..eed900880005 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -312,10 +312,10 @@ static SwTextNode* getModelToViewTestDocument(SwDoc *pDoc) CPPUNIT_ASSERT_EQUAL(static_cast((4*5) + 5 + 2), pTextNode->GetText().getLength()); //set start of selection to first B - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 6); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 6); aPaM.SetMark(); //set end of selection to last C - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 14); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 14); //set character attribute hidden on range SvxCharHiddenItem aHidden(true, RES_CHRATR_HIDDEN); pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, aHidden ); @@ -327,10 +327,10 @@ static SwTextNode* getModelToViewTestDocument(SwDoc *pDoc) CPPUNIT_ASSERT_MESSAGE("redlines should be visible", IDocumentRedlineAccess::IsShowChanges(pDoc->getIDocumentRedlineAccess().GetRedlineFlags())); //set start of selection to last A - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 4); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 4); aPaM.SetMark(); //set end of selection to second last B - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 9); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 9); pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api aPaM.DeleteMark(); @@ -759,7 +759,7 @@ void SwDocTest::testSwScanner() //delete everything except the first word aPaM.SetMark(); //set start of selection to current pos - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 5); //set end of selection to fifth char of current node + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 5); //set end of selection to fifth char of current node m_pDoc->getIDocumentContentOperations().DeleteAndJoin(aPaM); //redline-aware deletion api //"real underlying text should be the same" CPPUNIT_ASSERT_EQUAL(pTextNode->GetText(), OUString(aString)); @@ -806,7 +806,7 @@ void SwDocTest::testSwScanner() // redline *added* text though m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(RedlineFlags::On | RedlineFlags::ShowDelete|RedlineFlags::ShowInsert); aPaM.DeleteMark(); - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), 0); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), 0); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "redline-new-text "); aDocStat.Reset(); pTextNode = aPaM.GetPointNode().GetTextNode(); @@ -977,7 +977,7 @@ void SwDocTest::testGraphicAnchorDeletion() m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Paragraph 3"); aPaM.GetPoint()->nNode = nPara2; - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>")); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>>")); //Insert a graphic at X of >>X<< in paragraph 2 SfxItemSet aFlySet(m_pDoc->GetAttrPool(), svl::Items); @@ -991,11 +991,11 @@ void SwDocTest::testGraphicAnchorDeletion() //Delete >X< aPaM.GetPoint()->nNode = nPara2; - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>><")+1); aPaM.SetMark(); aPaM.GetPoint()->nNode = nPara2; - aPaM.GetPoint()->nContent.Assign(aPaM.GetContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>")); + aPaM.GetPoint()->nContent.Assign(aPaM.GetPointContentNode(), RTL_CONSTASCII_LENGTH("graphic anchor>")); m_pDoc->getIDocumentContentOperations().DeleteRange(aPaM); #ifdef DEBUG_AS_HTML diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index d1dc0564daa2..c69c88227f2f 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -67,9 +67,9 @@ constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/"; void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end) { - rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first); + rPaM.GetPoint()->nContent.Assign(rPaM.GetPointContentNode(), first); rPaM.SetMark(); - rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end); + rPaM.GetPoint()->nContent.Assign(rPaM.GetPointContentNode(), end); } } //namespace diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx index 8be6eb520413..89d5c0c9ff9f 100644 --- a/sw/qa/extras/uiwriter/uiwriter2.cxx +++ b/sw/qa/extras/uiwriter/uiwriter2.cxx @@ -825,8 +825,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) CPPUNIT_ASSERT_EQUAL(size_t(1), pDoc->GetFlyCount(FLYCNTTYPE_FRM)); pCursor->SetMark(); - pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0); - pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3); + pCursor->GetMark()->nContent.Assign(pCursor->GetPointContentNode(), 0); + pCursor->GetPoint()->nContent.Assign(pCursor->GetPointContentNode(), 3); // replace with more text pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "blahblah", false); @@ -846,8 +846,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) rUndoManager.Undo(); - pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0); - pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3); + pCursor->GetMark()->nContent.Assign(pCursor->GetPointContentNode(), 0); + pCursor->GetPoint()->nContent.Assign(pCursor->GetPointContentNode(), 3); // replace with less text pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "x", false); @@ -867,8 +867,8 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testTdf131912) rUndoManager.Undo(); - pCursor->GetMark()->nContent.Assign(pCursor->GetContentNode(), 0); - pCursor->GetPoint()->nContent.Assign(pCursor->GetContentNode(), 3); + pCursor->GetMark()->nContent.Assign(pCursor->GetPointContentNode(), 0); + pCursor->GetPoint()->nContent.Assign(pCursor->GetPointContentNode(), 3); // regex replace with paragraph breaks pDoc->getIDocumentContentOperations().ReplaceRange(*pCursor, "xyz\\n\\nquux\\n", true); diff --git a/sw/qa/extras/uiwriter/uiwriter4.cxx b/sw/qa/extras/uiwriter/uiwriter4.cxx index acfea225418f..b37c18b672f5 100644 --- a/sw/qa/extras/uiwriter/uiwriter4.cxx +++ b/sw/qa/extras/uiwriter/uiwriter4.cxx @@ -56,9 +56,9 @@ constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/uiwriter/data/"; void lcl_selectCharacters(SwPaM& rPaM, sal_Int32 first, sal_Int32 end) { - rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), first); + rPaM.GetPoint()->nContent.Assign(rPaM.GetPointContentNode(), first); rPaM.SetMark(); - rPaM.GetPoint()->nContent.Assign(rPaM.GetContentNode(), end); + rPaM.GetPoint()->nContent.Assign(rPaM.GetPointContentNode(), end); } } //namespace diff --git a/sw/source/core/crsr/callnk.cxx b/sw/source/core/crsr/callnk.cxx index 74278a6a0dd8..9ae4e14e856a 100644 --- a/sw/source/core/crsr/callnk.cxx +++ b/sw/source/core/crsr/callnk.cxx @@ -114,7 +114,7 @@ void SwCallLink::ImplDestroy() // If travelling over Nodes check formats and register them anew at the // new Node. SwPaM* pCurrentCursor = m_rShell.IsTableMode() ? m_rShell.GetTableCrs() : m_rShell.GetCursor(); - SwContentNode * pCNd = pCurrentCursor->GetContentNode(); + SwContentNode * pCNd = pCurrentCursor->GetPointContentNode(); if( !pCNd ) return; diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 7bd31be3fcdb..013f65bf6e5b 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -200,10 +200,10 @@ SwCursor* SwCursorShell::GetCursor( bool bMakeTableCursor ) const if( m_pTableCursor->GetPoint()->GetNodeIndex() && m_pTableCursor->GetMark()->GetNodeIndex() ) { - const SwContentNode* pCNd = m_pTableCursor->GetContentNode(); + const SwContentNode* pCNd = m_pTableCursor->GetPointContentNode(); if( pCNd && pCNd->getLayoutFrame( GetLayout() ) ) { - pCNd = m_pTableCursor->GetContentNode(false); + pCNd = m_pTableCursor->GetMarkContentNode(); if( pCNd && pCNd->getLayoutFrame( GetLayout() ) ) { SwShellTableCursor* pTC = m_pTableCursor; @@ -643,7 +643,7 @@ bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage ) SwCursorSaveState aSaveState( *m_pCurrentCursor ); Point& rPt = m_pCurrentCursor->GetPtPos(); std::pair tmp(rPt, false); - SwContentFrame * pFrame = m_pCurrentCursor->GetContentNode()-> + SwContentFrame * pFrame = m_pCurrentCursor->GetPointContentNode()-> getLayoutFrame(GetLayout(), m_pCurrentCursor->GetPoint(), &tmp); if( pFrame && GetFrameInPage( pFrame, fnWhichPage, fnPosPage, m_pCurrentCursor ) && !m_pCurrentCursor->IsSelOvr( SwCursorSelOverFlags::Toggle | @@ -658,7 +658,7 @@ bool SwCursorShell::MovePage( SwWhichPage fnWhichPage, SwPosPage fnPosPage ) bool SwCursorShell::isInHiddenTextFrame(SwShellCursor* pShellCursor) { - SwContentNode *pCNode = pShellCursor->GetContentNode(); + SwContentNode *pCNode = pShellCursor->GetPointContentNode(); std::pair tmp(pShellCursor->GetPtPos(), false); SwContentFrame *const pFrame = pCNode ? pCNode->getLayoutFrame(GetLayout(), pShellCursor->GetPoint(), &tmp) @@ -670,7 +670,7 @@ bool SwCursorShell::isInHiddenTextFrame(SwShellCursor* pShellCursor) static bool IsAtStartOrEndOfFrame(SwCursorShell const*const pShell, SwShellCursor const*const pShellCursor, SwMoveFnCollection const& fnPosPara) { - SwContentNode *const pCNode = pShellCursor->GetContentNode(); + SwContentNode *const pCNode = pShellCursor->GetPointContentNode(); assert(pCNode); // surely can't have moved otherwise? std::pair tmp(pShellCursor->GetPtPos(), false); SwContentFrame const*const pFrame = pCNode->getLayoutFrame( @@ -1126,7 +1126,7 @@ bool SwCursorShell::IsEndPara() const } } } - return m_pCurrentCursor->GetPoint()->nContent == m_pCurrentCursor->GetContentNode()->Len(); + return m_pCurrentCursor->GetPoint()->nContent == m_pCurrentCursor->GetPointContentNode()->Len(); } bool SwCursorShell::IsEndOfTable() const @@ -1641,7 +1641,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) if ( !bInRepeatedHeadline ) { std::pair const tmp1(aTmpMk, false); - SwContentFrame* pMarkTableFrame = pITmpCursor->GetContentNode( false )-> + SwContentFrame* pMarkTableFrame = pITmpCursor->GetMarkContentNode()-> getLayoutFrame(GetLayout(), pITmpCursor->GetMark(), &tmp1); OSL_ENSURE( pMarkTableFrame, "Table Cursor not in Content ??" ); @@ -1858,7 +1858,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) do { bAgainst = false; std::pair const tmp1(pShellCursor->GetPtPos(), false); - pFrame = pShellCursor->GetContentNode()->getLayoutFrame(GetLayout(), + pFrame = pShellCursor->GetPointContentNode()->getLayoutFrame(GetLayout(), pShellCursor->GetPoint(), &tmp1); // if the Frame doesn't exist anymore, the complete Layout has to be // created, because there used to be a Frame here! @@ -1868,7 +1868,7 @@ void SwCursorShell::UpdateCursor( sal_uInt16 eFlags, bool bIdleEnd ) { CalcLayout(); std::pair const tmp(pShellCursor->GetPtPos(), false); - pFrame = pShellCursor->GetContentNode()->getLayoutFrame( + pFrame = pShellCursor->GetPointContentNode()->getLayoutFrame( GetLayout(), pShellCursor->GetPoint(), &tmp); } while( !pFrame ); } @@ -2136,7 +2136,7 @@ void SwCursorShell::RefreshBlockCursor() SwShellCursor &rBlock = m_pBlockCursor->getShellCursor(); Point aPt = rBlock.GetPtPos(); std::pair const tmp(aPt, false); - SwContentFrame* pFrame = rBlock.GetContentNode()->getLayoutFrame( + SwContentFrame* pFrame = rBlock.GetPointContentNode()->getLayoutFrame( GetLayout(), rBlock.GetPoint(), &tmp); Point aMk; if( m_pBlockCursor->getEndPoint() && m_pBlockCursor->getStartPoint() ) @@ -2466,7 +2466,7 @@ SwContentFrame *SwCursorShell::GetCurrFrame( const bool bCalcFrame ) const { CurrShell aCurr( const_cast(this) ); SwContentFrame *pRet = nullptr; - SwContentNode *pNd = m_pCurrentCursor->GetContentNode(); + SwContentNode *pNd = m_pCurrentCursor->GetPointContentNode(); if ( pNd ) { if ( bCalcFrame ) @@ -2962,7 +2962,7 @@ SwCursorShell::SwCursorShell( SwCursorShell& rShell, vcl::Window *pInitWin ) CurrShell aCurr( this ); // only keep the position of the current cursor of the copy shell m_pCurrentCursor = new SwShellCursor( *this, *(rShell.m_pCurrentCursor->GetPoint()) ); - m_pCurrentCursor->GetContentNode()->Add( this ); + m_pCurrentCursor->GetPointContentNode()->Add( this ); m_bAllProtect = m_bVisPortChgd = m_bChgCallFlag = m_bInCMvVisportChgd = m_bGCAttr = m_bIgnoreReadonly = m_bSelTableCells = m_bBasicHideCursor = @@ -3425,7 +3425,7 @@ bool SwCursorShell::IsSelFullPara() const nStt = nEnd; nEnd = nTmp; } - const SwContentNode* pCNd = m_pCurrentCursor->GetContentNode(); + const SwContentNode* pCNd = m_pCurrentCursor->GetPointContentNode(); bRet = pCNd && !nStt && nEnd == pCNd->Len(); } return bRet; @@ -3852,7 +3852,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect ) SwRect aStartRect; SwCursorMoveState aState; aState.m_bRealWidth = true; - SwContentNode* pContentNode = pCursor->GetContentNode(); + SwContentNode* pContentNode = pCursor->GetPointContentNode(); std::pair const tmp(rPt, false); SwContentFrame *pContentFrame = pContentNode->getLayoutFrame( GetLayout(), pCursor->GetPoint(), &tmp); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index ae45c38c46bb..33446ad5d628 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -89,7 +89,7 @@ void SwCursorShell::MoveCursorToNum() // SRectangle's height Point aPt( m_pCurrentCursor->GetPtPos() ); std::pair const tmp(aPt, true); - SwContentFrame * pFrame = m_pCurrentCursor->GetContentNode()->getLayoutFrame( + SwContentFrame * pFrame = m_pCurrentCursor->GetPointContentNode()->getLayoutFrame( GetLayout(), m_pCurrentCursor->GetPoint(), &tmp); pFrame->GetCharRect( m_aCharRect, *m_pCurrentCursor->GetPoint() ); pFrame->Calc(GetOut()); @@ -2037,7 +2037,7 @@ bool SwContentAtPos::IsInRTLText()const SwStartNode* pSttNd = pTextFootnote->GetStartNode()->GetNode().GetStartNode(); SwPaM aTemp( *pSttNd ); aTemp.Move(fnMoveForward, GoInNode); - SwContentNode* pContentNode = aTemp.GetContentNode(); + SwContentNode* pContentNode = aTemp.GetPointContentNode(); if(pContentNode && pContentNode->IsTextNode()) pNd = pContentNode->GetTextNode(); } diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 626a590a07b2..43ce670499d8 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -109,7 +109,7 @@ static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd nContentPos = rPam.GetPoint()->GetContentIndex(); bool bTstEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode; - SwContentNode* pCNd = rPam.GetContentNode(); + SwContentNode* pCNd = rPam.GetPointContentNode(); rPam.GetPoint()->nContent.Assign( pCNd, nStart ); rPam.SetMark(); // Point == GetMark @@ -928,14 +928,14 @@ bool FindAttrImpl(SwPaM & rSearchPam, // if at beginning/end then move it out of the node if( bSrchForward - ? oPam->GetPoint()->GetContentIndex() == oPam->GetContentNode()->Len() + ? oPam->GetPoint()->GetContentIndex() == oPam->GetPointContentNode()->Len() : !oPam->GetPoint()->GetContentIndex() ) { if( !(*fnMove.fnNds)( &oPam->GetPoint()->nNode, false )) { return false; } - SwContentNode *pNd = oPam->GetContentNode(); + SwContentNode *pNd = oPam->GetPointContentNode(); oPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() ); } @@ -1066,14 +1066,14 @@ static bool FindAttrsImpl(SwPaM & rSearchPam, // if at beginning/end then move it out of the node if( bMoveFirst && ( bSrchForward - ? oPam->GetPoint()->GetContentIndex() == oPam->GetContentNode()->Len() + ? oPam->GetPoint()->GetContentIndex() == oPam->GetPointContentNode()->Len() : !oPam->GetPoint()->GetContentIndex() ) ) { if( !(*fnMove.fnNds)( &oPam->GetPoint()->nNode, false )) { return false; } - SwContentNode *pNd = oPam->GetContentNode(); + SwContentNode *pNd = oPam->GetPointContentNode(); oPam->GetPoint()->nContent.Assign( pNd, bSrchForward ? 0 : pNd->Len() ); } diff --git a/sw/source/core/crsr/findfmt.cxx b/sw/source/core/crsr/findfmt.cxx index 555d28bd543e..d5b0eb4656b5 100644 --- a/sw/source/core/crsr/findfmt.cxx +++ b/sw/source/core/crsr/findfmt.cxx @@ -37,7 +37,7 @@ bool FindFormatImpl(SwPaM & rSearchPam, // if at beginning/end then move it out of the node if( bSrchForward - ? oPam->GetPoint()->GetContentIndex() == oPam->GetContentNode()->Len() + ? oPam->GetPoint()->GetContentIndex() == oPam->GetPointContentNode()->Len() : !oPam->GetPoint()->GetContentIndex() ) { if( !(*fnMove.fnNds)( &oPam->GetPoint()->nNode, false )) diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index be23fe43a18c..b1ecf68a5ea2 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -1115,8 +1115,8 @@ std::optional ReplaceBackReferences(const i18nutil::SearchOptions2& rS if( pPam && pPam->HasMark() && SearchAlgorithms2::REGEXP == rSearchOpt.AlgorithmType2 ) { - SwContentNode const*const pTextNode = pPam->GetContentNode(); - SwContentNode const*const pMarkTextNode = pPam->GetContentNode(false); + SwContentNode const*const pTextNode = pPam->GetPointContentNode(); + SwContentNode const*const pMarkTextNode = pPam->GetMarkContentNode(); if (!pTextNode || !pTextNode->IsTextNode() || !pMarkTextNode || !pMarkTextNode->IsTextNode()) { diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 29bfc5a4200f..b1c81de2f8f5 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -963,7 +963,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const & if( rbFirst ) { rbFirst = false; - pNd = rPam.GetContentNode(); + pNd = rPam.GetPointContentNode(); if( pNd ) { SwContentFrame const*const pFrame(pNd->getLayoutFrame(pLayout)); diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 02a721f4baa7..9cd4a326a533 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -205,7 +205,7 @@ bool SwTableCursor::IsSelOvrCheck(SwCursorSelOverFlags eFlags) if( !CheckNodesRange( aOldPos.GetNode(), GetPoint()->GetNode(), true )) { GetPoint()->nNode = aOldPos; - GetPoint()->nContent.Assign( GetContentNode(), GetSavePos()->nContent ); + GetPoint()->nContent.Assign( GetPointContentNode(), GetSavePos()->nContent ); return true; } } @@ -567,7 +567,7 @@ bool SwCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) bool SwCursor::IsInProtectTable( bool bMove, bool bChgCursor ) { - SwContentNode* pCNd = GetContentNode(); + SwContentNode* pCNd = GetPointContentNode(); if( !pCNd ) return false; @@ -637,7 +637,7 @@ SetNextCursor: if( !bProt ) // found free cell { GetPoint()->nNode = aCellStt; - SwContentNode* pTmpCNd = GetContentNode(); + SwContentNode* pTmpCNd = GetPointContentNode(); if( pTmpCNd ) { GetPoint()->nContent.Assign( pTmpCNd, 0 ); @@ -689,7 +689,7 @@ SetPrevCursor: if( !bProt ) // found free cell { GetPoint()->nNode = aCellStt; - SwContentNode* pTmpCNd = GetContentNode(); + SwContentNode* pTmpCNd = GetPointContentNode(); if( pTmpCNd ) { GetPoint()->nContent.Assign( pTmpCNd, 0 ); @@ -1280,7 +1280,7 @@ bool SwCursor::IsInWordWT(sal_Int16 nWordType, SwRootFrame const*const pLayout) bool SwCursor::IsStartEndSentence(bool bEnd, SwRootFrame const*const pLayout) const { bool bRet = bEnd ? - GetContentNode() && GetPoint()->nContent == GetContentNode()->Len() : + GetPointContentNode() && GetPoint()->nContent == GetPointContentNode()->Len() : GetPoint()->GetContentIndex() == 0; if ((pLayout != nullptr && pLayout->HasMergedParas()) || !bRet) @@ -1889,7 +1889,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, rPtIdx = aNewIdx; GetDoc().GetNodes().GoNextSection( &rPtIdx, false, false ); - SwContentNode* pContentNode = GetContentNode(); + SwContentNode* pContentNode = GetPointContentNode(); if ( pContentNode ) { GetPoint()->nContent.Assign( pContentNode, bLeft ? pContentNode->Len() : 0 ); @@ -1922,7 +1922,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, rPtIdx = aNewIdx; GetDoc().GetNodes().GoNextSection( &rPtIdx, false, false ); - SwContentNode* pContentNode = GetContentNode(); + SwContentNode* pContentNode = GetPointContentNode(); if ( pContentNode ) { GetPoint()->nContent.Assign( pContentNode, bLeft ? pContentNode->Len() : 0 ); @@ -2015,7 +2015,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, if( pPt ) aPt = *pPt; std::pair const temp(aPt, true); - SwContentFrame* pFrame = GetContentNode()->getLayoutFrame(&rLayout, GetPoint(), &temp); + SwContentFrame* pFrame = GetPointContentNode()->getLayoutFrame(&rLayout, GetPoint(), &temp); if( pFrame ) { @@ -2052,7 +2052,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, GetPoint()->nNode = *pEndNd; pTableCursor->Move( fnMoveBackward, GoInNode ); std::pair const tmp(aPt, true); - pFrame = GetContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); + pFrame = GetPointContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); } } @@ -2062,7 +2062,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, CheckNodesRange( aOldPos.GetNode(), GetPoint()->GetNode(), bChkRange )) { std::pair const tmp(aPt, true); - pFrame = GetContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); + pFrame = GetPointContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); --nCnt; } @@ -2075,7 +2075,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, // try to position the cursor at half of the char-rect's height DisableCallbackAction a(rLayout); std::pair const tmp(aPt, true); - pFrame = GetContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); + pFrame = GetPointContentNode()->getLayoutFrame(&rLayout, GetPoint(), &tmp); SwCursorMoveState eTmpState( CursorMoveState::UpDown ); eTmpState.m_bSetInReadOnly = bInReadOnly; SwRect aTmpRect; @@ -2107,7 +2107,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, if (pTextNd) nOffset = pTextNd->GetText().getLength(); } - const SwPosition aPos(*GetContentNode(), nOffset); + const SwPosition aPos(*GetPointContentNode(), nOffset); //if cursor has already been at start or end of file, //Update cursor to change nUpDownX. @@ -2132,7 +2132,7 @@ bool SwCursor::LeftRightMargin(SwRootFrame const& rLayout, bool bLeft, bool bAPI { Point aPt; std::pair const tmp(aPt, true); - SwContentFrame const*const pFrame = GetContentNode()->getLayoutFrame( + SwContentFrame const*const pFrame = GetPointContentNode()->getLayoutFrame( &rLayout, GetPoint(), &tmp); // calculate cursor bidi level @@ -2150,7 +2150,7 @@ bool SwCursor::IsAtLeftRightMargin(SwRootFrame const& rLayout, bool bLeft, bool bool bRet = false; Point aPt; std::pair const tmp(aPt, true); - SwContentFrame const*const pFrame = GetContentNode()->getLayoutFrame( + SwContentFrame const*const pFrame = GetPointContentNode()->getLayoutFrame( &rLayout, GetPoint(), &tmp); if( pFrame ) { @@ -2241,7 +2241,7 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt ) ++rPtIdx; if( !rPtIdx.GetNode().IsContentNode() ) GetDoc().GetNodes().GoNextSection( &rPtIdx, true, false ); - GetPoint()->nContent.Assign( GetContentNode(), 0 ); + GetPoint()->nContent.Assign( GetPointContentNode(), 0 ); return !IsInProtectTable( true ); } @@ -2354,17 +2354,17 @@ void SwCursor::RestoreSavePos() GetPoint()->nNode = m_vSavePos.back().nNode; sal_Int32 nIdx = 0; - if ( GetContentNode() ) + if ( GetPointContentNode() ) { - if (m_vSavePos.back().nContent <= GetContentNode()->Len()) + if (m_vSavePos.back().nContent <= GetPointContentNode()->Len()) nIdx = m_vSavePos.back().nContent; else { - nIdx = GetContentNode()->Len(); + nIdx = GetPointContentNode()->Len(); OSL_FAIL("SwCursor::RestoreSavePos: invalid content index"); } } - GetPoint()->nContent.Assign( GetContentNode(), nIdx ); + GetPoint()->nContent.Assign( GetPointContentNode(), nIdx ); } SwTableCursor::SwTableCursor( const SwPosition &rPos ) diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 7b8364959b9a..7fe3171ef043 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -176,7 +176,7 @@ bool SwCursorShell::SelTableRowOrCol( bool bRow, bool bRowSimple ) { const SwShellCursor *pCursor = GetCursor_(); const SwFrame* pStartFrame = pFrame; - const SwContentNode *pCNd = pCursor->GetContentNode( false ); + const SwContentNode *pCNd = pCursor->GetMarkContentNode(); std::pair const tmp(pCursor->GetMkPos(), true); const SwFrame* pEndFrame = pCNd ? pCNd->getLayoutFrame(GetLayout(), nullptr, &tmp) diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 64db5d5f068c..914e1374554c 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -1856,7 +1856,7 @@ void SaveBookmark::SetInDoc( if(pIdx && !m_nNode2) aPam.GetMark()->nContent += m_nContent2; else - aPam.GetMark()->nContent.Assign(aPam.GetContentNode(false), m_nContent2); + aPam.GetMark()->nContent.Assign(aPam.GetMarkContentNode(), m_nContent2); } aPam.GetPoint()->nNode += m_nNode1; @@ -1864,7 +1864,7 @@ void SaveBookmark::SetInDoc( if(pIdx && !m_nNode1) aPam.GetPoint()->nContent += m_nContent1; else - aPam.GetPoint()->nContent.Assign(aPam.GetContentNode(), m_nContent1); + aPam.GetPoint()->nContent.Assign(aPam.GetPointContentNode(), m_nContent1); if(aPam.HasMark() && !CheckNodesRange(aPam.GetPoint()->GetNode(), aPam.GetMark()->GetNode(), true)) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index 672f20ab492f..a32f01514037 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1673,7 +1673,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) & pTmp->GetPoint()->GetNode()) { --pTmp->GetPoint()->nNode; - SwContentNode *const pContentNode( pTmp->GetContentNode() ); + SwContentNode *const pContentNode( pTmp->GetPointContentNode() ); pTmp->GetPoint()->nContent.Assign( pContentNode, pContentNode ? pContentNode->Len() : 0 ); // tdf#106218 try to avoid losing a paragraph break here: @@ -1716,7 +1716,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) & pTmp->GetPoint()->GetNode()) { --pTmp->GetPoint()->nNode; - SwContentNode *const pContentNode( pTmp->GetContentNode() ); + SwContentNode *const pContentNode( pTmp->GetPointContentNode() ); pTmp->GetPoint()->nContent.Assign( pContentNode, pContentNode ? pContentNode->Len() : 0 ); // tdf#106218 try to avoid losing a paragraph break here: @@ -1931,7 +1931,7 @@ SaveMergeRedline::SaveMergeRedline( const SwNode& rDstNd, pDestRedl->SetMark(); pDestRedl->GetPoint()->nNode += pEnd->GetNodeIndex() - pStt->GetNodeIndex(); - pDestRedl->GetPoint()->nContent.Assign( pDestRedl->GetContentNode(), + pDestRedl->GetPoint()->nContent.Assign( pDestRedl->GetPointContentNode(), pEnd->GetContentIndex() ); } diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index d2fc6191fea4..a51b4ad2e5b3 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -165,7 +165,7 @@ bool SwDoc::InsertGlossary( SwTextBlocks& rBlock, const OUString& rEntry, // till the nodes array's end aCpyPam.GetPoint()->nNode = pGDoc->GetNodes().GetEndOfContent().GetIndex()-SwNodeOffset(1); - pContentNd = aCpyPam.GetContentNode(); + pContentNd = aCpyPam.GetPointContentNode(); aCpyPam.GetPoint()->nContent.Assign( pContentNd, pContentNd ? pContentNd->Len() : 0 ); diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 9a09204a6b6b..e5e7e6bd32e7 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -357,7 +357,7 @@ void SwRedlineTable::LOKRedlineNotification(RedlineNotification nType, SwRangeRe aRedline.put("dateTime", sDateTime.toUtf8().getStr()); auto [pStartPos, pEndPos] = pRedline->StartEnd(); // SwPosition* - SwContentNode* pContentNd = pRedline->GetContentNode(); + SwContentNode* pContentNd = pRedline->GetPointContentNode(); SwView* pView = dynamic_cast(SfxViewShell::Current()); if (pView && pContentNd) { @@ -1775,7 +1775,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) SwPaM aPam( m_oContentSect->GetNode(), *m_oContentSect->GetNode().EndOfSectionNode(), SwNodeOffset(1), SwNodeOffset( m_bDelLastPara ? -2 : -1 ) ); - SwContentNode* pCNd = aPam.GetContentNode(); + SwContentNode* pCNd = aPam.GetPointContentNode(); if( pCNd ) aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); else @@ -1810,12 +1810,12 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) if( m_bDelLastPara ) { ++GetPoint()->nNode; - pCNd = GetContentNode(); + pCNd = GetPointContentNode(); GetPoint()->nContent.Assign( pCNd, 0 ); m_bDelLastPara = false; } else if( pColl ) - pCNd = GetContentNode(); + pCNd = GetPointContentNode(); if( pColl && pCNd ) pCNd->ChgFormatColl( pColl ); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index 500e1ba4bc83..2708e1cbc13d 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -320,7 +320,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) if( getIDocumentRedlineAccess().IsRedlineOn() || (!getIDocumentRedlineAccess().IsIgnoreRedline() && !getIDocumentRedlineAccess().GetRedlineTable().empty() )) { pRedlPam = new SwPaM( pStart->nNode, pEnd->nNode, SwNodeOffset(-1), SwNodeOffset(1) ); - SwContentNode* pCNd = pRedlPam->GetContentNode( false ); + SwContentNode* pCNd = pRedlPam->GetMarkContentNode(); if( pCNd ) pRedlPam->GetMark()->nContent = pCNd->Len(); @@ -342,7 +342,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) pRedlPam->GetMark()->nNode.Assign( pEnd->GetNode(), 1 ); pRedlPam->GetPoint()->Assign( aEndIdx.GetNode() ); - pCNd = pRedlPam->GetContentNode(); + pCNd = pRedlPam->GetPointContentNode(); sal_Int32 nCLen = 0; if( !pCNd ) { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index addb466c46d1..6c85bb0a3336 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -4202,7 +4202,7 @@ void SwDoc::ClearLineNumAttrs( SwPosition const & rPos ) { SwPaM aPam(rPos); aPam.Move(fnMoveBackward); - SwContentNode *pNode = aPam.GetContentNode(); + SwContentNode *pNode = aPam.GetPointContentNode(); if ( nullptr == pNode ) return ; if( !pNode->IsTextNode() ) diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 127e17a8c38e..ad0ad63077fa 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -117,7 +117,7 @@ SwFrameFormat* SwTableFormatCmp::FindNewFormat(std::vector tmp(aPtPos, true); SwFrame *const pPointFrame = pPointNd ? pPointNd->getLayoutFrame(pPointNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp) : nullptr; @@ -606,7 +606,7 @@ void SwDoc::SetRowNotTracked( const SwCursor& rCursor, const SvxPrintItem &rNew, getIDocumentContentOperations().InsertString( aPaM, OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) ); aPaM.SetMark(); - aPaM.GetMark()->nContent.Assign(aPaM.GetContentNode(), 0); + aPaM.GetMark()->nContent.Assign(aPaM.GetPointContentNode(), 0); getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); getIDocumentContentOperations().DeleteAndJoin( aPaM ); } @@ -900,7 +900,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame* pFrame = rCursor.GetPointContentNode()->getLayoutFrame( rCursor.GetPointContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( @@ -1009,7 +1009,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor, SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame* pFrame = rCursor.GetPointContentNode()->getLayoutFrame( rCursor.GetPointContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->BordersChanged( @@ -1276,7 +1276,7 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew ) SwHTMLTableLayout *pTableLayout = rTable.GetHTMLTableLayout(); if( pTableLayout ) { - SwContentFrame* pFrame = rCursor.GetContentNode()->getLayoutFrame( rCursor.GetContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); + SwContentFrame* pFrame = rCursor.GetPointContentNode()->getLayoutFrame( rCursor.GetPointContentNode()->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ); SwTabFrame* pTabFrame = pFrame->ImplFindTabFrame(); pTableLayout->Resize( diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 40ce709cd8b2..d68c5b14caee 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -477,7 +477,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // then until the end of the Nodes Array aCpyPam.GetPoint()->nNode.Assign( pAutoDoc->GetNodes().GetEndOfContent(), -1 ); - pContentNd = aCpyPam.GetContentNode(); + pContentNd = aCpyPam.GetPointContentNode(); aCpyPam.GetPoint()->nContent.Assign( pContentNd, pContentNd ? pContentNd->Len() : 0); diff --git a/sw/source/core/edit/eddel.cxx b/sw/source/core/edit/eddel.cxx index 6b824a378bc5..c19d93b71b61 100644 --- a/sw/source/core/edit/eddel.cxx +++ b/sw/source/core/edit/eddel.cxx @@ -288,9 +288,9 @@ bool SwEditShell::Copy( SwEditShell& rDestShell ) for(SwPaM& rCmp : rDestShell.GetCursor()->GetRingContainer()) { OSL_ENSURE( rCmp.GetPoint()->GetContentNode() - == rCmp.GetContentNode(), "Point in wrong Node" ); + == rCmp.GetPointContentNode(), "Point in wrong Node" ); OSL_ENSURE( rCmp.GetMark()->GetContentNode() - == rCmp.GetContentNode(false), "Mark in wrong Node" ); + == rCmp.GetMarkContentNode(), "Mark in wrong Node" ); } } #endif diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index b155f9b0737c..e3cbb92119bd 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -2273,7 +2273,7 @@ SwTextFormatColl* SwEditShell::MakeTextFormatColl(const OUString& rFormatCollNam void SwEditShell::FillByEx(SwTextFormatColl* pColl) { SwPaM * pCursor = GetCursor(); - SwContentNode * pCnt = pCursor->GetContentNode(); + SwContentNode * pCnt = pCursor->GetPointContentNode(); if (pCnt->IsTextNode()) // uhm... what nonsense would happen if not? { // only need properties-node because BREAK/PAGEDESC filtered anyway! pCnt = sw::GetParaPropsNode(*GetLayout(), pCursor->GetPoint()->GetNode()); diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index 9a4fa24e151c..0a51dac96f8c 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -51,7 +51,7 @@ SwCharFormat* SwEditShell::GetCurCharFormat() const void SwEditShell::FillByEx(SwCharFormat* pCharFormat) { SwPaM* pPam = GetCursor(); - const SwContentNode* pCNd = pPam->GetContentNode(); + const SwContentNode* pCNd = pPam->GetPointContentNode(); if( pCNd->IsTextNode() ) { SwTextNode const*const pTextNode(pCNd->GetTextNode()); diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx index bbb98b7e30c0..ee848a206d44 100644 --- a/sw/source/core/edit/edglss.cxx +++ b/sw/source/core/edit/edglss.cxx @@ -111,7 +111,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock, // then until the end of the Node array pCursor->GetPoint()->nNode = pMyDoc->GetNodes().GetEndOfContent().GetIndex()-1; - pContentNd = pCursor->GetContentNode(); + pContentNd = pCursor->GetPointContentNode(); if( pContentNd ) pCursor->GetPoint()->nContent.Assign( pContentNd, pContentNd->Len() ); @@ -134,7 +134,7 @@ sal_uInt16 SwEditShell::SaveGlossaryDoc( SwTextBlocks& rBlock, // then until the end of the nodes array aCpyPam.GetPoint()->nNode = pMyDoc->GetNodes().GetEndOfContent().GetIndex()-1; - pContentNd = aCpyPam.GetContentNode(); + pContentNd = aCpyPam.GetPointContentNode(); aCpyPam.GetPoint()->nContent.Assign( pContentNd, pContentNd ? pContentNd->Len() : 0); @@ -205,7 +205,7 @@ bool SwEditShell::CopySelToDoc( SwDoc& rInsDoc ) { if( !rPaM.HasMark() ) { - SwContentNode *const pNd = rPaM.GetContentNode(); + SwContentNode *const pNd = rPaM.GetPointContentNode(); if (nullptr != pNd && ( bColSel || !pNd->GetTextNode() ) ) { diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index e6d3b6aeb3cd..f2ca98a21725 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -880,7 +880,7 @@ void SwEditShell::HandleCorrectionError(const OUString& aText, SwPosition aPos, SwRect aStartRect; SwCursorMoveState aState; aState.m_bRealWidth = true; - SwContentNode* pContentNode = pCursor->GetContentNode(); + SwContentNode* pContentNode = pCursor->GetPointContentNode(); std::pair tmp; if (pPt) { diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx index 8b6cf72e0531..0fad9aae9401 100644 --- a/sw/source/core/edit/edtab.cxx +++ b/sw/source/core/edit/edtab.cxx @@ -185,7 +185,7 @@ bool SwEditShell::TableToText( sal_Unicode cCh ) //End for bug #i119954# pCursor->GetPoint()->nNode = aTabIdx; - SwContentNode* pCNd = pCursor->GetContentNode(); + SwContentNode* pCNd = pCursor->GetPointContentNode(); if( !pCNd ) pCursor->Move( fnMoveForward, GoInContent ); else diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index f2b737b9b5f1..f44e8e597100 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -921,7 +921,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) aInsertion.first->GetPoint()->nNode = aIdx; else aInsertion.first->GetPoint()->nContent = - aInsertion.first->GetContentNode()->Len(); + aInsertion.first->GetPointContentNode()->Len(); aCopyVector.push_back( aInsertion ); } // If there are no text portions left but there are some more diff --git a/sw/source/core/frmedt/fedesc.cxx b/sw/source/core/frmedt/fedesc.cxx index f9f58949c2cb..44720560ad00 100644 --- a/sw/source/core/frmedt/fedesc.cxx +++ b/sw/source/core/frmedt/fedesc.cxx @@ -193,14 +193,14 @@ const SwPageDesc* SwFEShell::GetSelectedPageDescs() const for(const SwPaM& rPaM : GetCursor()->GetRingContainer()) { - if( nullptr != (pCNd = rPaM.GetContentNode() ) && + if( nullptr != (pCNd = rPaM.GetPointContentNode() ) && nullptr != (pPtFrame = pCNd->getLayoutFrame(GetLayout(), nullptr, &tmp))) pPtFrame = pPtFrame->FindPageFrame(); else pPtFrame = nullptr; if( rPaM.HasMark() && - nullptr != (pCNd = rPaM.GetContentNode( false ) ) && + nullptr != (pCNd = rPaM.GetMarkContentNode() ) && nullptr != (pMkFrame = pCNd->getLayoutFrame(GetLayout(), nullptr, &tmp))) pMkFrame = pMkFrame->FindPageFrame(); else diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index f55dcc1aad53..6ade7c6bb556 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -972,7 +972,7 @@ void SwFEShell::InsertDrawObj( SdrObject& rDrawObj, SwCursorMoveState aState( CursorMoveState::SetOnlyText ); Point aTmpPt( rInsertPosition ); GetLayout()->GetModelPositionForViewPoint( aPam.GetPoint(), aTmpPt, &aState ); - const SwFrame* pFrame = aPam.GetContentNode()->getLayoutFrame(GetLayout(), nullptr, nullptr); + const SwFrame* pFrame = aPam.GetPointContentNode()->getLayoutFrame(GetLayout(), nullptr, nullptr); const Point aRelPos( rInsertPosition.X() - pFrame->getFrameArea().Left(), rInsertPosition.Y() - pFrame->getFrameArea().Top() ); rDrawObj.SetRelativePos( aRelPos ); diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 9ca5c7d38e8c..c3c2de36e3e6 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -565,7 +565,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) // put selection again pPam->DeleteMark(); pPam->GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwContentNode* pCNd = pPam->GetContentNode(); + SwContentNode* pCNd = pPam->GetPointContentNode(); sal_Int32 nLen = pCNd->Len(); if( nLen > nCntStt ) nLen = nCntStt; @@ -573,7 +573,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) pPam->SetMark(); pPam->GetPoint()->nNode += nOffset; - pCNd = pPam->GetContentNode(); + pCNd = pPam->GetPointContentNode(); pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); } } diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 4f377143ff24..1f32bf25f8d7 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -160,7 +160,7 @@ void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, const SwTableSearchType eSearchType ) { // get start and end cell - OSL_ENSURE( rCursor.GetContentNode() && rCursor.GetContentNode( false ), + OSL_ENSURE( rCursor.GetPointContentNode() && rCursor.GetMarkContentNode(), "Tabselection not on Cnt." ); // Row-selection: @@ -231,11 +231,11 @@ void GetTableSel( const SwCursor& rCursor, SwSelBoxes& rBoxes, aPtPos = pShCursor->GetPtPos(); aMkPos = pShCursor->GetMkPos(); } - const SwContentNode *pCntNd = rCursor.GetContentNode(); + const SwContentNode *pCntNd = rCursor.GetPointContentNode(); std::pair tmp(aPtPos, true); const SwLayoutFrame *pStart = pCntNd ? pCntNd->getLayoutFrame(pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper() : nullptr; - pCntNd = rCursor.GetContentNode(false); + pCntNd = rCursor.GetMarkContentNode(); tmp.first = aMkPos; const SwLayoutFrame *pEnd = pCntNd ? pCntNd->getLayoutFrame(pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper() : nullptr; @@ -697,10 +697,10 @@ bool GetAutoSumSel( const SwCursorShell& rShell, SwCellFrames& rBoxes ) pCursor = rShell.m_pTableCursor; std::pair tmp(pCursor->GetPtPos(), true); - const SwLayoutFrame *const pStart = pCursor->GetContentNode()->getLayoutFrame( + const SwLayoutFrame *const pStart = pCursor->GetPointContentNode()->getLayoutFrame( rShell.GetLayout(), nullptr, &tmp)->GetUpper(); tmp.first = pCursor->GetMkPos(); - const SwLayoutFrame *const pEnd = pCursor->GetContentNode(false)->getLayoutFrame( + const SwLayoutFrame *const pEnd = pCursor->GetMarkContentNode()->getLayoutFrame( rShell.GetLayout(), nullptr, &tmp)->GetUpper(); const SwLayoutFrame* pSttCell = pStart; @@ -931,7 +931,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { rBoxes.clear(); - OSL_ENSURE( rPam.GetContentNode() && rPam.GetContentNode( false ), + OSL_ENSURE( rPam.GetPointContentNode() && rPam.GetMarkContentNode(), "Tabselection not on Cnt." ); //JP 24.09.96: Merge with repeating TableHeadLines does not work properly. @@ -939,12 +939,12 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, // headline is contained. Point aPt( 0, 0 ); - const SwContentNode* pCntNd = rPam.GetContentNode(); + const SwContentNode* pCntNd = rPam.GetPointContentNode(); std::pair const tmp(aPt, true); const SwLayoutFrame *const pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper(); - pCntNd = rPam.GetContentNode(false); + pCntNd = rPam.GetMarkContentNode(); const SwLayoutFrame *const pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper(); @@ -1359,7 +1359,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { aPam.GetPoint()->Assign( *rPt.pSelBox->GetSttNd()-> EndOfSectionNode(), SwNodeOffset(-1) ); - SwContentNode* pCNd = aPam.GetContentNode(); + SwContentNode* pCNd = aPam.GetPointContentNode(); aPam.GetPoint()->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); SwNodeIndex aSttNdIdx( *rPt.pSelBox->GetSttNd(), 1 ); @@ -1454,12 +1454,12 @@ TableMergeErr CheckMergeSel( const SwPaM& rPam ) // headline is contained. Point aPt; - const SwContentNode* pCntNd = rPam.GetContentNode(); + const SwContentNode* pCntNd = rPam.GetPointContentNode(); std::pair tmp(aPt, true); const SwLayoutFrame *const pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper(); - pCntNd = rPam.GetContentNode(false); + pCntNd = rPam.GetMarkContentNode(); const SwLayoutFrame *const pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper(); @@ -1983,12 +1983,12 @@ bool CheckSplitCells( const SwCursor& rCursor, sal_uInt16 nDiv, aMkPos = pShCursor->GetMkPos(); } - const SwContentNode* pCntNd = rCursor.GetContentNode(); + const SwContentNode* pCntNd = rCursor.GetPointContentNode(); std::pair tmp(aPtPos, true); const SwLayoutFrame *const pStart = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), nullptr, &tmp)->GetUpper(); - pCntNd = rCursor.GetContentNode(false); + pCntNd = rCursor.GetMarkContentNode(); tmp.first = aMkPos; const SwLayoutFrame *const pEnd = pCntNd->getLayoutFrame( pCntNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(), diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx index 32fb5bfbc54f..be77d92eed89 100644 --- a/sw/source/core/layout/layact.cxx +++ b/sw/source/core/layout/layact.cxx @@ -2014,7 +2014,7 @@ bool SwLayIdle::DoIdleJob_( const SwContentFrame *pCnt, IdleJobType eJob ) SwPaM *pCursor = pCursorShell->GetCursor(); if( !pCursor->HasMark() && !pCursor->IsMultiSelection() ) { - m_pContentNode = pCursor->GetContentNode(); + m_pContentNode = pCursor->GetPointContentNode(); m_nTextPos = pCursor->GetPoint()->GetContentIndex(); } } diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index 32c4d990fb55..6eff7b47692c 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -1870,7 +1870,7 @@ sal_uInt16 SwFrame::GetVirtPageNum() const bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) { //Find Union-Rects and tables (Follows) of the selection. - OSL_ENSURE( rTableCursor.GetContentNode() && rTableCursor.GetContentNode( false ), + OSL_ENSURE( rTableCursor.GetPointContentNode() && rTableCursor.GetMarkContentNode(), "Tabselection not on Cnt." ); bool bRet = false; @@ -1891,8 +1891,8 @@ bool SwRootFrame::MakeTableCursors( SwTableCursor& rTableCursor ) } // #151012# Made code robust here - const SwContentNode* pTmpStartNode = rTableCursor.GetContentNode(); - const SwContentNode* pTmpEndNode = rTableCursor.GetContentNode(false); + const SwContentNode* pTmpStartNode = rTableCursor.GetPointContentNode(); + const SwContentNode* pTmpEndNode = rTableCursor.GetMarkContentNode(); std::pair tmp(aPtPt, false); const SwFrame *const pTmpStartFrame = pTmpStartNode ? pTmpStartNode->getLayoutFrame(this, nullptr, &tmp) : nullptr; diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 69f339f074d1..1a9fe882b3a9 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -887,7 +887,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, SwNodeIndex& rInsPosNd = aInsPos.nNode; SwPaM aPam( aInsPos ); aPam.GetPoint()->nNode.Assign( *pBox->GetSttNd()->EndOfSectionNode(), -1 ); - SwContentNode* pCNd = aPam.GetContentNode(); + SwContentNode* pCNd = aPam.GetPointContentNode(); aPam.GetPoint()->nContent.Assign( pCNd, pCNd ? pCNd->Len() : 0 ); SwNodeIndex aSttNdIdx( *pBox->GetSttNd(), 1 ); bool const bUndo = pDoc->GetIDocumentUndoRedo().DoesUndo(); diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index f5aca7ecb5b5..84ff22209bf5 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -843,7 +843,7 @@ void SwUndoSaveContent::MovePtForward( SwPaM& rPam, bool bMvBkwrd ) else { rPam.GetPoint()->Adjust(SwNodeOffset(1)); - SwContentNode* pCNd = rPam.GetContentNode(); + SwContentNode* pCNd = rPam.GetPointContentNode(); if( !pCNd ) rPam.Move( fnMoveForward ); } @@ -1263,10 +1263,10 @@ void SwUndoSaveSection::SaveSection( ++aPam.GetMark()->nNode; } - SwContentNode* pCNd = aPam.GetContentNode( false ); + SwContentNode* pCNd = aPam.GetMarkContentNode(); if( pCNd ) aPam.GetMark()->nContent.Assign( pCNd, 0 ); - pCNd = aPam.GetContentNode(); + pCNd = aPam.GetPointContentNode(); if( nullptr != pCNd ) aPam.GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index efc73ab31060..932a36706507 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -212,7 +212,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) if( IDocumentRedlineAccess::IsRedlineOn( GetRedlineFlags() )) { - pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), 0 ); + pPam->GetPoint()->nContent.Assign( pPam->GetPointContentNode(), 0 ); pPam->SetMark(); pPam->Move( fnMoveBackward ); pPam->Exchange(); @@ -220,7 +220,7 @@ void SwUndoInsert::UndoImpl(::sw::UndoRedoContext & rContext) } pPam->DeleteMark(); pTmpDoc->getIDocumentContentOperations().DelFullPara( *pPam ); - pPam->GetPoint()->nContent.Assign( pPam->GetContentNode(), 0 ); + pPam->GetPoint()->nContent.Assign( pPam->GetPointContentNode(), 0 ); } else { @@ -382,7 +382,7 @@ void SwUndoInsert::RepeatImpl(::sw::RepeatContext & rContext) SwPaM aPaM( *pCNd, m_nContent ); aPaM.SetMark(); aPaM.Move(fnMoveBackward); - pCNd = aPaM.GetContentNode(); + pCNd = aPaM.GetPointContentNode(); } // What happens with the possible selected range ??? @@ -663,7 +663,7 @@ void SwUndoReplace::Impl::UndoImpl(::sw::UndoRedoContext & rContext) rPam.GetPoint()->Assign(*pNd, m_nSttCnt ); rPam.SetMark(); rPam.GetPoint()->nNode = m_nSttNd - m_nOffset; - rPam.GetPoint()->nContent.Assign(rPam.GetContentNode(), m_nSttNd == m_nEndNd ? m_nEndCnt : pNd->Len()); + rPam.GetPoint()->nContent.Assign(rPam.GetPointContentNode(), m_nSttNd == m_nEndNd ? m_nEndCnt : pNd->Len()); // replace only in start node, without regex bool const ret = pDoc->getIDocumentContentOperations().ReplaceRange(rPam, m_sOld, false); diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index a4a8a4f4325f..4c8f41ac2345 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -368,7 +368,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) pPam->SetMark(); pPam->GetPoint()->nNode += nOffsetTemp; - SwContentNode* pCNd = pPam->GetContentNode(); + SwContentNode* pCNd = pPam->GetPointContentNode(); pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); SetValues( *pPam ); @@ -389,7 +389,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) pPam->DeleteMark(); pPam->GetPoint()->Assign( aPrevIdx.GetNode(), SwNodeOffset(+1) ); - SwContentNode* pCNd = pPam->GetContentNode(); + SwContentNode* pCNd = pPam->GetPointContentNode(); sal_Int32 nLen = pCNd->Len(); if( nLen > nCntStt ) nLen = nCntStt; @@ -397,7 +397,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) pPam->SetMark(); pPam->GetPoint()->nNode += nOffsetTemp; - pCNd = pPam->GetContentNode(); + pCNd = pPam->GetPointContentNode(); pPam->GetPoint()->nContent.Assign( pCNd, pCNd->Len() ); SetValues( rPam ); @@ -504,8 +504,8 @@ void SwUndoCompDoc::UndoImpl(::sw::UndoRedoContext & rContext) rDoc.getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); // per definition Point is end (in SwUndRng!) - SwContentNode* pCSttNd = rPam.GetContentNode(false); - SwContentNode* pCEndNd = rPam.GetContentNode(); + SwContentNode* pCSttNd = rPam.GetMarkContentNode(); + SwContentNode* pCEndNd = rPam.GetPointContentNode(); // if start- and end-content is zero, then the doc-compare moves // complete nodes into the current doc. And then the selection diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index f0fac20af855..7ca506fcb8fb 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -336,7 +336,7 @@ void SwUndoInsTable::RedoImpl(::sw::UndoRedoContext & rContext) return; SwPaM aPam( *pTableNode->EndOfSectionNode(), *pTableNode, SwNodeOffset(1) ); - SwContentNode* pCNd = aPam.GetContentNode( false ); + SwContentNode* pCNd = aPam.GetMarkContentNode(); if( pCNd ) aPam.GetMark()->nContent.Assign( pCNd, 0 ); diff --git a/sw/source/core/undo/untblk.cxx b/sw/source/core/undo/untblk.cxx index a80c6502e38f..ac5b40dcfdb9 100644 --- a/sw/source/core/undo/untblk.cxx +++ b/sw/source/core/undo/untblk.cxx @@ -376,7 +376,7 @@ void SwUndoInserts::RedoImpl(::sw::UndoRedoContext & rContext) SwDoc& rDoc = rPam.GetDoc(); rPam.DeleteMark(); rPam.GetPoint()->nNode = m_nSttNode - m_nNodeDiff; - SwContentNode* pCNd = rPam.GetContentNode(); + SwContentNode* pCNd = rPam.GetPointContentNode(); rPam.GetPoint()->nContent.Assign( pCNd, m_nSttContent ); SwTextFormatColl* pSavTextFormatColl = m_pTextFormatColl; diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx index 92dbd6e5b25b..5b0e3f0865f5 100644 --- a/sw/source/core/unocore/unocrsr.cxx +++ b/sw/source/core/unocore/unocrsr.cxx @@ -137,13 +137,13 @@ bool SwUnoCursor::IsSelOvr( SwCursorSelOverFlags eFlags ) if( bValidPos ) { - SwContentNode* pCNd = GetContentNode(); + SwContentNode* pCNd = GetPointContentNode(); GetPoint()->nContent.Assign( pCNd, (pCNd && !bMoveDown) ? pCNd->Len() : 0); } else { rPtIdx = GetSavePos()->nNode; - GetPoint()->nContent.Assign( GetContentNode(), GetSavePos()->nContent ); + GetPoint()->nContent.Assign( GetPointContentNode(), GetSavePos()->nContent ); return true; } } @@ -184,8 +184,8 @@ void SwUnoTableCursor::MakeBoxSels() const SwContentNode* pCNd; bool bMakeTableCursors = true; if( GetPoint()->GetNodeIndex() && GetMark()->GetNodeIndex() && - nullptr != ( pCNd = GetContentNode() ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) && - nullptr != ( pCNd = GetContentNode(false) ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) ) + nullptr != ( pCNd = GetPointContentNode() ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) && + nullptr != ( pCNd = GetMarkContentNode() ) && pCNd->getLayoutFrame( pCNd->GetDoc().getIDocumentLayoutAccess().GetCurrentLayout() ) ) bMakeTableCursors = GetDoc().getIDocumentLayoutAccess().GetCurrentLayout()->MakeTableCursors( *this ); if ( !bMakeTableCursors ) diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 781752e9935a..9e24ebd8a4cf 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -964,12 +964,12 @@ void getNumberingProperty(SwPaM& rPam, PropertyState& eState, Any * pAny ) void GetCurPageStyle(SwPaM const & rPaM, OUString &rString) { - if (!rPaM.GetContentNode()) + if (!rPaM.GetPointContentNode()) return; // TODO: is there an easy way to get it for tables/sections? SwRootFrame* pLayout = rPaM.GetDoc().getIDocumentLayoutAccess().GetCurrentLayout(); // Consider the position inside the content node, since the node may span over multiple pages // with different page styles. - SwContentFrame* pFrame = rPaM.GetContentNode()->getLayoutFrame(pLayout, rPaM.GetPoint()); + SwContentFrame* pFrame = rPaM.GetPointContentNode()->getLayoutFrame(pLayout, rPaM.GetPoint()); if(pFrame) { const SwPageFrame* pPage = pFrame->FindPageFrame(); @@ -1452,7 +1452,7 @@ void makeTableRowRedline( SwTableLine& rTableLine, pDoc->getIDocumentContentOperations().InsertString( aPaM, OUStringChar(CH_TXT_TRACKED_DUMMY_CHAR) ); aPaM.SetMark(); - aPaM.GetMark()->nContent.Assign(aPaM.GetContentNode(), 0); + aPaM.GetMark()->nContent.Assign(aPaM.GetPointContentNode(), 0); makeRedline(aPaM, RedlineType::TableRowInsert == eType ? u"Insert" : u"Delete", rRedlineProperties); diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 6b0cbe6f305d..d531430a9eb4 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1236,8 +1236,8 @@ SwXTextCursor::gotoNextWord(sal_Bool Expand) SwUnoCursorHelper::SelectPam(rUnoCursor, Expand); // end of paragraph - if (rUnoCursor.GetContentNode() && - (pPoint->nContent == rUnoCursor.GetContentNode()->Len())) + if (rUnoCursor.GetPointContentNode() && + (pPoint->nContent == rUnoCursor.GetPointContentNode()->Len())) { rUnoCursor.Right(1); } @@ -1406,8 +1406,8 @@ SwXTextCursor::isEndOfSentence() SwUnoCursor & rUnoCursor( GetCursorOrThrow() ); // end of paragraph? - bool bRet = rUnoCursor.GetContentNode() && - (rUnoCursor.GetPoint()->nContent == rUnoCursor.GetContentNode()->Len()); + bool bRet = rUnoCursor.GetPointContentNode() && + (rUnoCursor.GetPoint()->nContent == rUnoCursor.GetPointContentNode()->Len()); // with mark->no sentence end // (check if cursor is no selection, i.e. it does not have // a mark or else point and mark are identical) @@ -2851,7 +2851,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) // update selection rUnoCursor.DeleteMark(); rUnoCursor.GetPoint()->nNode.Assign( aPrevIdx.GetNode(), +1 ); - SwContentNode *const pCNd = rUnoCursor.GetContentNode(); + SwContentNode *const pCNd = rUnoCursor.GetPointContentNode(); sal_Int32 nLen = pCNd->Len(); if (nLen > nCntStt) { @@ -2861,7 +2861,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) rUnoCursor.SetMark(); rUnoCursor.GetPoint()->nNode += nOffset; - SwContentNode *const pCNd2 = rUnoCursor.GetContentNode(); + SwContentNode *const pCNd2 = rUnoCursor.GetPointContentNode(); rUnoCursor.GetPoint()->nContent.Assign( pCNd2, pCNd2->Len() ); } diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx index 8e60a7cb394c..b4a3a6553c22 100644 --- a/sw/source/core/unocore/unoparagraph.cxx +++ b/sw/source/core/unocore/unoparagraph.cxx @@ -85,7 +85,7 @@ SwParaSelection::SwParaSelection(SwCursor & rCursor) m_rCursor.MovePara(GoCurrPara, fnParaStart); } // or at the end already? - if (m_rCursor.GetPoint()->nContent != m_rCursor.GetContentNode()->Len()) + if (m_rCursor.GetPoint()->nContent != m_rCursor.GetPointContentNode()->Len()) { m_rCursor.SetMark(); m_rCursor.MovePara(GoCurrPara, fnParaEnd); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index d38152b20aa0..19a7d7e5c30d 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -1071,7 +1071,7 @@ static void lcl_MoveCursor( SwUnoCursor * const pUnoCursor, const sal_Int32 nNextMarkIndex, const sal_Int32 nEndPos ) { - sal_Int32 nMovePos = pUnoCursor->GetContentNode()->Len(); + sal_Int32 nMovePos = pUnoCursor->GetPointContentNode()->Len(); if ((nEndPos >= 0) && (nEndPos < nMovePos)) { diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 3f5bd890d2ad..c792773cd765 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -368,7 +368,9 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt) SwNodeIndex aNodeIdx( *rPrtDoc.GetNodes().GetEndOfContent().StartOfSectionNode() ); SwTextNode* pTextNd = rPrtDoc.GetNodes().GoNext( &aNodeIdx )->GetTextNode(); SwContentNode *pLastNd = - pActCursor->GetContentNode( (*pActCursor->GetMark()) <= (*pActCursor->GetPoint()) ); + (*pActCursor->GetMark()) <= (*pActCursor->GetPoint()) + ? pActCursor->GetPointContentNode() + : pActCursor->GetMarkContentNode(); // copy the paragraph attributes of the first paragraph if( pLastNd && pLastNd->IsTextNode() ) static_cast(pLastNd)->CopyCollFormat( *pTextNd ); @@ -396,7 +398,9 @@ void SwViewShell::FillPrtDoc( SwDoc& rPrtDoc, const SfxPrinter* pPrt) if( pTextNd ) { SwContentNode *pFirstNd = - pFirstCursor->GetContentNode( (*pFirstCursor->GetMark()) > (*pFirstCursor->GetPoint()) ); + (*pFirstCursor->GetMark()) > (*pFirstCursor->GetPoint()) + ? pFirstCursor->GetPointContentNode() + : pFirstCursor->GetMarkContentNode(); // copy paragraph attributes of the first paragraph if( pFirstNd && pFirstNd->IsTextNode() ) static_cast(pFirstNd)->CopyCollFormat( *pTextNd ); diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 3d3e40a6807e..9c37a082cf58 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -183,7 +183,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) const sal_Int32 nSttContent = pPam->GetPoint()->GetContentIndex(); // make sure the End position is correct for all Readers - SwContentNode* pCNd = pPam->GetContentNode(); + SwContentNode* pCNd = pPam->GetPointContentNode(); sal_Int32 nEndContent = pCNd ? pCNd->Len() - nSttContent : 0; SwNodeIndex aEndPos( pPam->GetPoint()->GetNode(), 1 ); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index fbc89f00475d..5a7174325166 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1417,7 +1417,7 @@ void SwHTMLParser::StripTrailingPara() { bool bSetSmallFont = false; - SwContentNode* pCNd = m_pPam->GetContentNode(); + SwContentNode* pCNd = m_pPam->GetPointContentNode(); SwNodeOffset nNodeIdx = m_pPam->GetPoint()->GetNodeIndex(); if( !m_pPam->GetPoint()->GetContentIndex() ) { diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index dd3f4f78839b..a1eb92a17eae 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -813,7 +813,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) { if (!m_pPam->GetPoint()->GetContentIndex() && CanRemoveNode(nNodeIdx)) { - SwContentNode* pCNd = m_pPam->GetContentNode(); + SwContentNode* pCNd = m_pPam->GetPointContentNode(); if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() && !bHasFlysOrMarks ) { @@ -3032,7 +3032,7 @@ void SwHTMLParser::SetAttr_( bool bChkEnd, bool bBeforeTable, { pFrameFormat->DelFrames(); *aAttrPam.GetPoint() = *pFlyPos; - aAttrPam.GetPoint()->nContent.Assign( aAttrPam.GetContentNode(), + aAttrPam.GetPoint()->nContent.Assign( aAttrPam.GetPointContentNode(), m_aMoveFlyCnts[n] ); SwFormatAnchor aAnchor( rAnchor ); aAnchor.SetType( RndStdIds::FLY_AT_CHAR ); @@ -4612,7 +4612,7 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, const SwFormatColl *SwHTMLParser::GetCurrFormatColl() const { - const SwContentNode* pCNd = m_pPam->GetContentNode(); + const SwContentNode* pCNd = m_pPam->GetPointContentNode(); return pCNd ? &pCNd->GetAnyFormatColl() : nullptr; } diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index f0187d3a6230..ff5af1a68785 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -990,7 +990,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport ) const SwSectionFormat *pFormat = nullptr; rExport.m_pCurrentPageDesc = &rExport.m_rDoc.GetPageDesc( 0 ); - const SwNode* pNd = rExport.m_pCurPam->GetContentNode(); + const SwNode* pNd = rExport.m_pCurPam->GetPointContentNode(); const SfxItemSet* pSet = pNd ? &static_cast(pNd)->GetSwAttrSet() : nullptr; sal_uLong nRstLnNum = pSet ? pSet->Get( RES_LINENUMBER ).GetStartValue() : 0; diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 065be5d855c4..74605572486a 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2503,9 +2503,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper ) aUL.SetLower( static_cast< sal_uInt16 >(nSpace) ); const sal_Int32 nEnd = pSpacingPos->GetContentIndex(); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), 0); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), 0); m_xCtrlStck->NewAttr(*pSpacingPos, aUL); - rMyPam.GetPoint()->nContent.Assign(rMyPam.GetContentNode(), nEnd); + rMyPam.GetPoint()->nContent.Assign(rMyPam.GetPointContentNode(), nEnd); m_xCtrlStck->SetAttr(*pSpacingPos, RES_UL_SPACE); bRet = true; } @@ -3317,7 +3317,7 @@ void SwWW8ImplReader::emulateMSWordAddTextToParagraph(const OUString& rAddString sal_Int32 nLen = rAddString.getLength(); OUString sParagraphText; - const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwContentNode *pCntNd = m_pPaM->GetPointContentNode(); const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr; if (pNd) sParagraphText = pNd->GetText(); @@ -3462,7 +3462,7 @@ void SwWW8ImplReader::simpleAddTextToParagraph(const OUString& rAddString) if (addString.isEmpty()) return; - const SwContentNode *pCntNd = m_pPaM->GetContentNode(); + const SwContentNode *pCntNd = m_pPaM->GetPointContentNode(); const SwTextNode* pNd = pCntNd ? pCntNd->GetTextNode() : nullptr; OSL_ENSURE(pNd, "What the hell, where's my text node"); @@ -3628,7 +3628,7 @@ bool SwWW8ImplReader::ReadChar(tools::Long nPosCp, tools::Long nCpOfs) else if (!m_nInTable) { // Always insert a txtnode for a column break, e.g. ## - SwContentNode *pCntNd=m_pPaM->GetContentNode(); + SwContentNode *pCntNd=m_pPaM->GetPointContentNode(); if (pCntNd!=nullptr && pCntNd->Len()>0) // if par is empty not break is needed AppendTextNode(*m_pPaM->GetPoint()); m_rDoc.getIDocumentContentOperations().InsertPoolItem(*m_pPaM, SvxFormatBreakItem(SvxBreak::ColumnBefore, RES_BREAK)); @@ -4620,7 +4620,7 @@ void wwSectionManager::InsertSegments() aSectPaM.GetPoint()->Assign(*pTextNd); aSectPaM.GetPoint()->nContent.Assign( - aSectPaM.GetContentNode(), 0); + aSectPaM.GetPointContentNode(), 0); } aSectPaM.SetMark(); diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 89338e5d0a67..2cff6ea67ef2 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2742,7 +2742,7 @@ void WW8TabDesc::ParkPaM() } 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_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); m_pIo->m_rDoc.SetTextFormatColl(*m_pIo->m_pPaM, const_cast(m_pIo->m_pDfltTextFormatColl)); } } @@ -2984,7 +2984,7 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) m_pIo->m_pPaM->GetPoint()->nNode = nSttNd; } 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_pPaM->GetPoint()->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); // Precautionally set now, otherwise the style is not set for cells // that are inserted for margin balancing. m_pIo->m_rDoc.SetTextFormatColl(*m_pIo->m_pPaM, const_cast(m_pIo->m_pDfltTextFormatColl)); @@ -3009,9 +3009,9 @@ void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) SwPosition* pGridPos = m_pIo->m_pPaM->GetPoint(); const sal_Int32 nEnd = pGridPos->GetContentIndex(); - pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), 0); + pGridPos->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), 0); m_pIo->m_xCtrlStck->NewAttr(*pGridPos, aGridItem); - pGridPos->nContent.Assign(m_pIo->m_pPaM->GetContentNode(), nEnd); + pGridPos->nContent.Assign(m_pIo->m_pPaM->GetPointContentNode(), nEnd); m_pIo->m_xCtrlStck->SetAttr(*pGridPos, RES_PARATR_SNAPTOGRID); } diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx index aaf206016603..b124189ccd72 100644 --- a/sw/source/filter/xml/swxml.cxx +++ b/sw/source/filter/xml/swxml.cxx @@ -90,18 +90,18 @@ using namespace ::com::sun::star::lang; static void lcl_EnsureValidPam( SwPaM& rPam ) { - if( rPam.GetContentNode() != nullptr ) + if( rPam.GetPointContentNode() != nullptr ) { // set proper point content - if( rPam.GetContentNode() != rPam.GetPoint()->GetContentNode() ) + if( rPam.GetPointContentNode() != rPam.GetPoint()->GetContentNode() ) { - rPam.GetPoint()->nContent.Assign( rPam.GetContentNode(), 0 ); + rPam.GetPoint()->nContent.Assign( rPam.GetPointContentNode(), 0 ); } // else: point was already valid // if mark is invalid, we delete it - if( ( rPam.GetContentNode( false ) == nullptr ) || - ( rPam.GetContentNode( false ) != rPam.GetMark()->GetContentNode() ) ) + if( ( rPam.GetMarkContentNode() == nullptr ) || + ( rPam.GetMarkContentNode() != rPam.GetMark()->GetContentNode() ) ) { rPam.DeleteMark(); } diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 8816422d39ef..a0b201cda9cc 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -727,7 +727,7 @@ void SwXMLImport::endDocument() ( pPrev->IsEndNode() && pPrev->StartOfSectionNode()->IsSectionNode() ) ) { - SwContentNode* pCNd = pPaM->GetContentNode(); + SwContentNode* pCNd = pPaM->GetPointContentNode(); if( pCNd && pCNd->StartOfSectionIndex()+2 < pCNd->EndOfSectionIndex() ) { diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index ea6752eb7ea1..fcb030a974aa 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -5837,7 +5837,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCursor()->GetPoint()->Assign(nPosNodeIdx, nPosIdx); rSh.GetCursor()->GetMark()->nNode = nPosNodeIdx; rSh.GetCursor()->GetMark()->nContent = - rSh.GetCursor()->GetContentNode()->Len(); + rSh.GetCursor()->GetPointContentNode()->Len(); } else if( nPosNodeIdx == nMarkNodeIdx ) { @@ -5849,7 +5849,7 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) rSh.GetCursor()->GetMark()->Assign(nMarkNodeIdx, nMarkIdx); rSh.GetCursor()->GetPoint()->nNode = nMarkNodeIdx; rSh.GetCursor()->GetPoint()->nContent = - rSh.GetCursor()->GetContentNode( false )->Len(); + rSh.GetCursor()->GetMarkContentNode()->Len(); } rSh.EndCursorMove( true ); diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 3ec86b648786..c98e9056bfc1 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -651,13 +651,13 @@ bool SwView::ExecSpellPopup(const Point& rPt) !pCursor->HasMark() && !pCursor->IsMultiSelection()) { std::pair const tmp(rPt, false); - SwContentFrame *const pContentFrame = pCursor->GetContentNode()->getLayoutFrame( + SwContentFrame *const pContentFrame = pCursor->GetPointContentNode()->getLayoutFrame( pCursorShell->GetLayout(), &aPoint, &tmp); if (pContentFrame) { SwRect aRepaint(static_cast(pContentFrame)->AutoSpell_( - *pCursor->GetContentNode()->GetTextNode(), 0)); + *pCursor->GetPointContentNode()->GetTextNode(), 0)); if (aRepaint.HasArea()) m_pWrtShell->InvalidateWindows(aRepaint); } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 87165dff6599..d5a685c87349 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3235,7 +3235,7 @@ void SwXTextDocument::getTrackedChanges(tools::JsonWriter& rJson) rRedlineTable[i]->GetRedlineData().GetTimeStamp().GetUNODateTime()); rJson.put("dateTime", sDateTime); - SwContentNode* pContentNd = rRedlineTable[i]->GetContentNode(); + SwContentNode* pContentNd = rRedlineTable[i]->GetPointContentNode(); SwView* pView = dynamic_cast(SfxViewShell::Current()); if (pView && pContentNd) { -- cgit