sw/source/core/frmedt/fefly1.cxx | 10 +++++----- sw/source/core/frmedt/tblsel.cxx | 2 +- sw/source/core/layout/atrfrm.cxx | 8 ++++---- sw/source/core/layout/sortedobjs.cxx | 2 +- sw/source/core/layout/trvlfrm.cxx | 2 +- sw/source/core/table/swnewtable.cxx | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-)
New commits: commit c0a9108b417e9a1d8ef5c9e26b7e6b1b9aebf800 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Aug 20 17:05:12 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat Aug 20 18:35:23 2022 +0200 use more SwPosition::GetNode Change-Id: I602d52f1c2842ceec9006b40e7283d4785d8fd07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138592 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 5f6389d56c60..49c712dcc78b 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -502,7 +502,7 @@ Point SwFEShell::FindAnchorPos( const Point& rAbsPos, bool bMoveIt ) SwPosition aPos( GetDoc()->GetNodes().GetEndOfExtras() ); Point aTmpPnt( rAbsPos ); GetLayout()->GetModelPositionForViewPoint( &aPos, aTmpPnt, &aState ); - if (aPos.nNode != GetDoc()->GetNodes().GetEndOfExtras().GetIndex() + if (aPos.GetNode() != GetDoc()->GetNodes().GetEndOfExtras() && (nAnchorId != RndStdIds::FLY_AT_CHAR || !PosInsideInputField(aPos))) { SwContentNode* pCNode = aPos.GetNode().GetContentNode(); @@ -1448,8 +1448,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwFrameFormats& rSpzArr = *mxDoc->GetSpzFrameFormats(); if( !rSpzArr.empty() ) { - SwNodeIndex& rCursorNd = GetCursor()->GetPoint()->nNode; - if( rCursorNd.GetIndex() > mxDoc->GetNodes().GetEndOfExtras().GetIndex() ) + SwNode& rCursorNd = GetCursor()->GetPoint()->GetNode(); + if( rCursorNd > mxDoc->GetNodes().GetEndOfExtras() ) // Cursor is in the body area! return nullptr; @@ -1459,8 +1459,8 @@ SwFrameFormat* SwFEShell::WizardGetFly() SwStartNode* pSttNd; if( pIdx && nullptr != ( pSttNd = pIdx->GetNode().GetStartNode() ) && - pSttNd->GetIndex() < rCursorNd.GetIndex() && - rCursorNd.GetIndex() < pSttNd->EndOfSectionIndex() ) + *pSttNd < rCursorNd && + rCursorNd < *pSttNd->EndOfSectionNode() ) { // found: return immediately return pFormat; diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 1f32bf25f8d7..4ce167928794 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1375,7 +1375,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes, { pDoc->GetIDocumentUndoRedo().DoUndo(bUndo); } - SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode ); + SwNodeRange aRg( aSttNdIdx.GetNode(), aPam.GetPoint()->GetNode() ); ++rInsPosNd; if( pUndo ) pUndo->MoveBoxContent( *pDoc, aRg, rInsPosNd ); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 1fbbacf4758a..7b2d7276beff 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2977,13 +2977,13 @@ void SwFlyFrameFormat::MakeFrames() // #i105535# if ( pModify == nullptr ) { - const SwNodeIndex &rIdx = aAnchorAttr.GetContentAnchor()->nNode; + const SwNode & rNd = aAnchorAttr.GetContentAnchor()->GetNode(); SwFrameFormats& rFormats = *GetDoc()->GetSpzFrameFormats(); for( size_t i = 0; i < rFormats.size(); ++i ) { SwFrameFormat* pFlyFormat = rFormats[i]; if( pFlyFormat->GetContent().GetContentIdx() && - rIdx == *pFlyFormat->GetContent().GetContentIdx() ) + rNd == pFlyFormat->GetContent().GetContentIdx()->GetNode() ) { pModify = pFlyFormat; break; @@ -3327,8 +3327,8 @@ SwHandleAnchorNodeChg::SwHandleAnchorNodeChg( SwFlyFrameFormat& _rFlyFrameFormat if ( aOldAnchorFormat.GetAnchorId() == nNewAnchorType && aOldAnchorFormat.GetContentAnchor() && aOldAnchorFormat.GetContentAnchor()->GetNode().GetContentNode() && - aOldAnchorFormat.GetContentAnchor()->nNode != - _rNewAnchorFormat.GetContentAnchor()->nNode ) + aOldAnchorFormat.GetContentAnchor()->GetNode() != + _rNewAnchorFormat.GetContentAnchor()->GetNode() ) { // determine 'old' number of anchor frames sal_uInt32 nOldNumOfAnchFrame( 0 ); diff --git a/sw/source/core/layout/sortedobjs.cxx b/sw/source/core/layout/sortedobjs.cxx index d4add08ec8e6..f94ad4467396 100644 --- a/sw/source/core/layout/sortedobjs.cxx +++ b/sw/source/core/layout/sortedobjs.cxx @@ -125,7 +125,7 @@ struct ObjAnchorOrder const SwPosition* pContentAnchorListed = pAnchorListed->GetContentAnchor(); const SwPosition* pContentAnchorNew = pAnchorNew->GetContentAnchor(); if ( pContentAnchorListed && pContentAnchorNew && - pContentAnchorListed->nNode != pContentAnchorNew->nNode ) + pContentAnchorListed->GetNode() != pContentAnchorNew->GetNode() ) { return pContentAnchorListed->GetNode() < pContentAnchorNew->GetNode(); } diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index f8b171e70b58..702652f54575 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2031,7 +2031,7 @@ void SwRootFrame::CalcFrameRects(SwShellCursor &rCursor) getFrameArea() ); if( !pStartPos->GetNode().IsContentNode() || !pStartPos->GetNode().GetContentNode()->getLayoutFrame(this) || - ( pStartPos->nNode != pEndPos->nNode && + ( pStartPos->GetNode() != pEndPos->GetNode() && ( !pEndPos->GetNode().IsContentNode() || !pEndPos->GetNode().GetContentNode()->getLayoutFrame(this) ) ) ) { diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 5e7111553559..2c6122b26aaa 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -900,7 +900,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes, { pDoc->GetIDocumentUndoRedo().DoUndo(bUndo); } - SwNodeRange aRg( aSttNdIdx, aPam.GetPoint()->nNode ); + SwNodeRange aRg( aSttNdIdx.GetNode(), aPam.GetPoint()->GetNode() ); if( pUndo ) pUndo->MoveBoxContent( *pDoc, aRg, rInsPosNd ); else