sw/source/core/access/accmap.cxx | 6 ++-- sw/source/core/crsr/crsrsh.cxx | 4 +- sw/source/core/crsr/crstrvl.cxx | 2 - sw/source/core/crsr/swcrsr.cxx | 2 - sw/source/core/crsr/trvlreg.cxx | 4 +- sw/source/core/crsr/trvltbl.cxx | 4 +- sw/source/core/doc/DocumentContentOperationsManager.cxx | 22 ++++++++-------- sw/source/core/doc/DocumentRedlineManager.cxx | 4 +- sw/source/core/doc/doccomp.cxx | 8 ++--- sw/source/core/doc/docedt.cxx | 6 ++-- sw/source/core/doc/docfmt.cxx | 4 +- sw/source/core/doc/docglbl.cxx | 4 +- sw/source/core/doc/docnum.cxx | 8 ++--- sw/source/core/doc/docredln.cxx | 2 - sw/source/core/doc/docsort.cxx | 4 +- sw/source/core/doc/tblrwcl.cxx | 2 - sw/source/core/docnode/ndsect.cxx | 8 ++--- sw/source/core/docnode/ndtbl.cxx | 4 +- sw/source/core/docnode/nodes.cxx | 4 +- sw/source/core/docnode/section.cxx | 2 - sw/source/core/draw/dcontact.cxx | 2 - sw/source/core/edit/autofmt.cxx | 4 +- sw/source/core/edit/edatmisc.cxx | 2 - sw/source/core/edit/edattr.cxx | 2 - sw/source/core/edit/edsect.cxx | 10 +++---- sw/source/core/frmedt/fecopy.cxx | 4 +- sw/source/core/frmedt/fews.cxx | 2 - sw/source/core/layout/atrfrm.cxx | 2 - sw/source/core/layout/flycnt.cxx | 2 - sw/source/core/layout/flylay.cxx | 2 - sw/source/core/txtnode/ndtxt.cxx | 2 - sw/source/core/undo/undel.cxx | 4 +- sw/source/core/undo/undobj.cxx | 4 +- sw/source/core/undo/unredln.cxx | 4 +- sw/source/core/undo/untbl.cxx | 2 - sw/source/core/unocore/unocrsrhelper.cxx | 2 - sw/source/core/unocore/unoobj.cxx | 2 - sw/source/core/unocore/unotext.cxx | 2 - sw/source/filter/basflt/fltshell.cxx | 6 ++-- sw/source/filter/basflt/shellio.cxx | 2 - sw/source/filter/html/htmlgrin.cxx | 2 - sw/source/filter/html/htmlsect.cxx | 4 +- sw/source/filter/html/htmltab.cxx | 2 - sw/source/filter/html/swhtml.cxx | 2 - sw/source/filter/html/wrthtml.cxx | 2 - sw/source/filter/ww8/ww8par.cxx | 2 - sw/source/filter/ww8/ww8par6.cxx | 14 +++++----- sw/source/uibase/uiview/viewling.cxx | 2 - 48 files changed, 98 insertions(+), 98 deletions(-)
New commits: commit 25a299a8859e82fe0fdafc2bb70680aed54d3887 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Fri Aug 12 09:45:35 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sun Aug 14 09:03:59 2022 +0200 use more SwPosition::GetNode instead of nNode as part of the process of hiding the internals of SwPosition. This just changes the places we are passing nNode to the constructor of SwNodeIndex Change-Id: I3dffba5df6c044a69da27b6a1254592695b976af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index 632591ddfe93..8a1d8abc2022 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -1365,8 +1365,8 @@ void SwAccessibleMap::InvalidateShapeInParaSelection() { if( rTmpCursor.HasMark() ) { - SwNodeIndex nStartIndex( rTmpCursor.Start()->nNode ); - SwNodeIndex nEndIndex( rTmpCursor.End()->nNode ); + SwNodeIndex nStartIndex( rTmpCursor.Start()->GetNode() ); + SwNodeIndex nEndIndex( rTmpCursor.End()->GetNode() ); for (; nStartIndex <= nEndIndex; ++nStartIndex) { SwFrame *pFrame = nullptr; @@ -3280,7 +3280,7 @@ std::unique_ptr<SwAccessibleSelectedParas_Impl> SwAccessibleMap::BuildSelectedPa { auto [pStartPos, pEndPos] = pCursor->StartEnd(); // SwPosition* // loop on all text nodes inside the selection - SwNodeIndex aIdx( pStartPos->nNode ); + SwNodeIndex aIdx( pStartPos->GetNode() ); for ( ; aIdx.GetIndex() <= pEndPos->GetNodeIndex(); ++aIdx ) { SwTextNode* pTextNode( aIdx.GetNode().GetTextNode() ); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index f0cd5ac9a493..afd523c55ae3 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1530,7 +1530,7 @@ static bool lcl_CheckHiddenSection( SwNodeIndex& rIdx ) /// Try to set the cursor to the next visible content node. static void lcl_CheckHiddenPara( SwPosition& rPos ) { - SwNodeIndex aTmp( rPos.nNode ); + SwNodeIndex aTmp( rPos.GetNode() ); SwTextNode* pTextNd = aTmp.GetNode().GetTextNode(); while( pTextNd && pTextNd->HasHiddenCharAttribute( true ) ) { @@ -3643,7 +3643,7 @@ void SwCursorShell::ClearUpCursors() { SwNodes & aNodes = GetDoc()->GetNodes(); const SwNode* pStart = lcl_NodeContext( pStartCursor->GetPoint()->GetNode() ); - SwNodeIndex aIdx( pStartCursor->GetPoint()->nNode ); + SwNodeIndex aIdx( pStartCursor->GetPoint()->GetNode() ); SwNode * pNode = SwNodes::GoPrevious(&aIdx); if( pNode == nullptr || lcl_NodeContext( *pNode ) != pStart ) aNodes.GoNext( &aIdx ); diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 3d03a483c646..01de0e18338e 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2241,7 +2241,7 @@ bool SwCursorShell::SetShadowCursorPos( const Point& rPt, SwFillMode eFillMode ) const SwSectionNode* pSectNd = pCNd ? pCNd->FindSectionNode() : nullptr; if( pSectNd && aFPos.nParaCnt ) { - SwNodeIndex aEnd( aPos.nNode, 1 ); + SwNodeIndex aEnd( aPos.GetNode(), 1 ); while( aEnd.GetNode().IsEndNode() && &aEnd.GetNode() != pSectNd->EndOfSectionNode() ) diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 30da6b644ea0..796ee5c53b49 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -1769,7 +1769,7 @@ bool SwCursor::LeftRight( bool bLeft, sal_uInt16 nCnt, SwCursorSkipMode nMode, while( nCnt ) { - SwNodeIndex aOldNodeIdx( GetPoint()->nNode ); + SwNodeIndex aOldNodeIdx( GetPoint()->GetNode() ); TextFrameIndex beforeIndex(-1); if (pFrame) diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx index 8f5fb4a2309a..c66692005d71 100644 --- a/sw/source/core/crsr/trvlreg.cxx +++ b/sw/source/core/crsr/trvlreg.cxx @@ -32,7 +32,7 @@ bool GotoPrevRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi bool bInReadOnly ) { SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); - SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->GetNode() ); SwSectionNode* pNd = aIdx.GetNode().FindSectionNode(); if( pNd ) aIdx.Assign( *pNd, -1 ); @@ -107,7 +107,7 @@ bool GotoNextRegion( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosRegi bool bInReadOnly ) { SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); - SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->GetNode() ); SwSectionNode* pNd = aIdx.GetNode().FindSectionNode(); if( pNd ) aIdx.Assign( *pNd->EndOfSectionNode(), - 1 ); diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx index e8df01fa2db8..b431d9f48e13 100644 --- a/sw/source/core/crsr/trvltbl.cxx +++ b/sw/source/core/crsr/trvltbl.cxx @@ -483,7 +483,7 @@ bool GotoPrevTable( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosTable { SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); - SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->GetNode() ); SwTableNode* pTableNd = aIdx.GetNode().FindTableNode(); if( pTableNd ) @@ -562,7 +562,7 @@ bool GotoNextTable( SwPaM& rCurrentCursor, SwMoveFnCollection const & fnPosTable { SvxSearchDialogWrapper::SetSearchLabel( SearchLabel::Empty ); - SwNodeIndex aIdx( rCurrentCursor.GetPoint()->nNode ); + SwNodeIndex aIdx( rCurrentCursor.GetPoint()->GetNode() ); SwTableNode* pTableNd = aIdx.GetNode().FindTableNode(); if( pTableNd ) diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index b7328a40bb24..759cb5024848 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -475,7 +475,7 @@ namespace pEndTextNd && pEndTextNd->IsInList() ) { bRet = true; - SwNodeIndex aIdx(rPam.Start()->nNode); + SwNodeIndex aIdx(rPam.Start()->GetNode()); do { @@ -1305,8 +1305,8 @@ namespace //local functions originally from docfmt.cxx SwDoc& rDoc, const SwPaM &rRg) { - SwNodeIndex aIdx( rRg.Start()->nNode ); - const SwNodeIndex aEndNd( rRg.End()->nNode ); + SwNodeIndex aIdx( rRg.Start()->GetNode() ); + const SwNodeIndex aEndNd( rRg.End()->GetNode() ); while( aIdx <= aEndNd ) { SwTextNode *pNode = aIdx.GetNode().GetTextNode(); @@ -2689,7 +2689,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod void DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPos ) { - SwNodeIndex aIdx( rPaM.Start()->nNode ); + SwNodeIndex aIdx( rPaM.Start()->GetNode() ); bool bJoinText = aIdx.GetNode().IsTextNode(); bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode; aIdx--; // in front of the move area! @@ -2990,7 +2990,7 @@ void DocumentContentOperationsManager::TransliterateText( const bool bIsTitleCase = rTrans.getType() == TransliterationFlags::TITLE_CASE; sal_uLong nAffectedNodes = 0; sal_uLong nAffectedChars = nEndCnt; - SwNodeIndex aIdx( pStt->nNode ); + SwNodeIndex aIdx( pStt->GetNode() ); for( ; aIdx.GetIndex() <= nEndNd; ++aIdx ) { SwTextNode* pAffectedNode = aIdx.GetNode().GetTextNode(); @@ -3024,7 +3024,7 @@ void DocumentContentOperationsManager::TransliterateText( // iterate over all affected text nodes, the first and the last one // may be incomplete because the selection starts and/or ends there - SwNodeIndex aIdx( pStt->nNode ); + SwNodeIndex aIdx( pStt->GetNode() ); if( nSttCnt ) { ++aIdx; @@ -3421,7 +3421,7 @@ bool DocumentContentOperationsManager::AppendTextNode( SwPosition& rPos ) if( !pCurNode ) { // so then one can be created! - SwNodeIndex aIdx( rPos.nNode, 1 ); + SwNodeIndex aIdx( rPos.GetNode(), 1 ); pCurNode = m_rDoc.GetNodes().MakeTextNode( aIdx.GetNode(), m_rDoc.getIDocumentStylePoolAccess().GetTextCollFromPool( RES_POOLCOLL_STANDARD )); } @@ -4351,7 +4351,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet &pStt->nContent, &pEnd->nContent); - SwNodeIndex aSttIdx( pStt->nNode ); + SwNodeIndex aSttIdx( pStt->GetNode() ); SwContentNode * pCNd = aSttIdx.GetNode().GetContentNode(); do { // middle checked loop! @@ -4537,7 +4537,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt aDelPam.Exchange(); // Remember the End - SwNodeIndex aPtNd( aDelPam.GetPoint()->nNode, -1 ); + SwNodeIndex aPtNd( aDelPam.GetPoint()->GetNode(), -1 ); const sal_Int32 nPtCnt = aDelPam.GetPoint()->GetContentIndex(); bool bFirst = true; @@ -4547,7 +4547,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt InsertString( aDelPam, sIns ); if( bFirst ) { - SwNodeIndex aMkNd( aDelPam.GetMark()->nNode, -1 ); + SwNodeIndex aMkNd( aDelPam.GetMark()->GetNode(), -1 ); const sal_Int32 nMkCnt = aDelPam.GetMark()->GetContentIndex(); SplitNode( *aDelPam.GetPoint(), false ); @@ -4645,7 +4645,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt if( aDelPam.GetPoint() != pStt ) aDelPam.Exchange(); - SwNodeIndex aPtNd( pStt->nNode, -1 ); + SwNodeIndex aPtNd( pStt->GetNode(), -1 ); const sal_Int32 nPtCnt = pStt->GetContentIndex(); // Set the values again, if Frames or footnotes on the Text have been removed. diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 01ddc18e9538..b7faa6c43b29 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -3134,7 +3134,7 @@ const SwRangeRedline* DocumentRedlineManager::SelNextRedline( SwPaM& rPam ) cons const SwPosition* pEnd = pFnd->End(); if( !pEnd->GetNode().IsContentNode() ) { - SwNodeIndex aTmp( pEnd->nNode ); + SwNodeIndex aTmp( pEnd->GetNode() ); SwContentNode* pCNd = SwNodes::GoPrevSection( &aTmp ); if( !pCNd || ( aTmp == rSttPos.nNode && pCNd->Len() == rSttPos.GetContentIndex() )) @@ -3260,7 +3260,7 @@ const SwRangeRedline* DocumentRedlineManager::SelPrevRedline( SwPaM& rPam ) cons const SwPosition* pStt = pFnd->Start(); if( !pStt->GetNode().IsContentNode() ) { - SwNodeIndex aTmp( pStt->nNode ); + SwNodeIndex aTmp( pStt->GetNode() ); SwContentNode* pCNd = m_rDoc.GetNodes().GoNextSection( &aTmp ); if( !pCNd || ( aTmp == rSttPos.nNode && !rSttPos.GetContentIndex() )) diff --git a/sw/source/core/doc/doccomp.cxx b/sw/source/core/doc/doccomp.cxx index e526f6c5946b..672f20ab492f 100644 --- a/sw/source/core/doc/doccomp.cxx +++ b/sw/source/core/doc/doccomp.cxx @@ -1566,7 +1566,7 @@ void CompareData::ShowDelete( SwPaM* pCorr = m_pInsertRing->GetPrev(); if( *pCorr->GetPoint() == *pTmp->GetPoint() ) { - SwNodeIndex aTmpPos( pTmp->GetMark()->nNode, -1 ); + SwNodeIndex aTmpPos( pTmp->GetMark()->GetNode(), -1 ); *pCorr->GetPoint() = SwPosition( aTmpPos ); } } @@ -1679,7 +1679,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) // tdf#106218 try to avoid losing a paragraph break here: if (pTmp->GetMark()->nContent == 0) { - SwNodeIndex const prev(pTmp->GetMark()->nNode, -1); + SwNodeIndex const prev(pTmp->GetMark()->GetNode(), -1); if (prev.GetNode().IsTextNode()) { *pTmp->GetMark() = SwPosition( @@ -1722,7 +1722,7 @@ void CompareData::SetRedlinesToDoc( bool bUseDocInfo ) // tdf#106218 try to avoid losing a paragraph break here: if (pTmp->GetMark()->nContent == 0) { - SwNodeIndex const prev(pTmp->GetMark()->nNode, -1); + SwNodeIndex const prev(pTmp->GetMark()->GetNode(), -1); if (prev.GetNode().IsTextNode()) { *pTmp->GetMark() = SwPosition( @@ -1945,7 +1945,7 @@ sal_uInt16 SaveMergeRedline::InsertRedline(SwPaM* pLastDestRedline) // the part was inserted so copy it from the SourceDoc ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); - SwNodeIndex aSaveNd( pDestRedl->GetPoint()->nNode, -1 ); + SwNodeIndex aSaveNd( pDestRedl->GetPoint()->GetNode(), -1 ); const sal_Int32 nSaveCnt = pDestRedl->GetPoint()->GetContentIndex(); RedlineFlags eOld = rDoc.getIDocumentRedlineAccess().GetRedlineFlags(); diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 116f023f4db3..77a8b1245d70 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -357,7 +357,7 @@ void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev ) bool sw_JoinText( SwPaM& rPam, bool bJoinPrev ) { - SwNodeIndex aIdx( rPam.GetPoint()->nNode ); + SwNodeIndex aIdx( rPam.GetPoint()->GetNode() ); SwTextNode *pTextNd = aIdx.GetNode().GetTextNode(); SwNodeIndex aOldIdx( aIdx ); SwTextNode *pOldTextNd = pTextNd; @@ -808,7 +808,7 @@ uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( pPam->Exchange(); SwHyphArgs aHyphArg( pPam, rCursorPos, pPageCnt, pPageSt ); - SwNodeIndex aTmpIdx( pPam->GetMark()->nNode, 1 ); + SwNodeIndex aTmpIdx( pPam->GetMark()->GetNode(), 1 ); GetNodes().ForEach( pPam->GetPoint()->nNode, aTmpIdx, lcl_HyphenateNode, &aHyphArg ); aHyphArg.SetPam( pPam ); @@ -846,7 +846,7 @@ void SwDoc::CountWords( const SwPaM& rPaM, SwDocStat& rStat ) if( nSttNd != nEndNd ) { - SwNodeIndex aIdx( pStt->nNode ); + SwNodeIndex aIdx( pStt->GetNode() ); if( nSttCnt ) { ++aIdx; diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 702bdd6edbee..c6399b31344f 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -335,8 +335,8 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, aPara.pDelSet = &aDelSet; bool bAdd = true; - SwNodeIndex aTmpStt( pStt->nNode ); - SwNodeIndex aTmpEnd( pEnd->nNode ); + SwNodeIndex aTmpStt( pStt->GetNode() ); + SwNodeIndex aTmpEnd( pEnd->GetNode() ); if( pStt->GetContentIndex() ) // just one part { // set up a later, and all CharFormatAttr -> TextFormatAttr diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx index b1e85e546872..7148942f1d45 100644 --- a/sw/source/core/doc/docglbl.cxx +++ b/sw/source/core/doc/docglbl.cxx @@ -353,8 +353,8 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline, if( nNodeDiff ) { SwPaM aTmp( *pStartNd, aEndIdx.GetNode(), SwNodeOffset(1), SwNodeOffset(-1) ); - SwNodeIndex aSIdx( aTmp.GetMark()->nNode ); - SwNodeIndex aEIdx( aTmp.GetPoint()->nNode ); + SwNodeIndex aSIdx( aTmp.GetMark()->GetNode() ); + SwNodeIndex aEIdx( aTmp.GetPoint()->GetNode() ); // Try to move past the end if( !aTmp.Move( fnMoveForward, GoInNode ) ) diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 68e3a4727817..04601bc21214 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -457,7 +457,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam, SwOutlineNodes::difference_type } SwOutlineNodes::size_type nCurrentPos = 0; - SwNodeIndex aSttRg( rStt.nNode ), aEndRg( rEnd.nNode ); + SwNodeIndex aSttRg( rStt.GetNode() ), aEndRg( rEnd.GetNode() ); int nOutLineLevel = MAXLEVEL; SwNode* pSrch = &aSttRg.GetNode(); @@ -1506,7 +1506,7 @@ static bool lcl_GotoNextPrevNum( SwPosition& rPos, bool bNext, sal_uInt8 nSrchNum = static_cast<sal_uInt8>(pNd->GetActualListLevel()); - SwNodeIndex aIdx( rPos.nNode ); + SwNodeIndex aIdx( rPos.GetNode() ); if( ! pNd->IsCountedInList() ) { bool bError = false; @@ -1630,7 +1630,7 @@ const SwNumRule * SwDoc::SearchNumRule(const SwPosition & rPos, if (pTextNd) { - SwNodeIndex aIdx(rPos.nNode); + SwNodeIndex aIdx(rPos.GetNode()); // - the start node has also been investigated, if requested. const SwNode * pNode = nullptr; @@ -2286,7 +2286,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, { pOwnRedl = rTable[nRedlPosWithEmpty]; SwPosition *pRPos = nOffset < SwNodeOffset(0) ? pOwnRedl->End() : pOwnRedl->Start(); - SwNodeIndex aIdx2 ( pRPos->nNode ); + SwNodeIndex aIdx2 ( pRPos->GetNode() ); SwTextNode const*const pEmptyNode0(aIdx2.GetNode().GetTextNode()); if ( nOffset < SwNodeOffset(0) ) { diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 2e545622bd6e..586ef850f40e 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -1785,7 +1785,7 @@ void SwRangeRedline::MoveFromSection(size_t nMyPos) aPam.GetMark()->nNode ? pCNd->GetFormatColl() : nullptr; - SwNodeIndex aNdIdx( GetPoint()->nNode, -1 ); + SwNodeIndex aNdIdx( GetPoint()->GetNode(), -1 ); const sal_Int32 nPos = GetPoint()->GetContentIndex(); SwPosition aPos( *GetPoint() ); diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx index cb25e057c791..500e1ba4bc83 100644 --- a/sw/source/core/doc/docsort.cxx +++ b/sw/source/core/doc/docsort.cxx @@ -366,7 +366,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) } } - SwNodeIndex aStart(pStart->nNode); + SwNodeIndex aStart(pStart->GetNode()); SwSortElement::Init( this, rOpt ); std::multiset<SwSortTextElement> aSortSet; while( aStart <= pEnd->nNode ) @@ -439,7 +439,7 @@ bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt) if( pRedlUndo ) { - SwNodeIndex aInsEndIdx( pRedlPam->GetMark()->nNode, -1 ); + SwNodeIndex aInsEndIdx( pRedlPam->GetMark()->GetNode(), -1 ); pRedlPam->GetMark()->nNode = aInsEndIdx; SwContentNode *const pPrevNode = pRedlPam->GetMark()->GetNode().GetContentNode(); diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx index fb9382938186..89aec4b6a8ab 100644 --- a/sw/source/core/doc/tblrwcl.cxx +++ b/sw/source/core/doc/tblrwcl.cxx @@ -2085,7 +2085,7 @@ bool SwTable::MakeCopy( SwDoc& rInsDoc, const SwPosition& rPos, if( !pNewTable ) return false; - SwNodeIndex aIdx( rPos.nNode, -1 ); + SwNodeIndex aIdx( rPos.GetNode(), -1 ); SwTableNode* pTableNd = aIdx.GetNode().FindTableNode(); ++aIdx; OSL_ENSURE( pTableNd, "Where is the TableNode now?" ); diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 816f54715c73..555e550a14a8 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -214,7 +214,7 @@ SwDoc::InsertSwSection(SwPaM const& rRange, SwSectionData & rNewData, if( pPrvNd && 3 == nRegionRet ) { OSL_ENSURE( pPrvNd, "The SectionNode is missing" ); - SwNodeIndex aStt( pSttPos->nNode ), aEnd( pEndPos->nNode, +1 ); + SwNodeIndex aStt( pSttPos->GetNode() ), aEnd( pEndPos->GetNode(), +1 ); while( pPrvNd != aStt.GetNode().StartOfSectionNode() ) --aStt; while( pPrvNd != aEnd.GetNode().StartOfSectionNode() ) @@ -409,7 +409,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, && pSectNd->GetIndex() == pStt->GetNodeIndex() - 1 && pEnd->GetContentIndex() == pCNd->Len() ) { - SwNodeIndex aIdx( pStt->nNode, -1 ); + SwNodeIndex aIdx( pStt->GetNode(), -1 ); SwNodeOffset nCmp = pEnd->GetNodeIndex(); const SwStartNode* pPrvNd; const SwEndNode* pNxtNd; @@ -451,7 +451,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, nRet = 0; if( pEnd->GetContentIndex() == pCNd->Len() ) { - SwNodeIndex aIdx( pEnd->nNode, 1 ); + SwNodeIndex aIdx( pEnd->GetNode(), 1 ); if( aIdx.GetNode().IsEndNode() && nullptr != aIdx.GetNode().FindSectionNode() ) { @@ -477,7 +477,7 @@ sal_uInt16 SwDoc::IsInsRegionAvailable( const SwPaM& rRange, nRet = 0; if( !pStt->GetContentIndex() ) { - SwNodeIndex aIdx( pStt->nNode, -1 ); + SwNodeIndex aIdx( pStt->GetNode(), -1 ); if( aIdx.GetNode().IsSectionNode() ) { do { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index 9d345c9dcd56..67eac9eb23d6 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -1083,7 +1083,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, nChPos = 0; // Set the TableNode as StartNode for all TextNodes in the Table - const SwNodeIndex aTmpIdx( aCntPos.nNode, -1 ); + const SwNodeIndex aTmpIdx( aCntPos.GetNode(), -1 ); pSttNd = new SwStartNode( aTmpIdx.GetNode(), SwNodeType::Start, SwTableBoxStartNode ); new SwEndNode( aCntPos.GetNode(), *pSttNd ); @@ -1105,7 +1105,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh, pContentStore->Restore( *pTextNd, pTextNd->GetText().getLength(), pTextNd->GetText().getLength()+1 ); pSttNd = new SwStartNode( aCntPos.GetNode(), SwNodeType::Start, SwTableBoxStartNode ); - const SwNodeIndex aTmpIdx( aCntPos.nNode, 1 ); + const SwNodeIndex aTmpIdx( aCntPos.GetNode(), 1 ); new SwEndNode( aTmpIdx.GetNode(), *pSttNd ); pTextNd->m_pStartOfSection = pSttNd; diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index e5364783b848..739ef2932241 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1478,8 +1478,8 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) if( this == &rNodes && *pStt <= rPos && rPos < *pEnd ) return; - SwNodeIndex aEndIdx( pEnd->nNode ); - SwNodeIndex aSttIdx( pStt->nNode ); + SwNodeIndex aEndIdx( pEnd->GetNode() ); + SwNodeIndex aSttIdx( pStt->GetNode() ); SwTextNode *const pSrcNd = aSttIdx.GetNode().GetTextNode(); SwTextNode * pDestNd = rPos.GetNode().GetTextNode(); bool bSplitDestNd = true; diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 59e29b863b64..4329a5633088 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1198,7 +1198,7 @@ static void lcl_UpdateLinksInSect( const SwBaseLink& rUpdLnk, SwSectionNode& rSe { rSection.SetConnectFlag(); - SwNodeIndex aSave( pPam->GetPoint()->nNode, -1 ); + SwNodeIndex aSave( pPam->GetPoint()->GetNode(), -1 ); std::optional<SwNodeRange> oCpyRg; if( xDocSh->GetMedium() && diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 84de9b73f94b..8a76709d9ddf 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1873,7 +1873,7 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) { if ( pAnch->GetAnchorId() == RndStdIds::FLY_AT_FLY ) { - SwNodeIndex aIdx( pAnch->GetContentAnchor()->nNode ); + SwNodeIndex aIdx( pAnch->GetContentAnchor()->GetNode() ); SwContentNode* pCNd = pDrawFrameFormat->GetDoc()->GetNodes().GoNext( &aIdx ); if (SwIterator<SwFrame, SwContentNode, sw::IteratorMode::UnwrapMulti>(*pCNd).First()) pModify = pCNd; diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index fc35471c63c8..60b5848da13e 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -675,7 +675,7 @@ bool SwAutoFormat::DoTable() // then create a table that matches the character DelEmptyLine(); // WARNING: rTmp may be deleted now, m_pCurTextFrame may be nullptr - SwNodeIndex aIdx( m_aDelPam.GetPoint()->nNode ); + SwNodeIndex aIdx( m_aDelPam.GetPoint()->GetNode() ); m_aDelPam.Move( fnMoveForward ); m_pDoc->InsertTable( SwInsertTableOptions( SwInsertTableFlags::All , 1 ), *m_aDelPam.GetPoint(), 1, nColCnt, eHori, @@ -2753,7 +2753,7 @@ void SwEditShell::AutoFormatBySplitNode() else { // then go one node backwards - SwNodeIndex aNdIdx(pCursor->GetMark()->nNode); + SwNodeIndex aNdIdx(pCursor->GetMark()->GetNode()); sw::GotoPrevLayoutTextFrame(aNdIdx, GetLayout()); SwTextNode* pTextNd = aNdIdx.GetNode().GetTextNode(); if (pTextNd && !pTextNd->GetText().isEmpty()) diff --git a/sw/source/core/edit/edatmisc.cxx b/sw/source/core/edit/edatmisc.cxx index 17213db800da..9dc807250c2f 100644 --- a/sw/source/core/edit/edatmisc.cxx +++ b/sw/source/core/edit/edatmisc.cxx @@ -68,7 +68,7 @@ void SwEditShell::GCAttr() else { const SwNodeIndex& rEnd = rPaM.End()->nNode; - SwNodeIndex aIdx( rPaM.Start()->nNode ); + SwNodeIndex aIdx( rPaM.Start()->GetNode() ); SwNode* pNd = &aIdx.GetNode(); do { if( pNd->IsTextNode() ) diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx index 459ff365d8b7..cf2571d63410 100644 --- a/sw/source/core/edit/edattr.cxx +++ b/sw/source/core/edit/edattr.cxx @@ -705,7 +705,7 @@ SvtScriptType SwEditShell::GetScriptType() const else { SwNodeOffset nEndIdx = pEnd->GetNodeIndex(); - SwNodeIndex aIdx( pStt->nNode ); + SwNodeIndex aIdx( pStt->GetNode() ); for( ; aIdx.GetIndex() <= nEndIdx; ++aIdx ) if( aIdx.GetNode().IsTextNode() ) { diff --git a/sw/source/core/edit/edsect.cxx b/sw/source/core/edit/edsect.cxx index d8c1965b3a54..6116a422557f 100644 --- a/sw/source/core/edit/edsect.cxx +++ b/sw/source/core/edit/edsect.cxx @@ -195,8 +195,8 @@ void SwEditShell::SetSectionAttr( const SfxItemSet& rSet, if( pSttSectNd && pEndSectNd ) { - SwNodeIndex aSIdx( pStt->nNode ); - SwNodeIndex aEIdx( pEnd->nNode ); + SwNodeIndex aSIdx( pStt->GetNode() ); + SwNodeIndex aEIdx( pEnd->GetNode() ); if( pSttSectNd->EndOfSectionIndex() < pEndSectNd->GetIndex() ) { @@ -266,7 +266,7 @@ sal_uInt16 SwEditShell::GetFullSelectedSectionCount() const // What about only a table inside the section ? // There is only a table selection possible! - SwNodeIndex aSIdx( pStt->nNode, -1 ), aEIdx( pEnd->nNode, +1 ); + SwNodeIndex aSIdx( pStt->GetNode(), -1 ), aEIdx( pEnd->GetNode(), +1 ); if( !aSIdx.GetNode().IsSectionNode() || !aEIdx.GetNode().IsEndNode() || !aEIdx.GetNode().StartOfSectionNode()->IsSectionNode() ) @@ -344,7 +344,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) // we found a start if // - we're at or just before a start node // - there are only start nodes between the current and pInnermostNode - SwNodeIndex aBegin( pCurrentPos->nNode ); + SwNodeIndex aBegin( pCurrentPos->GetNode() ); if( rCurrentNode.IsContentNode() && (pCurrentPos->GetContentIndex() == 0)) --aBegin; @@ -357,7 +357,7 @@ static const SwNode* lcl_SpecialInsertNode(const SwPosition* pCurrentPos) // - we're at or just before an end node // - there are only end nodes between the current node and // pInnermostNode's end node - SwNodeIndex aEnd( pCurrentPos->nNode ); + SwNodeIndex aEnd( pCurrentPos->GetNode() ); if( rCurrentNode.IsContentNode() && ( pCurrentPos->GetContentIndex() == rCurrentNode.GetContentNode()->Len() ) ) diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index 5b6e5f4abf3a..8efd7d4f4a2b 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -946,7 +946,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) GetDoc()->ClearBoxNumAttrs( rInsPos.nNode ); } { - SwNodeIndex aIndexBefore(rInsPos.nNode); + SwNodeIndex aIndexBefore(rInsPos.GetNode()); --aIndexBefore; rClpDoc.getIDocumentContentOperations().CopyRange(rCopy, rInsPos, SwCopyFlags::CheckPosInFly); { @@ -1085,7 +1085,7 @@ bool SwFEShell::Paste(SwDoc& rClpDoc, bool bNestedTable) // ** Update SwDoc::Append, if you change the following code ** // ** { - SwNodeIndex aIndexBefore(rInsPos.nNode); + SwNodeIndex aIndexBefore(rInsPos.GetNode()); --aIndexBefore; diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index 548ef83c243e..9ca5c7d38e8c 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -555,7 +555,7 @@ bool SwFEShell::Sort(const SwSortOptions& rOpt) auto [pStart, pEnd] = pPam->StartEnd(); // SwPosition* - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); + SwNodeIndex aPrevIdx( pStart->GetNode(), -1 ); SwNodeOffset nOffset = pEnd->GetNodeIndex() - pStart->GetNodeIndex(); const sal_Int32 nCntStt = pStart->GetContentIndex(); diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 841a0f8f918e..1fbbacf4758a 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2960,7 +2960,7 @@ void SwFlyFrameFormat::MakeFrames() //possible, that no Frame exists for this content. //In such a situation we also need to search from StartNode to //FrameFormat. - SwNodeIndex aIdx( aAnchorAttr.GetContentAnchor()->nNode ); + SwNodeIndex aIdx( aAnchorAttr.GetContentAnchor()->GetNode() ); SwContentNode *pCNd = GetDoc()->GetNodes().GoNext( &aIdx ); // #i105535# if ( pCNd == nullptr ) diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx index dd2b9002e0a4..d40220bc631f 100644 --- a/sw/source/core/layout/flycnt.cxx +++ b/sw/source/core/layout/flycnt.cxx @@ -110,7 +110,7 @@ void SwFlyAtContentFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rH // Search the new anchor using the NodeIdx; the relation between old // and new NodeIdx determines the search direction - const SwNodeIndex aNewIdx(pAnch->GetContentAnchor()->nNode); + const SwNodeIndex aNewIdx(pAnch->GetContentAnchor()->GetNode()); SwNodeIndex aOldIdx(pContent->IsTextFrame() // sw_redlinehide: can pick any node here, the compare with // FrameContainsNode should catch it diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 48b95e15060e..b174aa8e5a48 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -767,7 +767,7 @@ void SwFlyLayFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) } else { - SwNodeIndex aIdx(pAnch->GetContentAnchor()->nNode); + SwNodeIndex aIdx(pAnch->GetContentAnchor()->GetNode()); SwContentFrame* pContent = GetFormat()->GetDoc()->GetNodes().GoNext(&aIdx)-> GetContentNode()->getLayoutFrame(getRootFrame(), nullptr, nullptr); if(pContent) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 10f221ff0c53..4a00177b97a8 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3061,7 +3061,7 @@ SwTextNode* SwTextNode::MakeNewTextNode( const SwNodeIndex& rPos, bool bNext, SwContentNode* SwTextNode::AppendNode( const SwPosition & rPos ) { // position behind which it will be inserted - SwNodeIndex aIdx( rPos.nNode, 1 ); + SwNodeIndex aIdx( rPos.GetNode(), 1 ); SwTextNode* pNew = MakeNewTextNode( aIdx ); // reset list attributes at appended text node diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 4ee55770e83d..b1caa4c3677d 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -235,7 +235,7 @@ SwUndoDelete::SwUndoDelete( ::sw::UndoGuard const undoGuard(rDoc.GetIDocumentUndoRedo()); if (m_nEndNode - m_nSttNode > SwNodeOffset(1)) // check for fully selected nodes { - SwNodeIndex const start(pStt->nNode, +1); + SwNodeIndex const start(pStt->GetNode(), +1); DelBookmarks(start, pEnd->nNode); } } @@ -970,7 +970,7 @@ void SwUndoDelete::UndoImpl(::sw::UndoRedoContext & rContext) if( bNodeMove ) { SwNodeRange aRange( *m_oMvStt, SwNodeOffset(0), *m_oMvStt, m_nNode ); - SwNodeIndex aCopyIndex( aPos.nNode, -1 ); + SwNodeIndex aCopyIndex( aPos.GetNode(), -1 ); rDoc.GetUndoManager().GetUndoNodes().Copy_(aRange, aPos.GetNode(), // sw_redlinehide: delay creating frames: the flags on the // nodes aren't necessarily up-to-date, and the redlines diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 8e0152e43f63..6c9fc50ae232 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -131,8 +131,8 @@ void SwUndo::RemoveIdxFromRange( SwPaM& rPam, bool bMoveNext ) if( pEnd != rPam.GetPoint() ) rPam.Exchange(); - SwNodeIndex aStt( rPam.GetMark()->nNode ); - SwNodeIndex aEnd( rPam.GetPoint()->nNode ); + SwNodeIndex aStt( rPam.GetMark()->GetNode() ); + SwNodeIndex aEnd( rPam.GetPoint()->GetNode() ); if( !rPam.Move( fnMoveForward ) ) { diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx index 7ab685d1c3e9..20f54907e386 100644 --- a/sw/source/core/undo/unredln.cxx +++ b/sw/source/core/undo/unredln.cxx @@ -335,7 +335,7 @@ void SwUndoRedlineSort::UndoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) auto [pStart, pEnd] = rPam.StartEnd(); // SwPosition* - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); + SwNodeIndex aPrevIdx( pStart->GetNode(), -1 ); SwNodeOffset nOffsetTemp = pEnd->GetNodeIndex() - pStart->GetNodeIndex(); if( !( RedlineFlags::ShowDelete & rDoc.getIDocumentRedlineAccess().GetRedlineFlags()) ) @@ -381,7 +381,7 @@ void SwUndoRedlineSort::RedoRedlineImpl(SwDoc & rDoc, SwPaM & rPam) SwPaM* pPam = &rPam; auto [pStart, pEnd] = pPam->StartEnd(); // SwPosition* - SwNodeIndex aPrevIdx( pStart->nNode, -1 ); + SwNodeIndex aPrevIdx( pStart->GetNode(), -1 ); SwNodeOffset nOffsetTemp = pEnd->GetNodeIndex() - pStart->GetNodeIndex(); const sal_Int32 nCntStt = pStart->GetContentIndex(); diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 2f511d996eb4..162a5e764e64 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -652,7 +652,7 @@ void SwUndoTableToText::RedoImpl(::sw::UndoRedoContext & rContext) pPam->GetPoint()->nNode = m_nStartNode; pPam->GetPoint()->nContent.Assign( nullptr, 0 ); - SwNodeIndex aSaveIdx( pPam->GetPoint()->nNode, -1 ); + SwNodeIndex aSaveIdx( pPam->GetPoint()->GetNode(), -1 ); pPam->SetMark(); // log off all indices pPam->DeleteMark(); diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx index 612d17826753..3b5ff90c252b 100644 --- a/sw/source/core/unocore/unocrsrhelper.cxx +++ b/sw/source/core/unocore/unocrsrhelper.cxx @@ -1145,7 +1145,7 @@ void InsertFile(SwUnoCursor* pUnoCursor, const OUString& rURL, if(pUnoCursor->HasMark()) rDoc.getIDocumentContentOperations().DeleteAndJoin(*pUnoCursor); - SwNodeIndex aSave( pUnoCursor->GetPoint()->nNode, -1 ); + SwNodeIndex aSave( pUnoCursor->GetPoint()->GetNode(), -1 ); sal_Int32 nContent = pUnoCursor->GetPoint()->GetContentIndex(); ErrCode nErrno = pRdr->Read( *pRead ); // and paste the document diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index c8092e713abf..5692b190561c 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -2842,7 +2842,7 @@ SwXTextCursor::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor) SwPosition & rStart = *rUnoCursor.Start(); SwPosition & rEnd = *rUnoCursor.End(); - SwNodeIndex aPrevIdx( rStart.nNode, -1 ); + SwNodeIndex aPrevIdx( rStart.GetNode(), -1 ); const SwNodeOffset nOffset = rEnd.GetNodeIndex() - rStart.GetNodeIndex(); const sal_Int32 nCntStt = rStart.GetContentIndex(); diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index c2440ffb1a8b..dc524f88c651 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1389,7 +1389,7 @@ SwXText::insertTextPortion( if (!rText.isEmpty()) { - SwNodeIndex const nodeIndex(rCursor.GetPoint()->nNode, -1); + SwNodeIndex const nodeIndex(rCursor.GetPoint()->GetNode(), -1); const sal_Int32 nContentPos = rCursor.GetPoint()->GetContentIndex(); SwUnoCursorHelper::DocInsertStringSplitCR( *m_pImpl->m_pDoc, rCursor, rText, false); diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 545eb4ed0779..a4112636c88a 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -532,7 +532,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, { if (rEntry.MakeRegion(m_rDoc, aRegion, SwFltStackEntry::RegionMode::CheckNodes)) { - SwNodeIndex aTmpStart( aRegion.Start()->nNode ); + SwNodeIndex aTmpStart( aRegion.Start()->GetNode() ); SwNodeIndex aTmpEnd( aTmpStart ); SwNodeIndex& rRegEndNd = aRegion.End()->nNode; while( IterateNumrulePiece( rRegEndNd, @@ -770,9 +770,9 @@ void SwFltControlStack::Delete(const SwPaM &rPam) if( !rPam.HasMark() || *pStt >= *pEnd ) return; - SwNodeIndex aStartNode(pStt->nNode, -1); + SwNodeIndex aStartNode(pStt->GetNode(), -1); const sal_Int32 nStartIdx = pStt->GetContentIndex(); - SwNodeIndex aEndNode(pEnd->nNode, -1); + SwNodeIndex aEndNode(pEnd->GetNode(), -1); const sal_Int32 nEndIdx = pEnd->GetContentIndex(); // We don't support deleting content that is over one node, or removing a node. diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index bf47344ae59e..ec213c65a78e 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -185,7 +185,7 @@ ErrCode SwReader::Read( const Reader& rOptions ) // make sure the End position is correct for all Readers SwContentNode* pCNd = pPam->GetContentNode(); sal_Int32 nEndContent = pCNd ? pCNd->Len() - nSttContent : 0; - SwNodeIndex aEndPos( pPam->GetPoint()->nNode, 1 ); + SwNodeIndex aEndPos( pPam->GetPoint()->GetNode(), 1 ); mxDoc->getIDocumentRedlineAccess().SetRedlineFlags_intern( eOld ); diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index 4fe39e70a319..1a6c3fac6863 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1465,7 +1465,7 @@ void SwHTMLParser::StripTrailingPara() SwNodeOffset nBookNdIdx = pMark->GetMarkPos().GetNodeIndex(); if(nBookNdIdx==nNodeIdx) { - SwNodeIndex nNewNdIdx(m_pPam->GetPoint()->nNode); + SwNodeIndex nNewNdIdx(m_pPam->GetPoint()->GetNode()); SwContentNode* pNd = SwNodes::GoPrevious(&nNewNdIdx); if(!pNd) { diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 90b97b0ac625..ff694a7fffbe 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -259,7 +259,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) // Therefore we have to add a node and delete it again! if( !bAppended ) { - SwNodeIndex aPrvNdIdx( m_pPam->GetPoint()->nNode, -1 ); + SwNodeIndex aPrvNdIdx( m_pPam->GetPoint()->GetNode(), -1 ); if (aPrvNdIdx.GetNode().IsSectionNode()) { AppendTextNode(); @@ -675,7 +675,7 @@ void SwHTMLParser::NewMultiCol( sal_uInt16 columnsFromCss ) // If the pam is at the start of a section, an additional text // node must be inserted. Otherwise, the new section will be // inserted in front of the old one. - SwNodeIndex aPrvNdIdx( m_pPam->GetPoint()->nNode, -1 ); + SwNodeIndex aPrvNdIdx( m_pPam->GetPoint()->GetNode(), -1 ); if (aPrvNdIdx.GetNode().IsSectionNode()) { AppendTextNode(); diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx index 000e0b8081cb..edd0bef8b326 100644 --- a/sw/source/filter/html/htmltab.cxx +++ b/sw/source/filter/html/htmltab.cxx @@ -3472,7 +3472,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions, if( bForceFrame ) { - SwNodeIndex aDstIdx( m_pPam->GetPoint()->nNode ); + SwNodeIndex aDstIdx( m_pPam->GetPoint()->GetNode() ); m_pPam->Move( fnMoveBackward ); m_xDoc->GetNodes().Delete( aDstIdx ); } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 126013a65415..e2c9d05e52b1 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -858,7 +858,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) if( pPos->GetContentIndex() ) // then there was no <p> at the end m_pPam->Move( fnMoveForward, GoInNode ); // therefore to the next SwTextNode* pTextNode = pPos->GetNode().GetTextNode(); - SwNodeIndex aPrvIdx( pPos->nNode ); + SwNodeIndex aPrvIdx( pPos->GetNode() ); if( pTextNode && pTextNode->CanJoinPrev( &aPrvIdx ) && *m_pSttNdIdx <= aPrvIdx ) { diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 7fc2dd407c8c..690f23c47d52 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -495,7 +495,7 @@ ErrCode SwHTMLWriter::WriteStream() } // first node (with can contain a page break) - m_pStartNdIdx = new SwNodeIndex( m_pCurrentPam->GetPoint()->nNode ); + m_pStartNdIdx = new SwNodeIndex( m_pCurrentPam->GetPoint()->GetNode() ); SwSectionNode * pSNd = m_pCurrentPam->GetNode().FindSectionNode(); while( pSNd ) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index f9d5a4e76b54..346c3d6cb699 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -4601,7 +4601,7 @@ void wwSectionManager::InsertSegments() { // Start getting the bounds of this section SwPaM aSectPaM(*mrReader.m_pPaM, mrReader.m_pPaM); - SwNodeIndex aAnchor(aSectPaM.GetPoint()->nNode); + SwNodeIndex aAnchor(aSectPaM.GetPoint()->GetNode()); if (aNext != aEnd) { aAnchor = aNext->maStart; diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index dd938500950f..dabeae478f5c 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -2552,7 +2552,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) bool bRet = false; rPam.GetPoint()->nContent = 0; // go to start of paragraph - SwNodeIndex aPref(rPam.GetPoint()->nNode, -1); + SwNodeIndex aPref(rPam.GetPoint()->GetNode(), -1); if (SwTextNode* pNode = aPref.GetNode().GetTextNode()) { @@ -2574,7 +2574,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) //cannot be a page break at this point so we can //safely reset m_pLastAnchorPos to avoid any dangling //SwContentIndex's pointing into the deleted paragraph - SwNodeIndex aLastAnchorPos(m_oLastAnchorPos->nNode); + SwNodeIndex aLastAnchorPos(m_oLastAnchorPos->GetNode()); if (aLastAnchorPos == aToBeJoined) m_oLastAnchorPos.reset(); } @@ -2591,7 +2591,7 @@ bool SwWW8ImplReader::JoinNode(SwPaM &rPam, bool bStealAttr) { // If an open apo pos is here, then clear it before // JoinNext destroys it - SwNodeIndex aOpenApoPos(m_xSFlyPara->xMainTextPos->GetPoint()->nNode); + SwNodeIndex aOpenApoPos(m_xSFlyPara->xMainTextPos->GetPoint()->GetNode()); if (aOpenApoPos == aToBeJoined) m_xSFlyPara->xMainTextPos.reset(); } @@ -2663,7 +2663,7 @@ void SwWW8ImplReader::StopApo() that comes with the frame by default so that as normal we don't end up with one more paragraph than we wanted. */ - SwNodeIndex aPref(m_pPaM->GetPoint()->nNode, -1); + SwNodeIndex aPref(m_pPaM->GetPoint()->GetNode(), -1); SwTwips nNewWidth = MoveOutsideFly(m_xSFlyPara->GetFlyFormat(), *m_xSFlyPara->xMainTextPos->GetPoint()); @@ -2696,7 +2696,7 @@ void SwWW8ImplReader::StopApo() //cannot be a page break at this point so we can //safely reset m_pLastAnchorPos to avoid any dangling //SwContentIndex's pointing into the deleted paragraph - SwNodeIndex aLastAnchorPos(m_oLastAnchorPos->nNode); + SwNodeIndex aLastAnchorPos(m_oLastAnchorPos->GetNode()); SwNodeIndex aToBeJoined(aPref, 1); if (aLastAnchorPos == aToBeJoined) m_oLastAnchorPos.reset(); @@ -3431,9 +3431,9 @@ SwFrameFormat *SwWW8ImplReader::ContainsSingleInlineGraphic(const SwPaM &rRegion RndStdIds::FLY_AS_CHAR and then we can change its anchoring to centered in the line. */ SwFrameFormat *pRet=nullptr; - SwNodeIndex aBegin(rRegion.Start()->nNode); + SwNodeIndex aBegin(rRegion.Start()->GetNode()); const sal_Int32 nBegin(rRegion.Start()->GetContentIndex()); - SwNodeIndex aEnd(rRegion.End()->nNode); + SwNodeIndex aEnd(rRegion.End()->GetNode()); const sal_Int32 nEnd(rRegion.End()->GetContentIndex()); const SwTextNode* pTNd; const SwTextAttr* pTFlyAttr; diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx index 6e9024d7ed69..3ec86b648786 100644 --- a/sw/source/uibase/uiview/viewling.cxx +++ b/sw/source/uibase/uiview/viewling.cxx @@ -169,7 +169,7 @@ void SwView::ExecLingu(SfxRequest &rReq) // remember cursor position data for later restoration of the cursor const SwPosition *pPoint = m_pWrtShell->GetCursor()->GetPoint(); bool bRestoreCursor = pPoint->GetNode().IsTextNode(); - const SwNodeIndex aPointNodeIndex( pPoint->nNode ); + const SwNodeIndex aPointNodeIndex( pPoint->GetNode() ); sal_Int32 nPointIndex = pPoint->GetContentIndex(); // since this conversion is not interactive the whole converted