sw/inc/crsrsh.hxx | 2 +- sw/source/core/crsr/crsrsh.cxx | 4 ++-- sw/source/core/doc/docdesc.cxx | 2 +- sw/source/core/docnode/ndtbl.cxx | 2 +- sw/source/core/frmedt/fefly1.cxx | 2 +- sw/source/core/frmedt/fetab.cxx | 2 +- sw/source/core/layout/atrfrm.cxx | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit e201a54ce653ba51863289a73af471634a75b218 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Sat Aug 6 15:11:23 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 7 11:18:50 2022 +0200 make ParkCursor take a SwNode, not an SwNodeIndex as part of the process of hiding the internals of SwPosition Change-Id: I5fde455225b5571bca7f461898146800837fa4cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 2a64da5f5d26..0b66682b9c92 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -338,7 +338,7 @@ public: void SetSelection(const SwPaM& rCursor); // remove all cursors from ContentNodes and set to 0 - void ParkCursor( const SwNodeIndex &rIdx ); + void ParkCursor( const SwNode &rIdx ); // return the current cursor stack // (required in EditShell when deleting contents) diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 63cce668c13e..7079b553329d 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2874,9 +2874,9 @@ void SwCursorShell::ParkPams( SwPaM* pDelRg, SwShellCursor** ppDelRing ) @param rIdx ??? */ -void SwCursorShell::ParkCursor( const SwNodeIndex &rIdx ) +void SwCursorShell::ParkCursor( const SwNode &rIdx ) { - SwNode *pNode = &rIdx.GetNode(); + const SwNode *pNode = &rIdx; // create a new PaM SwPaM aNew( *GetCursor()->GetPoint() ); diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 1ba9d86b480f..a12c80f01bda 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -484,7 +484,7 @@ void SwDoc::ChgPageDesc( size_t i, const SwPageDesc &rChged ) SwCursorShell* pShell = SwIterator<SwCursorShell, SwContentNode>(*static_cast<SwContentNode*>(pNode)).First(); if (pShell) { - pShell->ParkCursor(aIdx); + pShell->ParkCursor(aIdx.GetNode()); aIdx = nEnd - 1; } } diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9f8ab820b4a0..74b69f9caa95 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1928,7 +1928,7 @@ void SwDoc::DeleteCol( const SwCursor& rCursor ) if( pESh ) { const SwNode* pNd = rCursor.GetNode().FindTableBoxStartNode(); - pESh->ParkCursor( SwNodeIndex( *pNd ) ); + pESh->ParkCursor( *pNd ); } // Thus delete the Columns diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx index 3e414cc5458d..9b19e049583b 100644 --- a/sw/source/core/frmedt/fefly1.cxx +++ b/sw/source/core/frmedt/fefly1.cxx @@ -677,7 +677,7 @@ const SwFrameFormat *SwFEShell::NewFlyFrame( const SfxItemSet& rSet, bool bAnchV // Always put it after/on the table; via the // document position they will be set to the old // position - ParkCursor( SwNodeIndex( *aBoxes[0]->GetSttNd() )); + ParkCursor( *aBoxes[0]->GetSttNd() ); // #i127787# pCurrentCursor will be deleted in ParkCursor, // we better get the current pCurrentCursor instead of working with the diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index ce09668a739e..dc43cd1f29f9 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -1378,7 +1378,7 @@ bool SwFEShell::DeleteTableSel() // position they'll be set to the old position while( !pFrame->IsCellFrame() ) pFrame = pFrame->GetUpper(); - ParkCursor( SwNodeIndex( *static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetSttNd() )); + ParkCursor( *static_cast<SwCellFrame*>(pFrame)->GetTabBox()->GetSttNd() ); bRet = GetDoc()->DeleteRowCol( aBoxes ); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 7015fcb40eac..852ba0635444 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -196,7 +196,7 @@ static void lcl_DelHFFormat( SwClient *pToRemove, SwFrameFormat *pFormat ) SwCursorShell *pShell = SwIterator<SwCursorShell,SwContentNode>( *static_cast<SwContentNode*>(pNode) ).First(); if( pShell ) { - pShell->ParkCursor( aIdx ); + pShell->ParkCursor( aIdx.GetNode() ); aIdx = nEnd-1; } }