diff options
Diffstat (limited to 'sw/source/core/crsr')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 25 | ||||
-rw-r--r-- | sw/source/core/crsr/crstrvl.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/crsr/pam.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/crsr/swcrsr.cxx | 32 | ||||
-rw-r--r-- | sw/source/core/crsr/trvlfnfl.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/crsr/trvlreg.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/crsr/trvltbl.cxx | 5 | ||||
-rw-r--r-- | sw/source/core/crsr/viscrs.cxx | 8 |
8 files changed, 46 insertions, 55 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 06cc3a4fd64a..04c904f13905 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -682,7 +682,7 @@ bool SwCursorShell::TrySelectOuterTable() pOuterTable->GetTable().CreateSelection(&firstCell.GetNode(), &lastCell.GetNode(), aNew, SwTable::SEARCH_NONE, false); // set table cursor to 1st / last content which may be in inner table - SwContentNode *const pStart = rNodes.GoNext(&firstCell); + SwContentNode* const pStart = SwNodes::GoNext(&firstCell); assert(pStart); // must at least find the previous point node lastCell = *lastCell.GetNode().EndOfSectionNode(); SwContentNode *const pEnd = SwNodes::GoPrevious(&lastCell); @@ -737,7 +737,7 @@ bool SwCursorShell::MoveStartText() assert(pStartNode); SwTableNode const*const pTable(pStartNode->FindTableNode()); m_pCurrentCursor->GetPoint()->Assign(*pStartNode); - GetDoc()->GetNodes().GoNext(m_pCurrentCursor->GetPoint()); + SwNodes::GoNext(m_pCurrentCursor->GetPoint()); while (m_pCurrentCursor->GetPoint()->GetNode().FindTableNode() != pTable && (!pTable || pTable->GetIndex() < m_pCurrentCursor->GetPoint()->GetNode().FindTableNode()->GetIndex()) && MoveOutOfTable()); @@ -759,7 +759,7 @@ void SwCursorShell::ExtendedSelectAll(bool bFootnotes) m_pCurrentCursor->Normalize(true); SwPosition* pPos = m_pCurrentCursor->GetPoint(); pPos->Assign(bFootnotes ? rNodes.GetEndOfPostIts() : static_cast<SwNode const&>(*pStartNode)); - rNodes.GoNext( pPos ); + SwNodes::GoNext(pPos); pPos = m_pCurrentCursor->GetMark(); pPos->Assign(bFootnotes ? rNodes.GetEndOfContent() : static_cast<SwNode const&>(*pStartNode->EndOfSectionNode())); SwContentNode* pCNd = SwNodes::GoPrevious( pPos ); @@ -840,7 +840,7 @@ SwCursorShell::ExtendedSelectedAll() const SwStartNode const* pStartNode(FindParentText(*pShellCursor)); SwNodeIndex nNode(*pStartNode); - SwContentNode* pStart = rNodes.GoNext(&nNode); + SwContentNode* pStart = SwNodes::GoNext(&nNode); if (!pStart) { return {}; @@ -1865,7 +1865,7 @@ static void lcl_CheckHiddenPara( SwPosition& rPos ) SwTextNode* pTextNd = aTmp.GetNode().GetTextNode(); while( pTextNd && pTextNd->HasHiddenCharAttribute( true ) ) { - SwContentNode* pContent = aTmp.GetNodes().GoNext( &aTmp ); + SwContentNode* pContent = SwNodes::GoNext(&aTmp); if ( pContent && pContent->IsTextNode() ) pTextNd = pContent->GetTextNode(); else @@ -3117,7 +3117,7 @@ bool SwCursorShell::IsStartOfDoc() const // after EndOfIcons comes the content selection (EndNd+StNd+ContentNd) SwNodeIndex aIdx( GetDoc()->GetNodes().GetEndOfExtras(), 2 ); if( !aIdx.GetNode().IsContentNode() ) - GetDoc()->GetNodes().GoNext( &aIdx ); + SwNodes::GoNext(&aIdx); return aIdx == m_pCurrentCursor->GetPoint()->GetNode(); } @@ -3345,7 +3345,7 @@ SwCursorShell::SwCursorShell( SwDoc& rDoc, vcl::Window *pInitWin, SwNodes& rNds = rDoc.GetNodes(); SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); - SwContentNode* pCNd = rNds.GoNext( &aNodeIdx ); // go to the first ContentNode + SwContentNode* pCNd = SwNodes::GoNext(&aNodeIdx); // go to the first ContentNode m_pCurrentCursor = new SwShellCursor( *this, SwPosition( aNodeIdx, pCNd, 0 ) ); @@ -3518,7 +3518,7 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText ) { // set to beginning of document rNdPos.Assign( mxDoc->GetNodes().GetEndOfExtras() ); - mxDoc->GetNodes().GoNext( &rNdPos ); + SwNodes::GoNext(&rNdPos); nNdIdx = rNdPos.GetNodeIndex(); } @@ -3572,7 +3572,7 @@ bool SwCursorShell::FindValidContentNode( bool bOnlyText ) for (;;) { if (bGoNextSection) - pCNd = rNds.GoNextSection( &rNdPos, + pCNd = SwNodes::GoNextSection( &rNdPos, true, !IsReadOnlyAvailable() ); else pCNd = SwNodes::GoPrevSection( &rNdPos, @@ -4002,9 +4002,8 @@ void SwCursorShell::ClearUpCursors() { // tdf#106959: When cursor points to start of a table, the proper content // node is the first one inside the table, not the previous one - SwNodes& aNodes = GetDoc()->GetNodes(); SwNodeIndex aIdx(pStartCursor->GetPoint()->GetNode()); - if (SwNode* pNode = aNodes.GoNext(&aIdx)) + if (SwNode* pNode = SwNodes::GoNext(&aIdx)) { SwPaM aTmpPam(*pNode); *pStartCursor = aTmpPam; @@ -4019,14 +4018,14 @@ void SwCursorShell::ClearUpCursors() SwNode * pNode = SwNodes::GoPrevious(&aIdx); if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart ) { - pNode = aNodes.GoNext( &aIdx ); + pNode = SwNodes::GoNext(&aIdx); if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart ) { // If the start entry of the ring is invalid replace it with a // cursor pointing to the beginning of the first content node in the // document. aIdx = *(aNodes.GetEndOfContent().StartOfSectionNode()); - pNode = aNodes.GoNext( &aIdx ); + pNode = SwNodes::GoNext(&aIdx); } } bool bFound = (pNode != nullptr); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 9fa8c76adf09..0a2c404ce399 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -237,7 +237,7 @@ bool SwCursorShell::SetCursorInHdFt(size_t nDescNo, bool bInHeader, bool bEven, SwNodeIndex aIdx( *pCnt->GetContentIdx(), 1 ); SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if( !pCNd ) - pCNd = pMyDoc->GetNodes().GoNext( &aIdx ); + pCNd = SwNodes::GoNext(&aIdx); Point aPt( m_pCurrentCursor->GetPtPos() ); @@ -283,7 +283,7 @@ bool SwCursorShell::GotoNextTOXBase( const OUString* pName ) SwNodeIndex aIdx(*pSectNd, 1); SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if (!pCNd) - pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); + pCNd = SwNodes::GoNext(&aIdx); if (pCNd && pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex()) { @@ -330,7 +330,7 @@ bool SwCursorShell::GotoPrevTOXBase( const OUString* pName ) SwNodeIndex aIdx(*pSectNd, 1); SwContentNode* pCNd = aIdx.GetNode().GetContentNode(); if (!pCNd) - pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); + pCNd = SwNodes::GoNext(&aIdx); if (pCNd && pCNd->EndOfSectionIndex() <= pSectNd->EndOfSectionIndex()) { @@ -437,7 +437,7 @@ bool SwCursorShell::GotoNxtPrvTableFormula( bool bNext, bool bOnlyErrors ) !pFormulaItem->HasValidBoxes() ) ) { SwNodeIndex aIdx( *pTBox->GetSttNd() ); - const SwContentNode* pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); + const SwContentNode* pCNd = SwNodes::GoNext(&aIdx); std::pair<Point, bool> const tmp(aPt, false); if (pCNd) { @@ -1693,7 +1693,7 @@ bool SwCursorShell::GetContentAtPos( const Point& rPt, SwCallLink aLk( *this ); // watch Cursor-Moves SwCursorSaveState aSaveState( *m_pCurrentCursor ); m_pCurrentCursor->GetPoint()->Assign( *static_cast<SwTextFootnote*>(pTextAttr)->GetStartNode() ); - SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( + SwContentNode* pCNd = SwNodes::GoNextSection( m_pCurrentCursor->GetPoint(), true, !IsReadOnlyAvailable() ); @@ -2563,7 +2563,7 @@ const SwRangeRedline* SwCursorShell::GotoRedline_( SwRedlineTable::size_type nAr SwPosition* pPtPos = m_pCurrentCursor->GetPoint(); if( !pPtPos->GetNode().IsContentNode() ) { - SwContentNode* pCNd = GetDoc()->GetNodes().GoNextSection( pPtPos, + SwContentNode* pCNd = SwNodes::GoNextSection(pPtPos, true, IsReadOnlyAvailable() ); if( pCNd ) { diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index 92f17cbbd24d..79d9718b59fd 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -395,7 +395,7 @@ bool GoPrevious( SwNode* pNd, SwContentIndex * pIdx, SwCursorSkipMode nMode ) SwContentNode* GoNextNds( SwNodeIndex* pIdx, bool bChk ) { SwNodeIndex aIdx( *pIdx ); - SwContentNode* pNd = aIdx.GetNodes().GoNext( &aIdx ); + SwContentNode* pNd = SwNodes::GoNext(&aIdx); if( pNd ) { if( bChk && SwNodeOffset(1) != aIdx.GetIndex() - pIdx->GetIndex() && @@ -425,7 +425,7 @@ SwContentNode* GoPreviousNds( SwNodeIndex * pIdx, bool bChk ) SwContentNode* GoNextPos( SwPosition* pIdx, bool bChk ) { SwNodeIndex aIdx( pIdx->GetNode() ); - SwContentNode* pNd = aIdx.GetNodes().GoNext( &aIdx ); + SwContentNode* pNd = SwNodes::GoNext(&aIdx); if( pNd ) { if( bChk && SwNodeOffset(1) != aIdx.GetIndex() - pIdx->GetNodeIndex() && @@ -1076,7 +1076,6 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const & { SwPosition aPos( *rPam.GetPoint() ); bool bSrchForward = &fnMove == &fnMoveForward; - SwNodes& rNodes = aPos.GetNodes(); // go to next/previous ContentNode while( true ) @@ -1088,7 +1087,7 @@ SwContentNode* GetNode( SwPaM & rPam, bool& rbFirst, SwMoveFnCollection const & } pNd = bSrchForward - ? rNodes.GoNextSection( &aPos, true, !bInReadOnly ) + ? SwNodes::GoNextSection( &aPos, true, !bInReadOnly ) : SwNodes::GoPrevSection( &aPos, true, !bInReadOnly ); if( pNd ) { @@ -1124,7 +1123,7 @@ void GoStartDoc( SwPosition * pPos ) SwNodes& rNodes = pPos->GetNodes(); pPos->Assign( *rNodes.GetEndOfContent().StartOfSectionNode() ); // we always need to find a ContentNode! - rNodes.GoNext( pPos ); + SwNodes::GoNext(pPos); } void GoEndDoc( SwPosition * pPos ) diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 1c29c2328467..3f31fd037a5c 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -255,12 +255,12 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags) sal_Int32 nContentPos = m_vSavePos.back().nContent; bool bGoNxt = m_vSavePos.back().nNode < rPtPos.GetNodeIndex(); SwContentNode* pCNd = bGoNxt - ? rNds.GoNextSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections) + ? SwNodes::GoNextSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections) : SwNodes::GoPrevSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections); if( !pCNd && ( SwCursorSelOverFlags::EnableRevDirection & eFlags )) { bGoNxt = !bGoNxt; - pCNd = bGoNxt ? rNds.GoNextSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections) + pCNd = bGoNxt ? SwNodes::GoNextSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections) : SwNodes::GoPrevSection( &rPtPos, bSkipOverHiddenSections, bSkipOverProtectSections); } @@ -281,7 +281,7 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags) { // then to the beginning of the document rPtPos.Assign( rNds.GetEndOfExtras() ); - pCNd = rNds.GoNext( &rPtPos ); + pCNd = SwNodes::GoNext(&rPtPos); } } } @@ -517,7 +517,7 @@ bool SwCursor::IsSelOvr(SwCursorSelOverFlags const eFlags) { pMyNd = bSelTop ? SwNodes::GoPrevSection( GetPoint(),true,false ) - : rNds.GoNextSection( GetPoint(),true,false ); + : SwNodes::GoNextSection( GetPoint(),true,false ); /* #i12312# Handle failure of Go{Prev|Next}Section */ if ( nullptr == pMyNd) @@ -623,7 +623,7 @@ GoNextCell: ++aCellStt; pCNd = aCellStt.GetNode().GetContentNode(); if( !pCNd ) - pCNd = aCellStt.GetNodes().GoNext( &aCellStt ); + pCNd = SwNodes::GoNext(&aCellStt); bProt = pCNd->IsProtect(); if( !bProt ) break; @@ -678,7 +678,7 @@ GoPrevCell: aCellStt.Assign( *pNd->StartOfSectionNode(), +1 ); pCNd = aCellStt.GetNode().GetContentNode(); if( !pCNd ) - pCNd = pNd->GetNodes().GoNext( &aCellStt ); + pCNd = SwNodes::GoNext(&aCellStt); bProt = pCNd->IsProtect(); if( !bProt ) break; @@ -895,13 +895,12 @@ static bool lcl_MakeSelFwrd( const SwNode& rSttNd, const SwNode& rEndNd, if( rSttNd.GetIndex() + 1 == rEndNd.GetIndex() ) return false; - SwNodes& rNds = rPam.GetDoc().GetNodes(); rPam.DeleteMark(); SwContentNode* pCNd; if( !bFirst ) { rPam.GetPoint()->Assign(rSttNd); - pCNd = rNds.GoNext( rPam.GetPoint() ); + pCNd = SwNodes::GoNext(rPam.GetPoint()); if( !pCNd ) return false; rPam.GetPoint()->AssignStartIndex(*pCNd); @@ -927,7 +926,6 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd, if( rEndNd.GetIndex() + 1 == rSttNd.GetIndex() ) return false; - SwNodes& rNds = rPam.GetDoc().GetNodes(); rPam.DeleteMark(); SwContentNode* pCNd; if( !bFirst ) @@ -944,7 +942,7 @@ static bool lcl_MakeSelBkwrd( const SwNode& rSttNd, const SwNode& rEndNd, rPam.SetMark(); rPam.GetPoint()->Assign(rEndNd); - pCNd = rNds.GoNext( rPam.GetPoint() ); + pCNd = SwNodes::GoNext(rPam.GetPoint()); if( !pCNd ) return false; rPam.GetPoint()->SetContent(0); @@ -1117,7 +1115,7 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const { case SwDocPositions::Start: rPos.Assign(*rNds.GetEndOfContent().StartOfSectionNode()); - pCNd = rNds.GoNext( &rPos ); + pCNd = SwNodes::GoNext(&rPos); break; case SwDocPositions::End: rPos.Assign(rNds.GetEndOfContent()); @@ -1126,7 +1124,7 @@ void SwCursor::FillFindPos( SwDocPositions ePos, SwPosition& rPos ) const break; case SwDocPositions::OtherStart: rPos.Assign( *rNds[ SwNodeOffset(0) ] ); - pCNd = rNds.GoNext( &rPos ); + pCNd = SwNodes::GoNext(&rPos); break; case SwDocPositions::OtherEnd: rPos.Assign( *rNds.GetEndOfContent().StartOfSectionNode() ); @@ -1890,7 +1888,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, SwNodeIndex aNewIdx( *pTableBox->GetSttNd() ); rPtPos.Assign( aNewIdx ); - GetDoc().GetNodes().GoNextSection( &rPtPos, false, false ); + SwNodes::GoNextSection(&rPtPos, false, false); SwContentNode* pContentNode = GetPointContentNode(); if ( pContentNode ) { @@ -1923,7 +1921,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, SwNodeIndex aNewIdx( *pTableBox->GetSttNd() ); rPtPos.Assign( aNewIdx ); - GetDoc().GetNodes().GoNextSection( &rPtPos, false, false ); + SwNodes::GoNextSection(&rPtPos, false, false); SwContentNode* pContentNode = GetPointContentNode(); if ( pContentNode ) { @@ -2244,7 +2242,7 @@ bool SwCursor::GoPrevNextCell( bool bNext, sal_uInt16 nCnt ) rPtPos.Adjust(SwNodeOffset(1)); if( !rPtPos.GetNode().IsContentNode() ) - GetDoc().GetNodes().GoNextSection( &rPtPos, true, false ); + SwNodes::GoNextSection(&rPtPos, true, false); GetPoint()->SetContent( 0 ); return !IsInProtectTable( true ); @@ -2451,7 +2449,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) SwNodeIndex aIdx( *pSttNd, 1 ); const SwNode* pNd = &aIdx.GetNode(); if( !pNd->IsContentNode() ) - pNd = rNds.GoNextSection( &aIdx, true, false ); + pNd = SwNodes::GoNextSection(&aIdx, true, false); SwPosition* pPos = pCur->GetMark(); if( pNd != &pPos->GetNode() ) @@ -2496,7 +2494,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pCurrentCursor ) break; SwNode* pNd = &aIdx.GetNode(); if( !pNd->IsContentNode() ) - pNd = rNds.GoNextSection( &aIdx, true, false ); + pNd = SwNodes::GoNextSection(&aIdx, true, false); SwPaM *const pNew = (!pCurrentCursor->IsMultiSelection() && !pCurrentCursor->HasMark()) ? pCurrentCursor diff --git a/sw/source/core/crsr/trvlfnfl.cxx b/sw/source/core/crsr/trvlfnfl.cxx index 369e6041340f..8cdf807acc55 100644 --- a/sw/source/core/crsr/trvlfnfl.cxx +++ b/sw/source/core/crsr/trvlfnfl.cxx @@ -74,7 +74,7 @@ bool SwCursor::GotoFootnoteText() SwCursorSaveState aSaveState( *this ); GetPoint()->Assign( *static_cast<SwTextFootnote*>(pFootnote)->GetStartNode() ); - SwContentNode* pCNd = GetDoc().GetNodes().GoNextSection( + SwContentNode* pCNd = SwNodes::GoNextSection( GetPoint(), true, !IsReadOnlyAvailable() ); if( pCNd ) diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 6ae638bd040a..1bcc4e81ea33 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -73,8 +73,7 @@ bool GotoPrevRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi else if( &fnPosRegion == &fnMoveForward ) { aIdx = *pNd; - SwContentNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx, - true, !bInReadOnly ); + SwContentNode* pCNd = SwNodes::GoNextSection(&aIdx, true, !bInReadOnly); if( !pCNd ) { --aIdx; @@ -148,8 +147,7 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi else if( &fnPosRegion == &fnMoveForward ) { aIdx = *pNd; - SwContentNode* pCNd = pNd->GetNodes().GoNextSection( &aIdx, - true, !bInReadOnly ); + SwContentNode* pCNd = SwNodes::GoNextSection(&aIdx, true, !bInReadOnly); if( !pCNd ) { aIdx.Assign( *pNd->EndOfSectionNode(), +1 ); @@ -203,7 +201,7 @@ bool GotoCurrRegionAndSkip( SwPaM& rCurrentCursor, SwMoveFnCollection const & fn else { SwNodeIndex aIdx( *pNd ); - pCNd = pNd->GetNodes().GoNextSection( &aIdx, true, !bInReadOnly ); + pCNd = SwNodes::GoNextSection(&aIdx, true, !bInReadOnly); if( !pCNd ) return false; pPos->Assign( aIdx ); diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index 689457d02863..b16b40122a26 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -359,12 +359,11 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly ) const SwNode* pTableEndNode = pTableNd->EndOfSectionNode(); - SwNodes& rNds = aTmp.GetNode().GetNodes(); SwContentNode* pCNd = aTmp.GetNode().GetContentNode(); // no content node => go to next content node if( !pCNd ) - pCNd = rNds.GoNext( &aTmp ); + pCNd = SwNodes::GoNext(&aTmp); // robust if ( !pCNd ) @@ -395,7 +394,7 @@ static bool lcl_FindNextCell( SwNodeIndex& rIdx, bool bInReadOnly ) // ok, get the next content node: pCNd = aTmp.GetNode().GetContentNode(); if( nullptr == pCNd ) - pCNd = rNds.GoNext( &aTmp ); + pCNd = SwNodes::GoNext(&aTmp); // robust: if ( !pCNd ) diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 2dd958b0c42b..0a0f5f186d93 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -1159,7 +1159,6 @@ void SwShellTableCursor::FillRects() SwRegionRects aReg( comphelper::LibreOfficeKit::isActive() ? GetShell()->getIDocumentLayoutAccess().GetCurrentLayout()->getFrameArea() : GetShell()->VisArea() ); - SwNodes& rNds = GetDoc().GetNodes(); SwFrame* pEndFrame = nullptr; for (size_t n = 0; n < m_SelectedBoxes.size(); ++n) { @@ -1167,7 +1166,7 @@ void SwShellTableCursor::FillRects() const SwTableNode* pSelTableNd = pSttNd->FindTableNode(); SwNodeIndex aIdx( *pSttNd ); - SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false ); + SwContentNode* pCNd = SwNodes::GoNextSection(&aIdx, true, false); // table in table // (see also lcl_FindTopLevelTable in unoobj2.cxx for a different @@ -1176,7 +1175,7 @@ void SwShellTableCursor::FillRects() while ( pSelTableNd != pCurTableNd && pCurTableNd ) { aIdx = pCurTableNd->EndOfSectionIndex(); - pCNd = rNds.GoNextSection( &aIdx, true, false ); + pCNd = SwNodes::GoNextSection(&aIdx, true, false); pCurTableNd = pCNd->FindTableNode(); } @@ -1225,11 +1224,10 @@ bool SwShellTableCursor::Contains( const Point& rPt ) const if (m_SelectedBoxes.empty() || m_bParked || !GetPoint()->GetNodeIndex()) return false; - SwNodes& rNds = GetDoc().GetNodes(); for (size_t n = 0; n < m_SelectedBoxes.size(); ++n) { SwNodeIndex aIdx( *m_SelectedBoxes[n]->GetSttNd() ); - SwContentNode* pCNd = rNds.GoNextSection( &aIdx, true, false ); + SwContentNode* pCNd = SwNodes::GoNextSection(&aIdx, true, false); if( !pCNd ) continue; |