diff options
45 files changed, 149 insertions, 151 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index d9a040adfad4..17718f8357b6 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1078,7 +1078,7 @@ bool SwCursorShell::IsSelOnePara() const { return false; } - if (m_pCurrentCursor->GetPoint()->nNode == m_pCurrentCursor->GetMark()->nNode) + if (m_pCurrentCursor->GetPoint()->GetNode() == m_pCurrentCursor->GetMark()->GetNode()) { return true; } diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index 5fe7ef36dabc..cc9090659ec5 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -935,7 +935,7 @@ SwTextField* SwCursorShell::GetTextFieldAtCursor( SwTextField* pTextField = GetTextFieldAtPos( pCursor->Start(), bIncludeInputFieldAtStart ); if ( pTextField != nullptr - && pCursor->Start()->nNode == pCursor->End()->nNode ) + && pCursor->Start()->GetNode() == pCursor->End()->GetNode() ) { const sal_Int32 nTextFieldLength = pTextField->End() != nullptr diff --git a/sw/source/core/crsr/findattr.cxx b/sw/source/core/crsr/findattr.cxx index 43ce670499d8..fbbea5cb7846 100644 --- a/sw/source/core/crsr/findattr.cxx +++ b/sw/source/core/crsr/findattr.cxx @@ -107,7 +107,7 @@ static void lcl_SetAttrPam( SwPaM& rPam, sal_Int32 nStart, const sal_Int32* pEnd nContentPos = rPam.GetMark()->GetContentIndex(); else nContentPos = rPam.GetPoint()->GetContentIndex(); - bool bTstEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode; + bool bTstEnd = rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode(); SwContentNode* pCNd = rPam.GetPointContentNode(); rPam.GetPoint()->nContent.Assign( pCNd, nStart ); @@ -248,14 +248,14 @@ void SwAttrCheckArr::SetNewSet( const SwTextNode& rTextNd, const SwPaM& rPam ) if( m_bForward ) { m_nNodeStart = rPam.GetPoint()->GetContentIndex(); - m_nNodeEnd = rPam.GetPoint()->nNode == rPam.GetMark()->nNode + m_nNodeEnd = rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode() ? rPam.GetMark()->GetContentIndex() : rTextNd.GetText().getLength(); } else { m_nNodeEnd = rPam.GetPoint()->GetContentIndex(); - m_nNodeStart = rPam.GetPoint()->nNode == rPam.GetMark()->nNode + m_nNodeStart = rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode() ? rPam.GetMark()->GetContentIndex() : 0; } diff --git a/sw/source/core/crsr/findtxt.cxx b/sw/source/core/crsr/findtxt.cxx index b1ecf68a5ea2..b572d95d9e04 100644 --- a/sw/source/core/crsr/findtxt.cxx +++ b/sw/source/core/crsr/findtxt.cxx @@ -1062,7 +1062,7 @@ bool ReplaceImpl( else { assert(!ranges.empty()); - assert(ranges.front()->GetPoint()->nNode == ranges.front()->GetMark()->nNode); + assert(ranges.front()->GetPoint()->GetNode() == ranges.front()->GetMark()->GetNode()); bReplaced = rIDCO.ReplaceRange(*ranges.front(), rReplacement, bRegExp); for (auto it = ranges.begin() + 1; it != ranges.end(); ++it) { diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 5a47e9bdb965..ce4c35cf8f75 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -86,7 +86,7 @@ struct PercentHdl : pDSh( rPam.GetDoc().GetDocShell() ) { sal_Int32 nStt, nEnd; - if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode ) + if( rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode() ) { bNodeIdx = false; nStt = rPam.GetMark()->GetContentIndex(); @@ -1499,9 +1499,9 @@ bool SwCursor::SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType // An annotation mark covers the selected word. Check // if it covers only the word: in that case we select // the comment anchor as well. - bool bStartMatch = GetMark()->nNode == pAnnotationMark->GetMarkStart().nNode && + bool bStartMatch = GetMark()->GetNode() == pAnnotationMark->GetMarkStart().GetNode() && GetMark()->nContent == pAnnotationMark->GetMarkStart().nContent; - bool bEndMatch = GetPoint()->nNode == pAnnotationMark->GetMarkEnd().nNode && + bool bEndMatch = GetPoint()->GetNode() == pAnnotationMark->GetMarkEnd().GetNode() && GetPoint()->GetContentIndex() + 1 == pAnnotationMark->GetMarkEnd().GetContentIndex(); if (bStartMatch && bEndMatch) ++GetPoint()->nContent; diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx index 2575495b1328..2ef5f4b25e8f 100644 --- a/sw/source/core/crsr/viscrs.cxx +++ b/sw/source/core/crsr/viscrs.cxx @@ -904,7 +904,7 @@ void SwShellCursor::FillRects() if( HasMark() && GetPoint()->GetNode().IsContentNode() && GetPoint()->GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) && - (GetMark()->nNode == GetPoint()->nNode || + (GetMark()->GetNode() == GetPoint()->GetNode() || (GetMark()->GetNode().IsContentNode() && GetMark()->GetNode().GetContentNode()->getLayoutFrame( GetShell()->GetLayout() ) ) )) GetShell()->GetLayout()->CalcFrameRects( *this ); diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 5ccdfde50394..65f566b4c795 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -905,7 +905,7 @@ namespace pTmpPos = pTmp->End(); pTmpPos->Assign(rRg.aEnd); } - else if( pREnd->nNode == rRg.aStart ) + else if( pREnd->GetNode() == rRg.aStart.GetNode() ) { SwPosition* pTmpPos = pTmp->End(); pTmpPos->Assign(rRg.aEnd); @@ -915,7 +915,7 @@ namespace { rRedlTable.Remove( nRedlPos-- ); if( pREnd->nNode < rRg.aEnd || - ( pREnd->nNode == rRg.aEnd && !pREnd->GetContentIndex()) ) + ( pREnd->GetNode() == rRg.aEnd.GetNode() && !pREnd->GetContentIndex()) ) { // move everything rArr.emplace_back( pTmp, rRg.aStart ); @@ -1564,7 +1564,7 @@ namespace //local functions originally from docfmt.cxx if( aTextSet.Count() ) { const sal_Int32 nInsCnt = rSt.GetIndex(); - const sal_Int32 nEnd = pStt->nNode == pEnd->nNode + const sal_Int32 nEnd = pStt->GetNode() == pEnd->GetNode() ? pEnd->GetContentIndex() : pNode->Len(); SwRegHistory history( pNode, *pNode, pHistory ); @@ -1834,7 +1834,7 @@ namespace //local functions originally from docfmt.cxx } // Only selection in a Node. - if( pStt->nNode == pEnd->nNode ) + if( pStt->GetNode() == pEnd->GetNode() ) { DELETECHARSETS return bRet; @@ -2408,7 +2408,7 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, assert(*aSavePam.GetPoint() == *aSavePam.GetMark() && *aSavePam.GetPoint() == rPos); assert(aSavePam.GetPoint()->GetContentNode() == pOrigNode); - assert(aSavePam.GetPoint()->nNode == rPos.GetNodeIndex()); + assert(aSavePam.GetPoint()->GetNode() == rPos.GetNode()); assert(rPos.GetNodeIndex() == pOrigNode->GetIndex()); std::function<void (SwTextNode *, sw::mark::RestoreMode, bool)> restoreFunc( @@ -2434,13 +2434,13 @@ bool DocumentContentOperationsManager::MoveRange( SwPaM& rPaM, SwPosition& rPos, assert(*aSavePam.GetPoint() == *aSavePam.GetMark() && *aSavePam.GetPoint() == rPos); assert(aSavePam.GetPoint()->GetContentNode() == pOrigNode); - assert(aSavePam.GetPoint()->nNode == rPos.GetNodeIndex()); + assert(aSavePam.GetPoint()->GetNode() == rPos.GetNode()); assert(rPos.GetNodeIndex() == pOrigNode->GetIndex()); aSavePam.GetPoint()->nContent.Assign(pOrigNode, 0); rPos = *aSavePam.GetMark() = *aSavePam.GetPoint(); // correct the PaM! - if( rPos.nNode == rPaM.GetMark()->nNode ) + if( rPos.GetNode() == rPaM.GetMark()->GetNode() ) { rPaM.GetMark()->nNode = rPos.GetNodeIndex()-SwNodeOffset(1); rPaM.GetMark()->nContent.Assign( pTNd, nMkContent ); @@ -2596,7 +2596,7 @@ bool DocumentContentOperationsManager::MoveNodeRange( SwNodeRange& rRange, SwNod SwRangeRedline* pTmp = m_rDoc.getIDocumentRedlineAccess().GetRedlineTable()[ nRedlPos ]; pRStt = pTmp->Start(); pREnd = pTmp->End(); - if( pREnd->nNode == rPos && pRStt->nNode < rPos ) + if( pREnd->GetNode() == rPos.GetNode() && pRStt->nNode < rPos ) { aSavRedlInsPosArr.push_back( pTmp ); } @@ -2691,7 +2691,7 @@ void DocumentContentOperationsManager::MoveAndJoin( SwPaM& rPaM, SwPosition& rPo { SwNodeIndex aIdx( rPaM.Start()->GetNode() ); bool bJoinText = aIdx.GetNode().IsTextNode(); - bool bOneNode = rPaM.GetPoint()->nNode == rPaM.GetMark()->nNode; + bool bOneNode = rPaM.GetPoint()->GetNode() == rPaM.GetMark()->GetNode(); aIdx--; // in front of the move area! bool bRet = MoveRange( rPaM, rPos, SwMoveFlags::DEFAULT ); @@ -3466,7 +3466,7 @@ bool DocumentContentOperationsManager::ReplaceRange( SwPaM& rPam, const OUString { aPam.Move(fnMoveBackward); } - OSL_ENSURE((aPam.GetPoint()->nNode == aPam.GetMark()->nNode), "invalid pam?"); + OSL_ENSURE((aPam.GetPoint()->GetNode() == aPam.GetMark()->GetNode()), "invalid pam?"); sw::CalcBreaks(Breaks, aPam); @@ -3628,7 +3628,7 @@ void DocumentContentOperationsManager::CopyWithFlyInFly( const bool bCopyFlyAtFly, SwCopyFlags const flags) const { - assert(!pCopiedPaM || pCopiedPaM->first.End()->nNode == rRg.aEnd); + assert(!pCopiedPaM || pCopiedPaM->first.End()->GetNode() == rRg.aEnd.GetNode()); assert(!pCopiedPaM || pCopiedPaM->second.nNode <= rInsPos); SwDoc& rDest = rInsPos.GetNode().GetDoc(); @@ -3786,7 +3786,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( const bool bCopyFlyAtFly, SwCopyFlags const flags) const { - assert(!pCopiedPaM || pCopiedPaM->End()->nNode == rRg.aEnd); + assert(!pCopiedPaM || pCopiedPaM->End()->GetNode() == rRg.aEnd.GetNode()); // First collect all Flys, sort them according to their ordering number, // and then only copy them. This maintains the ordering numbers (which are only @@ -3901,7 +3901,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( if ( aIdx.GetNode().IsTextNode() ) { ++nAnchorTextNdNumInRange; - bAnchorTextNdFound = aAnchor.GetContentAnchor()->nNode == aIdx; + bAnchorTextNdFound = aAnchor.GetContentAnchor()->GetNode() == aIdx.GetNode(); } ++aIdx; @@ -3957,7 +3957,7 @@ void DocumentContentOperationsManager::CopyFlyInFlyImpl( newPos.GetNode().IsTextNode() ) { // only if pCopiedPaM: care about partially selected start node - sal_Int32 const nContent = pCopiedPaM && pCopiedPaM->Start()->nNode == aAnchor.GetContentAnchor()->nNode + sal_Int32 const nContent = pCopiedPaM && pCopiedPaM->Start()->GetNode() == aAnchor.GetContentAnchor()->GetNode() ? newPos.GetContentIndex() - pCopiedPaM->Start()->GetContentIndex() : newPos.GetContentIndex(); newPos.nContent.Assign(newPos.GetNode().GetTextNode(), nContent); @@ -4361,7 +4361,7 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet if ( pStartTextNode ) { // now move the Content to the new Node - bool bOneNd = pStt->nNode == pEnd->nNode; + bool bOneNd = pStt->GetNode() == pEnd->GetNode(); const sal_Int32 nLen = ( bOneNd ? pEnd->GetContentIndex() : pCNd->Len() ) - pStt->GetContentIndex(); @@ -4479,7 +4479,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt ::PaMCorrAbs( aDelPam, *aDelPam.GetPoint() ); auto [pStt, pEnd] = aDelPam.StartEnd(); // SwPosition* - bool bOneNode = pStt->nNode == pEnd->nNode; + bool bOneNode = pStt->GetNode() == pEnd->GetNode(); // Own Undo? OUString sRepl( rStr ); @@ -4625,7 +4625,7 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt } else { - assert((pStt->nNode == pEnd->nNode || + assert((pStt->GetNode() == pEnd->GetNode() || ( pStt->GetNodeIndex() + 1 == pEnd->GetNodeIndex() && !pEnd->GetContentIndex() )) && "invalid range: Point and Mark on different nodes" ); @@ -4925,7 +4925,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo SwNodeRange aRg( pStt->nNode, pEnd->nNode ); SwNodeIndex aInsPos( rPos.nNode ); - const bool bOneNode = pStt->nNode == pEnd->nNode; + const bool bOneNode = pStt->GetNode() == pEnd->GetNode(); SwTextNode* pSttTextNd = pStt->GetNode().GetTextNode(); SwTextNode* pEndTextNd = pEnd->GetNode().GetTextNode(); SwTextNode* pDestTextNd = aInsPos.GetNode().GetTextNode(); diff --git a/sw/source/core/doc/DocumentRedlineManager.cxx b/sw/source/core/doc/DocumentRedlineManager.cxx index 1e0b947ca0b1..5c1353989b38 100644 --- a/sw/source/core/doc/DocumentRedlineManager.cxx +++ b/sw/source/core/doc/DocumentRedlineManager.cxx @@ -320,7 +320,7 @@ void UpdateFramesForRemoveDeleteRedline(SwDoc & rDoc, SwPaM const& rPam) } // no nodes can be unmerged by this - skip MakeFrames() etc. - if (rPam.GetPoint()->nNode == rPam.GetMark()->nNode) + if (rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode()) { break; // continue with AppendAllObjs() } diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 9fdb39fc595c..a4b38b911d6c 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -189,7 +189,7 @@ namespace { return oContentIdx.has_value() ? ( rPos.nNode > rNdIdx - || ( rPos.nNode == rNdIdx + || ( rPos.GetNode() == rNdIdx && rPos.nContent >= *oContentIdx ) ) : rPos.nNode >= rNdIdx; } @@ -198,7 +198,7 @@ namespace { return rPos.nNode < rNdIdx || ( oContentIdx.has_value() - && rPos.nNode == rNdIdx + && rPos.GetNode() == rNdIdx && rPos.nContent < *oContentIdx ); } @@ -517,7 +517,7 @@ bool IDocumentMarkAccess::IsLegalPaMForCrossRefHeadingBookmark( const SwPaM& rPa return rPaM.Start()->GetNode().IsTextNode() && rPaM.Start()->GetContentIndex() == 0 && ( !rPaM.HasMark() || - ( rPaM.GetMark()->nNode == rPaM.GetPoint()->nNode && + ( rPaM.GetMark()->GetNode() == rPaM.GetPoint()->GetNode() && rPaM.End()->GetContentIndex() == rPaM.End()->GetNode().GetTextNode()->Len() ) ); } @@ -997,11 +997,11 @@ namespace sw::mark // special case: completely in range, touching the end? if ( oEndContentIdx.has_value() && ( ( rbIsOtherPosInRange - && pMark->GetMarkPos().nNode == rEnd + && pMark->GetMarkPos().GetNode() == rEnd && pMark->GetMarkPos().nContent == *oEndContentIdx ) || ( rbIsPosInRange && pMark->IsExpanded() - && pMark->GetOtherMarkPos().nNode == rEnd + && pMark->GetOtherMarkPos().GetNode() == rEnd && pMark->GetOtherMarkPos().nContent == *oEndContentIdx ) ) ) { rbIsPosInRange = true; @@ -1386,7 +1386,7 @@ namespace sw::mark return pMark->GetMarkStart() == rPos // end position includes the CH_TXT_ATR_FIELDEND || (pMark->GetMarkEnd().GetContentIndex() == rPos.GetContentIndex() + 1 - && pMark->GetMarkEnd().nNode == rPos.nNode); + && pMark->GetMarkEnd().GetNode() == rPos.GetNode()); } ); return (pFieldmark == m_vFieldmarks.end()) ? nullptr @@ -1782,7 +1782,7 @@ namespace { bool lcl_Greater( const SwPosition& rPos, const SwNode& rNdIdx, std::optional<sal_Int32> oContentIdx ) { - return rPos.nNode > rNdIdx || ( oContentIdx && rPos.nNode == rNdIdx && rPos.nContent > *oContentIdx ); + return rPos.nNode > rNdIdx || ( oContentIdx && rPos.GetNode() == rNdIdx && rPos.nContent > *oContentIdx ); } } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index f12efa7f56f3..7f0f126dad44 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -175,7 +175,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, ? DelContentType::CheckNoCntnt|DelContentType::AllMask : DelContentType::AllMask)) || (RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId() - && (bInsPos = (rInsPos.nNode == pAPos->nNode))) + && (bInsPos = (rInsPos.GetNode() == pAPos->GetNode()))) || (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId() && (bInsPos = (rInsPos == *pAPos)))) { @@ -185,7 +185,7 @@ void SaveFlyInRange( const SwPaM& rPam, const SwPosition& rInsPos, } SaveFly aSave( pAPos->GetNodeIndex() - rSttNdIdx.GetIndex(), (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId()) - ? (pAPos->nNode == rSttNdIdx) + ? (pAPos->GetNode() == rSttNdIdx.GetNode()) ? pAPos->GetContentIndex() - rPam.Start()->GetContentIndex() : pAPos->GetContentIndex() : 0, @@ -328,7 +328,7 @@ void sw_GetJoinFlags( SwPaM& rPam, bool& rJoinText, bool& rJoinPrev ) { rJoinText = false; rJoinPrev = false; - if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode ) + if( rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode() ) return; auto [pStt, pEnd] = rPam.StartEnd(); // SwPosition* @@ -742,7 +742,7 @@ SwHyphArgs::SwHyphArgs( const SwPaM *pPam, const Point &rCursorPos, const SwPosition *pMark = pPam->GetMark(); m_pEnd = pMark->GetNode().GetTextNode(); m_nPamLen = pMark->GetContentIndex(); - if( pPoint->nNode == pMark->nNode ) + if( pPoint->GetNode() == pMark->GetNode() ) m_nPamLen = m_nPamLen - pPoint->GetContentIndex(); } diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx index 04601bc21214..b7f774b1dbf6 100644 --- a/sw/source/core/doc/docnum.cxx +++ b/sw/source/core/doc/docnum.cxx @@ -2092,9 +2092,9 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, // Is completely in the range and is the own Redline too? if( aTmpRedl.IsOwnRedline( *pTmp ) && (pRStt->nNode < pStt->nNode || - (pRStt->nNode == pStt->nNode && !pRStt->GetContentIndex()) ) && + (pRStt->GetNode() == pStt->GetNode() && !pRStt->GetContentIndex()) ) && (pEnd->nNode < pREnd->nNode || - (pEnd->nNode == pREnd->nNode && + (pEnd->GetNode() == pREnd->GetNode() && pCEndNd ? pREnd->GetContentIndex() == pCEndNd->Len() : !pREnd->GetContentIndex() )) ) { @@ -2111,7 +2111,7 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, ( pRStt->nNode > aIdx || aIdx > pREnd->nNode || // pOwnRedl doesn't start at the beginning of a node, so it's not // possible to resize it to contain the line moved before it - ( pRStt->nNode == aIdx && pRStt->GetContentIndex() > 0 ) ) ) + ( pRStt->GetNode() == aIdx.GetNode() && pRStt->GetContentIndex() > 0 ) ) ) { // it's not in itself, so don't move it pOwnRedl = nullptr; @@ -2223,12 +2223,12 @@ bool SwDoc::MoveParagraphImpl(SwPaM& rPam, SwNodeOffset const nOffset, for(SwRangeRedline* pTmp : getIDocumentRedlineAccess().GetRedlineTable()) { SwPosition* pPos = &pTmp->GetBound(); - if( pPos->nNode == aIdx ) + if( pPos->GetNode() == aIdx.GetNode() ) { pPos->Adjust(SwNodeOffset(1)); } pPos = &pTmp->GetBound(false); - if( pPos->nNode == aIdx ) + if( pPos->GetNode() == aIdx.GetNode() ) { pPos->Adjust(SwNodeOffset(1)); } diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx index 514ee9788b8c..c44775391a44 100644 --- a/sw/source/core/doc/docredln.cxx +++ b/sw/source/core/doc/docredln.cxx @@ -308,7 +308,7 @@ void lcl_LOKInvalidateStartEndFrames(SwShellCursor& rCursor) if (!(rCursor.HasMark() && rCursor.GetPoint()->GetNode().IsContentNode() && rCursor.GetPoint()->GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()) && - (rCursor.GetMark()->nNode == rCursor.GetPoint()->nNode || + (rCursor.GetMark()->GetNode() == rCursor.GetPoint()->GetNode() || (rCursor.GetMark()->GetNode().IsContentNode() && rCursor.GetMark()->GetNode().GetContentNode()->getLayoutFrame(rCursor.GetShell()->GetLayout()))))) { @@ -543,7 +543,7 @@ std::vector<SwRangeRedline*> GetAllValidRanges(std::unique_ptr<SwRangeRedline> p ++aNewStt.nNode; } while( aNewStt.GetNodeIndex() < pEnd->GetNodeIndex() ); - if( aNewStt.nNode == pEnd->nNode ) + if( aNewStt.GetNode() == pEnd->GetNode() ) aNewStt.nContent = pEnd->nContent; else if( pC ) { @@ -1424,14 +1424,14 @@ void SwRangeRedline::InvalidateRange(Invalidation const eWhy) void SwRangeRedline::CalcStartEnd( SwNodeOffset nNdIdx, sal_Int32& rStart, sal_Int32& rEnd ) const { auto [pRStt, pREnd] = StartEnd(); // SwPosition* - if( pRStt->nNode < nNdIdx ) + if( pRStt->GetNodeIndex() < nNdIdx ) { - if( pREnd->nNode > nNdIdx ) + if( pREnd->GetNodeIndex() > nNdIdx ) { rStart = 0; // Paragraph is completely enclosed rEnd = COMPLETE_STRING; } - else if (pREnd->nNode == nNdIdx) + else if (pREnd->GetNodeIndex() == nNdIdx) { rStart = 0; // Paragraph is overlapped in the beginning rEnd = pREnd->GetContentIndex(); @@ -1442,10 +1442,10 @@ void SwRangeRedline::CalcStartEnd( SwNodeOffset nNdIdx, sal_Int32& rStart, sal_I rEnd = COMPLETE_STRING; } } - else if( pRStt->nNode == nNdIdx ) + else if( pRStt->GetNodeIndex() == nNdIdx ) { rStart = pRStt->GetContentIndex(); - if( pREnd->nNode == nNdIdx ) + if( pREnd->GetNodeIndex() == nNdIdx ) rEnd = pREnd->GetContentIndex(); // Within the Paragraph else rEnd = COMPLETE_STRING; // Paragraph is overlapped in the end diff --git a/sw/source/core/doc/docruby.cxx b/sw/source/core/doc/docruby.cxx index 851695e80b8d..c269d5a6290b 100644 --- a/sw/source/core/doc/docruby.cxx +++ b/sw/source/core/doc/docruby.cxx @@ -185,7 +185,7 @@ bool SwDoc::SelectNextRubyChars( SwPaM& rPam, SwRubyListEntry& rEntry ) if( bHasMark ) { // in the same node? - if( rPam.GetMark()->nNode == pPos->nNode ) + if( rPam.GetMark()->GetNode() == pPos->GetNode() ) { // then use that end const sal_Int32 nTEnd = rPam.GetMark()->GetContentIndex(); diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx index 36f753487fe0..e12df9c0687e 100644 --- a/sw/source/core/docnode/nodes.cxx +++ b/sw/source/core/docnode/nodes.cxx @@ -1497,7 +1497,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) pEnd->GetNode().IsTextNode(); // move the content into the new node - bool bOneNd = pStt->nNode == pEnd->nNode; + bool bOneNd = pStt->GetNode() == pEnd->GetNode(); const sal_Int32 nLen = ( bOneNd ? std::min(pEnd->GetContentIndex(), pSrcNd->Len()) : pSrcNd->Len() ) - pStt->GetContentIndex(); @@ -1535,7 +1535,7 @@ void SwNodes::MoveRange( SwPaM & rPam, SwPosition & rPos, SwNodes& rNodes ) pDestNd->SplitContentNode(rPos, nullptr); } - if( rPos.nNode == aEndIdx ) + if( rPos.GetNodeIndex() == aEndIdx.GetIndex() ) { --aEndIdx; } diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index d68c5b14caee..40cb9bce01c9 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -132,7 +132,7 @@ void SwAutoCorrDoc::DeleteSelImpl(SwPaM & rDelPam) // Shell-Cursr-Ring !! // ??? is that really necessary - this should never join nodes, so Update should be enough? // PaMIntoCursorShellRing aTmp( rEditSh, rCursor, rDelPam ); - assert(rDelPam.GetPoint()->nNode == rDelPam.GetMark()->nNode); + assert(rDelPam.GetPoint()->GetNode() == rDelPam.GetMark()->GetNode()); pDoc->getIDocumentContentOperations().DeleteAndJoin( rDelPam ); } else @@ -430,7 +430,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, } else if (!ranges.empty()) { - assert(ranges.front()->GetPoint()->nNode == ranges.front()->GetMark()->nNode); + assert(ranges.front()->GetPoint()->GetNode() == ranges.front()->GetMark()->GetNode()); pDoc->getIDocumentContentOperations().ReplaceRange( *ranges.front(), pFnd->GetLong(), false); for (auto it = ranges.begin() + 1; it != ranges.end(); ++it) diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx index e3cbb92119bd..cb0b1d7478da 100644 --- a/sw/source/core/edit/edfcol.cxx +++ b/sw/source/core/edit/edfcol.cxx @@ -2234,7 +2234,7 @@ void SwEditShell::SetTextFormatColl(SwTextFormatColl *pFormat, // haven't supported by AppendRedline(), yet // TODO handle multi-paragraph selections, too, // e.g. by breaking them to single paragraphs - aPaM.Start()->nNode == aPaM.End()->nNode ) + aPaM.Start()->GetNode() == aPaM.End()->GetNode() ) { SwRangeRedline * pRedline = new SwRangeRedline( RedlineType::ParagraphFormat, aPaM ); auto const result(GetDoc()->getIDocumentRedlineAccess().AppendRedline( pRedline, true)); diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index 0a51dac96f8c..f624b00de292 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -61,7 +61,7 @@ void SwEditShell::FillByEx(SwCharFormat* pCharFormat) { const SwPosition* pPtPos = pPam->GetPoint(); const SwPosition* pMkPos = pPam->GetMark(); - if( pPtPos->nNode == pMkPos->nNode ) // in the same node? + if( pPtPos->GetNode() == pMkPos->GetNode() ) // in the same node? { nStt = pPtPos->GetContentIndex(); if( nStt < pMkPos->GetContentIndex() ) diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 3593d7922a8b..dba5382d7e33 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -228,7 +228,7 @@ SwGrfNode * SwEditShell::GetGrfNode_() const SwGrfNode *pGrfNode = nullptr; SwPaM* pCursor = GetCursor(); if( !pCursor->HasMark() || - pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode ) + pCursor->GetPoint()->GetNode() == pCursor->GetMark()->GetNode() ) pGrfNode = pCursor->GetPoint()->GetNode().GetGrfNode(); return pGrfNode; @@ -281,7 +281,7 @@ bool SwEditShell::GetGrfSize(Size& rSz) const SwNoTextNode* pNoTextNd; SwPaM* pCurrentCursor = GetCursor(); if( ( !pCurrentCursor->HasMark() - || pCurrentCursor->GetPoint()->nNode == pCurrentCursor->GetMark()->nNode ) + || pCurrentCursor->GetPoint()->GetNode() == pCurrentCursor->GetMark()->GetNode() ) && nullptr != ( pNoTextNd = pCurrentCursor->GetPointNode().GetNoTextNode() ) ) { rSz = pNoTextNd->GetTwipSize(); @@ -361,7 +361,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const OSL_ENSURE( CNT_OLE == GetCntType(), "GetOLEObj: no OLENode." ); OSL_ENSURE( !GetCursor()->HasMark() || (GetCursor()->HasMark() && - GetCursor()->GetPoint()->nNode == GetCursor()->GetMark()->nNode), + GetCursor()->GetPoint()->GetNode() == GetCursor()->GetMark()->GetNode()), "GetOLEObj: no OLENode." ); SwOLENode *pOLENode = GetCursor()->GetPointNode().GetOLENode(); @@ -504,7 +504,7 @@ OUString SwEditShell::GetDropText( const sal_Int32 nChars ) const void SwEditShell::ReplaceDropText( const OUString &rStr, SwPaM* pPaM ) { SwPaM* pCursor = pPaM ? pPaM : GetCursor(); - if( !(pCursor->GetPoint()->nNode == pCursor->GetMark()->nNode && + if( !(pCursor->GetPoint()->GetNode() == pCursor->GetMark()->GetNode() && pCursor->GetPointNode().GetTextNode()->IsTextNode()) ) return; diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index f2ca98a21725..52d8c0a553b9 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -557,7 +557,7 @@ void SwHyphIter::InsertSoftHyph( const sal_Int32 nHyphPos ) if( pSttPos->nNode != pEndPos->nNode || !nLastHyphLen ) { - OSL_ENSURE( pSttPos->nNode == pEndPos->nNode, + OSL_ENSURE( pSttPos->GetNode() == pEndPos->GetNode(), "SwHyphIter::InsertSoftHyph: node warp during hyphenation" ); OSL_ENSURE(nLastHyphLen, "SwHyphIter::InsertSoftHyph: missing HyphContinue()"); *pSttPos = *pEndPos; diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index c5a2902cfa2b..eb36f8d44f90 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -1245,7 +1245,7 @@ SwTextNode* SwGetRefFieldType::FindAnchor( SwDoc* pDoc, const OUString& rRefMark *pEnd = pTextNd->Len(); } } - else if(pBkmk->GetOtherMarkPos().nNode == pBkmk->GetMarkPos().nNode) + else if(pBkmk->GetOtherMarkPos().GetNode() == pBkmk->GetMarkPos().GetNode()) *pEnd = pBkmk->GetMarkEnd().GetContentIndex(); else *pEnd = -1; diff --git a/sw/source/core/inc/unoparaframeenum.hxx b/sw/source/core/inc/unoparaframeenum.hxx index 017232c5a46b..80da5eb50525 100644 --- a/sw/source/core/inc/unoparaframeenum.hxx +++ b/sw/source/core/inc/unoparaframeenum.hxx @@ -26,6 +26,7 @@ #include <unobaseclass.hxx> +class SwNode; class SwNodeIndex; class SwPaM; class SwFrameFormat; @@ -55,7 +56,7 @@ typedef std::deque< std::shared_ptr<sw::FrameClient> > FrameClientList_t; // #i28701# - adjust 4th parameter -void CollectFrameAtNode( const SwNodeIndex& rIdx, +void CollectFrameAtNode( const SwNode& rNd, FrameClientSortList_t& rFrames, const bool bAtCharAnchoredObjs ); diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx index c7d11b3cabed..aef3dad2827d 100644 --- a/sw/source/core/layout/ssfrm.cxx +++ b/sw/source/core/layout/ssfrm.cxx @@ -462,8 +462,8 @@ void SwTextFrame::RegisterToNode(SwTextNode & rNode, bool const isForceNodeAsFir rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksBegin(), rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksEnd(), [this](::sw::mark::IMark const*const pMark) { - return pMark->GetMarkStart().nNode == *m_pMergedPara->pFirstNode - && pMark->GetMarkEnd().nNode != *m_pMergedPara->pFirstNode; + return pMark->GetMarkStart().GetNode() == *m_pMergedPara->pFirstNode + && pMark->GetMarkEnd().GetNode() != *m_pMergedPara->pFirstNode; }) == rNode.GetDoc().getIDocumentMarkAccess()->getFieldmarksEnd()); } assert(&rNode != GetDep()); diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index d1e4b967f235..86cf7d6c6454 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -989,7 +989,7 @@ static void InitBookmarks( && ((iter != end && &rEnd.GetNode() == iter->pNode && rEnd.GetContentIndex() == iter->nStart) ? (*oPrevIter)->nEnd < rStart.GetContentIndex() : (*oPrevIter)->nEnd <= rStart.GetContentIndex()))) - : rStart.nNode == rEnd.nNode) + : rStart.GetNode() == rEnd.GetNode()) { break; // deleted - skip it } diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index 0ce729004bab..1296496828c3 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -118,7 +118,7 @@ public: } if (pStart->GetNode().IsTableNode()) { - assert(pEnd->nNode == m_Start.nNode && pEnd->GetContentIndex() == 0); + assert(pEnd->GetNode() == m_Start.GetNode() && pEnd->GetContentIndex() == 0); continue; // known pathology, ignore it } if (*m_pEndPos <= *pStart) diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a085334c5bf4..a1dd438f4562 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3673,23 +3673,23 @@ OUString SwTextNode::GetRedlineText() const if( RedlineType::Delete == pTmp->GetType() ) { const SwPosition *pRStt = pTmp->Start(), *pREnd = pTmp->End(); - if( pRStt->nNode < nNdIdx ) + if( pRStt->GetNodeIndex() < nNdIdx ) { - if( pREnd->nNode > nNdIdx ) + if( pREnd->GetNodeIndex() > nNdIdx ) // paragraph is fully deleted return OUString(); - else if( pREnd->nNode == nNdIdx ) + else if( pREnd->GetNodeIndex() == nNdIdx ) { // deleted from 0 to nContent aRedlArr.push_back( 0 ); aRedlArr.push_back( pREnd->GetContentIndex() ); } } - else if( pRStt->nNode == nNdIdx ) + else if( pRStt->GetNodeIndex() == nNdIdx ) { //aRedlArr.Insert( pRStt->GetContentIndex(), aRedlArr.Count() ); aRedlArr.push_back( pRStt->GetContentIndex() ); - if( pREnd->nNode == nNdIdx ) + if( pREnd->GetNodeIndex() == nNdIdx ) aRedlArr.push_back( pREnd->GetContentIndex() ); else { diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index aac947bbe844..e7434b6fe4e6 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1389,7 +1389,7 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) if (pAnchor && (RndStdIds::FLY_AS_CHAR == pAnchor->GetAnchorId()) && pAnchor->GetContentAnchor() && - pAnchor->GetContentAnchor()->nNode == *this && + pAnchor->GetContentAnchor()->GetNode() == *this && pAnchor->GetContentAnchor()->nContent == aIdx ) { --const_cast<SwContentIndex&>( diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx index 14b7b020f26b..b047fb73a8d8 100644 --- a/sw/source/core/undo/undel.cxx +++ b/sw/source/core/undo/undel.cxx @@ -1298,7 +1298,7 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext) // The Pam was incremented by one at Point (== end) to provide space // for UNDO. This now needs to be reverted! --rPam.End()->nNode; - if( rPam.GetPoint()->nNode == rPam.GetMark()->nNode ) + if( rPam.GetPoint()->GetNode() == rPam.GetMark()->GetNode() ) *rPam.GetMark() = *rPam.GetPoint(); rDoc.getIDocumentContentOperations().DelFullPara( rPam ); } diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx index 8a110d013039..cc5699b0c006 100644 --- a/sw/source/core/undo/undobj.cxx +++ b/sw/source/core/undo/undobj.cxx @@ -1055,7 +1055,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, case RndStdIds::FLY_AT_FLY: if( nullptr != (pAPos = pAnchor->GetContentAnchor() ) && - pStt->nNode == pAPos->nNode ) + pStt->GetNode() == pAPos->GetNode() ) { if( !m_pHistory ) m_pHistory.reset( new SwHistory ); @@ -1106,7 +1106,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, { // #i92125# // keep cross-reference bookmarks, if content inside one paragraph is deleted. - if ( rMark.nNode == rPoint.nNode + if ( rMark.GetNode() == rPoint.GetNode() && ( type == IDocumentMarkAccess::MarkType::CROSSREF_HEADING_BOOKMARK || type == IDocumentMarkAccess::MarkType::CROSSREF_NUMITEM_BOOKMARK)) { @@ -1157,7 +1157,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, { // delete cross-reference bookmark at <pStt>, if only part of // <pEnd> text node content is deleted. - if( pStt->nNode == pBkmk->GetMarkPos().nNode + if( pStt->GetNode() == pBkmk->GetMarkPos().GetNode() && pEnd->GetContentIndex() != pEnd->GetNode().GetTextNode()->Len() ) { bSavePos = true; @@ -1165,7 +1165,7 @@ void SwUndoSaveContent::DelContentIndex( const SwPosition& rMark, } // delete cross-reference bookmark at <pEnd>, if only part of // <pStt> text node content is deleted. - else if( pEnd->nNode == pBkmk->GetMarkPos().nNode && + else if( pEnd->GetNode() == pBkmk->GetMarkPos().GetNode() && pStt->GetContentIndex() != 0 ) { bSavePos = true; @@ -1670,7 +1670,7 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & rAnchorPos, // in general, exclude the start and end position return ((rStart.nNode < rAnchorPos.nNode) - || (rStart.nNode == rAnchorPos.nNode + || (rStart.GetNode() == rAnchorPos.GetNode() && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd) // special case: fully deleted node && ((rStart.nNode != rEnd.nNode && rStart.GetContentIndex() == 0 @@ -1678,7 +1678,7 @@ bool IsSelectFrameAnchoredAtPara(SwPosition const & rAnchorPos, && IsNotBackspaceHeuristic(rStart, rEnd)) || (IsAtStartOfSection2(rStart) && IsAtEndOfSection2(rEnd))))) && ((rAnchorPos.nNode < rEnd.nNode) - || (rAnchorPos.nNode == rEnd.nNode + || (rAnchorPos.GetNode() == rEnd.GetNode() && !(nDelContentType & DelContentType::ExcludeFlyAtStartEnd) // special case: fully deleted node && ((rEnd.nNode != rStart.nNode && rEnd.GetContentIndex() == rEnd.GetNode().GetTextNode()->Len() diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index d7f8176380bd..2d754a249897 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -135,7 +135,7 @@ struct FrameClientSortListLess } -void CollectFrameAtNode( const SwNodeIndex& rIdx, +void CollectFrameAtNode( const SwNode& rNd, FrameClientSortList_t& rFrames, const bool bAtCharAnchoredObjs ) { @@ -144,13 +144,13 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx, // <false>: at-paragraph anchored objects are collected // search all borders, images, and OLEs that are connected to the paragraph - SwDoc& rDoc = rIdx.GetNode().GetDoc(); + const SwDoc& rDoc = rNd.GetDoc(); const auto nChkType = bAtCharAnchoredObjs ? RndStdIds::FLY_AT_CHAR : RndStdIds::FLY_AT_PARA; const SwContentFrame* pCFrame; const SwContentNode* pCNd; if( rDoc.getIDocumentLayoutAccess().GetCurrentViewShell() && - nullptr != (pCNd = rIdx.GetNode().GetContentNode()) && + nullptr != (pCNd = rNd.GetContentNode()) && nullptr != (pCFrame = pCNd->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout())) ) { lcl_CollectFrameAtNodeWithLayout(pCFrame, rFrames, nChkType); @@ -166,7 +166,7 @@ void CollectFrameAtNode( const SwNodeIndex& rIdx, const SwPosition* pAnchorPos; if( rAnchor.GetAnchorId() == nChkType && nullptr != (pAnchorPos = rAnchor.GetContentAnchor()) && - pAnchorPos->nNode == rIdx ) + pAnchorPos->GetNode() == rNd ) { // OD 2004-05-07 #i28701# - determine insert position for @@ -1736,7 +1736,7 @@ SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl( if (PARAFRAME_PORTION_PARAGRAPH == eParaFrameMode) { FrameClientSortList_t vFrames; - ::CollectFrameAtNode(rPaM.GetPoint()->nNode, vFrames, false); + ::CollectFrameAtNode(rPaM.GetPoint()->GetNode(), vFrames, false); std::transform(vFrames.begin(), vFrames.end(), std::back_inserter(m_vFrames), [] (const FrameClientSortListEntry& rEntry) { return rEntry.pFrameClient; }); diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index 19a7d7e5c30d..a30a492afd0c 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -128,13 +128,13 @@ namespace }; typedef std::multiset < SwXBookmarkPortion_ImplSharedPtr, BookmarkCompareStruct > SwXBookmarkPortion_ImplList; - /// Inserts pBkmk to rBkmArr in case it starts or ends at nOwnNode - void lcl_FillBookmark(sw::mark::IMark* const pBkmk, const SwNodeIndex& nOwnNode, SwDoc& rDoc, SwXBookmarkPortion_ImplList& rBkmArr) + /// Inserts pBkmk to rBkmArr in case it starts or ends at rOwnNode + void lcl_FillBookmark(sw::mark::IMark* const pBkmk, const SwNode& rOwnNode, SwDoc& rDoc, SwXBookmarkPortion_ImplList& rBkmArr) { bool const hasOther = pBkmk->IsExpanded(); const SwPosition& rStartPos = pBkmk->GetMarkStart(); - if(rStartPos.nNode == nOwnNode) + if(rStartPos.GetNode() == rOwnNode) { // #i109272#: cross reference marks: need special handling! ::sw::mark::CrossRefBookmark *const pCrossRefMark(dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk)); @@ -146,7 +146,7 @@ namespace } const SwPosition& rEndPos = pBkmk->GetMarkEnd(); - if(rEndPos.nNode != nOwnNode) + if(rEndPos.GetNode() != rOwnNode) return; std::optional<SwPosition> oCrossRefEndPos; @@ -177,8 +177,7 @@ namespace if(!pMarkAccess->getBookmarksCount()) return; - const SwNodeIndex nOwnNode = rUnoCursor.GetPoint()->nNode; - SwTextNode* pTextNode = nOwnNode.GetNode().GetTextNode(); + SwTextNode* pTextNode = rUnoCursor.GetPoint()->GetNode().GetTextNode(); assert(pTextNode); // A text node already knows its marks via its SwIndexes. o3tl::sorted_vector<const sw::mark::IMark*> aSeenMarks; @@ -196,7 +195,7 @@ namespace // Only handle bookmarks once, if they start and end at this node as well. if (!aSeenMarks.insert(pBkmk).second) continue; - lcl_FillBookmark(pBkmk, nOwnNode, rDoc, rBkmArr); + lcl_FillBookmark(pBkmk, *pTextNode, rDoc, rBkmArr); } } @@ -323,7 +322,7 @@ SwXTextPortionEnumeration::SwXTextPortionEnumeration( // find all frames, graphics and OLEs that are bound AT character in para FrameClientSortList_t frames; - ::CollectFrameAtNode(m_pUnoCursor->GetPoint()->nNode, frames, true); + ::CollectFrameAtNode(m_pUnoCursor->GetPoint()->GetNode(), frames, true); lcl_CreatePortions(m_Portions, xParentText, &*m_pUnoCursor, frames, nStart, nEnd, bOnlyTextFields); } @@ -1116,18 +1115,17 @@ static void lcl_FillRedlineArray( return; const SwPosition* pStart = rUnoCursor.GetPoint(); - const SwNodeIndex nOwnNode = pStart->nNode; + const SwNode& rOwnNode = pStart->GetNode(); - SwRedlineTable::size_type nRed = rDoc.getIDocumentRedlineAccess().GetRedlinePos(nOwnNode.GetNode(), RedlineType::Any); + SwRedlineTable::size_type nRed = rDoc.getIDocumentRedlineAccess().GetRedlinePos(rOwnNode, RedlineType::Any); for(; nRed < nRedTableCount; ++nRed) { const SwRangeRedline* pRedline = rRedTable[nRed]; auto [pRedStart, pRedEnd]= pRedline->StartEnd(); - const SwNodeIndex nRedNode = pRedStart->nNode; - if ( nOwnNode == nRedNode ) + if ( rOwnNode == pRedStart->GetNode() ) rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>( pRedline, true ) ); - if( pRedline->HasMark() && pRedEnd->nNode == nOwnNode ) + if( pRedline->HasMark() && pRedEnd->GetNode() == rOwnNode ) rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>( pRedline, false ) ); } diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 4aa075ed0ffb..91ad6b3525cb 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1690,8 +1690,8 @@ SwXText::convertToTextFrame( // If there is no content in the frame the shape is in // it gets deleted in the DelFullPara call below, // In this case insert a tmp text node ( we delete it later ) - if (pStartPam->Start()->nNode == pEndPam->Start()->nNode - && pStartPam->End()->nNode == pEndPam->End()->nNode) + if (pStartPam->Start()->GetNode() == pEndPam->Start()->GetNode() + && pStartPam->End()->GetNode() == pEndPam->End()->GetNode()) { SwPosition aEnd(*pStartPam->End()); bParaAfterInserted = GetDoc()->getIDocumentContentOperations().AppendTextNode( aEnd ); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index afa4516ea621..0a152b678476 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -245,11 +245,11 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) sal_Int32 nStrPos = rWrt.m_pCurrentPam->GetPoint()->GetContentIndex(); const sal_Int32 nNodeEnd = rNd.Len(); sal_Int32 nEnd = nNodeEnd; - bool bLastNd = rWrt.m_pCurrentPam->GetPoint()->nNode == rWrt.m_pCurrentPam->GetMark()->nNode; + bool bLastNd = rWrt.m_pCurrentPam->GetPoint()->GetNode() == rWrt.m_pCurrentPam->GetMark()->GetNode(); if( bLastNd ) nEnd = rWrt.m_pCurrentPam->GetMark()->GetContentIndex(); - bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->nNode == rWrt.m_pOrigPam->End()->nNode && !getenv("SW_ASCII_COPY_NUMBERING"); + bool bIsOneParagraph = rWrt.m_pOrigPam->Start()->GetNode() == rWrt.m_pOrigPam->End()->GetNode() && !getenv("SW_ASCII_COPY_NUMBERING"); SwASC_AttrIter aAttrIter( static_cast<SwASCWriter&>(rWrt), rNd, nStrPos ); SwASC_RedlineIter redlineIter(static_cast<SwASCWriter&>(rWrt), rNd); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 0efbf982592d..97711c3e5430 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2182,7 +2182,7 @@ Writer& OutHTML_SwTextNode( Writer& rWrt, const SwContentNode& rNode ) bFlysLeft = rHTMLWrt.OutFlyFrame( rNode.GetIndex(), 0, HtmlPosition::Before ); } - if( rHTMLWrt.m_pCurrentPam->GetPoint()->nNode == rHTMLWrt.m_pCurrentPam->GetMark()->nNode ) + if( rHTMLWrt.m_pCurrentPam->GetPoint()->GetNode() == rHTMLWrt.m_pCurrentPam->GetMark()->GetNode() ) { nEnd = rHTMLWrt.m_pCurrentPam->GetMark()->GetContentIndex(); } diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx index d1e6ebbbfaa9..c33f66cb0d1b 100644 --- a/sw/source/filter/html/htmlgrin.cxx +++ b/sw/source/filter/html/htmlgrin.cxx @@ -1434,7 +1434,7 @@ void SwHTMLParser::StripTrailingPara() if (pAPos && ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) || (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) && - pAPos->nNode == nNodeIdx ) + pAPos->GetNodeIndex() == nNodeIdx ) return; // we can't delete the node } diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index a1eb92a17eae..c3fa16f24fde 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -754,7 +754,7 @@ void SwHTMLParser::Continue( HtmlTokenId nToken ) { const sal_Int32 nStt = pTextNode->GetText().getLength(); // when the cursor is still in the node, then set him at the end - if( m_pPam->GetPoint()->nNode == aNxtIdx ) + if( m_pPam->GetPoint()->GetNode() == aNxtIdx.GetNode() ) { m_pPam->GetPoint()->Assign( *pTextNode, nStt ); } @@ -4547,7 +4547,7 @@ void SwHTMLParser::EndDefListItem( HtmlTokenId nToken ) bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, bool bSurroundOnly ) const { - SwNodeIndex& rNodeIdx = m_pPam->GetPoint()->nNode; + SwNode& rNode = m_pPam->GetPoint()->GetNode(); const SwFrameFormats& rFrameFormatTable = *m_xDoc->GetSpzFrameFormats(); @@ -4566,7 +4566,7 @@ bool SwHTMLParser::HasCurrentParaFlys( bool bNoSurroundOnly, if (pAPos && ((RndStdIds::FLY_AT_PARA == pAnchor->GetAnchorId()) || (RndStdIds::FLY_AT_CHAR == pAnchor->GetAnchorId())) && - pAPos->nNode == rNodeIdx ) + pAPos->GetNode() == rNode ) { if( !(bNoSurroundOnly || bSurroundOnly) ) { diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index f89151ee629b..f3b5b1e0d1a9 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -124,7 +124,7 @@ ErrCode SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam { // If the PaM points to the first new node, move the PaM to the // end of the previous node. - if (aPam.GetPoint()->nNode == aNxtIdx) + if (aPam.GetPoint()->GetNode() == aNxtIdx.GetNode()) { aPam.GetPoint()->Assign(*pTextNode, pTextNode->GetText().getLength()); } diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 640cec57bcc9..40c524110383 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -462,15 +462,15 @@ bool Writer::GetBookmarks(const SwContentNode& rNd, sal_Int32 nStt, { const ::sw::mark::IMark& rBkmk = *(it->second); sal_Int32 nContent; - if( rBkmk.GetMarkPos().nNode == nNd && + if( rBkmk.GetMarkPos().GetNode() == rNd && (nContent = rBkmk.GetMarkPos().GetContentIndex() ) >= nStt && nContent < nEnd ) { rArr.push_back( &rBkmk ); } - else if( rBkmk.IsExpanded() && nNd == - rBkmk.GetOtherMarkPos().GetNodeIndex() && (nContent = - rBkmk.GetOtherMarkPos().GetContentIndex() ) >= nStt && + else if( rBkmk.IsExpanded() && + (rNd == rBkmk.GetOtherMarkPos().GetNode()) && + (nContent = rBkmk.GetOtherMarkPos().GetContentIndex()) >= nStt && nContent < nEnd ) { rArr.push_back( &rBkmk ); diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx index 78a70f5e90ac..f5c318b6df23 100644 --- a/sw/source/filter/ww8/WW8TableInfo.cxx +++ b/sw/source/filter/ww8/WW8TableInfo.cxx @@ -705,7 +705,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox, pNodeInfo = insertTableNodeInfo(&rNode, pTable, pBoxToSet, nRow, nCell, nDepth); - if (aPaM.GetPoint()->nNode == aEndPaM.GetPoint()->nNode) + if (aPaM.GetPoint()->GetNode() == aEndPaM.GetPoint()->GetNode()) bDone = true; else aPaM.GetPoint()->nNode++; diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx index 3b5f44ae1a7e..80a75c4bd2c0 100644 --- a/sw/source/filter/ww8/writerhelper.cxx +++ b/sw/source/filter/ww8/writerhelper.cxx @@ -130,16 +130,16 @@ namespace return aRet; } - //Utility to test if a frame is anchored at a given node index + //Utility to test if a frame is anchored at a given node class anchoredto { private: - SwNodeOffset mnNode; + const SwNode& mrNode; public: - explicit anchoredto(SwNodeOffset nNode) : mnNode(nNode) {} + explicit anchoredto(const SwNode& rNode) : mrNode(rNode) {} bool operator()(const ww8::Frame &rFrame) const { - return (mnNode == rFrame.GetPosition().GetNode().GetIndex()); + return (mrNode == rFrame.GetPosition().GetNode()); } }; } @@ -506,7 +506,7 @@ namespace sw { ww8::Frames aRet; std::copy_if(rFrames.begin(), rFrames.end(), - std::back_inserter(aRet), anchoredto(rNode.GetIndex())); + std::back_inserter(aRet), anchoredto(rNode)); return aRet; } diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index e7d637e1de2f..15e51affd20b 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -287,7 +287,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) if( m_pCurRedline ) { const SwPosition* pEnd = m_pCurRedline->End(); - if (pEnd->nNode == m_rNode) + if (pEnd->GetNode() == m_rNode) { const sal_Int32 i = pEnd->GetContentIndex(); if ( i >= nStartPos && i < nMinPos ) @@ -310,7 +310,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* - if( pStt->nNode == m_rNode ) + if( pStt->GetNode() == m_rNode ) { const sal_Int32 i = pStt->GetContentIndex(); if( i >= nStartPos && i < nMinPos ) @@ -319,7 +319,7 @@ sal_Int32 SwWW8AttrIter::SearchNext( sal_Int32 nStartPos ) else break; - if( pEnd->nNode == m_rNode ) + if( pEnd->GetNode() == m_rNode ) { const sal_Int32 i = pEnd->GetContentIndex(); if( i >= nStartPos && i < nMinPos ) @@ -1498,7 +1498,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons // Here we find out if the para end marker we will emit is affected by // redlining, in which case it must be included by the range of character // attributes that contains the redlining information. - if (pEnd->nNode == m_rNode) + if (pEnd->GetNode() == m_rNode) { if (pEnd->GetContentIndex() == nEnd) { @@ -1510,7 +1510,7 @@ bool SwWW8AttrIter::IncludeEndOfParaCRInRedlineProperties( sal_Int32 nEnd ) cons } bBreak = false; } - if (pStart->nNode == m_rNode) + if (pStart->GetNode() == m_rNode) { if (pStart->GetContentIndex() == nEnd) { @@ -1549,7 +1549,7 @@ const SwRedlineData* SwWW8AttrIter::GetParagraphLevelRedline( ) { const SwPosition* pCheckedStt = pRedl->Start(); - if( pCheckedStt->nNode == m_rNode ) + if( pCheckedStt->GetNode() == m_rNode ) { // Maybe add here a check that also the start & end of the redline is the entire paragraph @@ -1596,7 +1596,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos ) auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* - if( pStt->nNode == m_rNode ) + if( pStt->GetNode() == m_rNode ) { if( pStt->GetContentIndex() >= nPos ) { @@ -1622,7 +1622,7 @@ const SwRedlineData* SwWW8AttrIter::GetRunLevelRedline( sal_Int32 nPos ) break; } - if( pEnd->nNode == m_rNode && + if( pEnd->GetNode() == m_rNode && pEnd->GetContentIndex() < nPos ) { m_pCurRedline = pRedl; @@ -1853,7 +1853,7 @@ static SwTextFormatColl& lcl_getFormatCollection( MSWordExportBase& rExport, con auto [pStt, pEnd] = pRedl->StartEnd(); // SwPosition* // Looking for deletions, which ends in current pTextNode if( RedlineType::Delete == pRedl->GetRedlineData().GetType() && - pEnd->nNode == *pTextNode && pStt->nNode != *pTextNode && + pEnd->GetNode() == *pTextNode && pStt->GetNode() != *pTextNode && pStt->GetNode().IsTextNode() ) { pTextNode = pStt->GetNode().GetTextNode(); @@ -1961,7 +1961,6 @@ bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector& rArr ) { IDocumentMarkAccess* const pMarkAccess = m_rDoc.getIDocumentMarkAccess(); - SwNodeOffset nNd = rNd.GetIndex( ); const sal_Int32 nMarks = pMarkAccess->getAllMarksCount(); for ( sal_Int32 i = 0; i < nMarks; i++ ) @@ -1986,15 +1985,15 @@ bool MSWordExportBase::GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, } // Only keep the bookmarks starting or ending in this node - if ( pMark->GetMarkStart().nNode == nNd || - pMark->GetMarkEnd().nNode == nNd ) + if ( pMark->GetMarkStart().GetNode() == rNd || + pMark->GetMarkEnd().GetNode() == rNd ) { const sal_Int32 nBStart = pMark->GetMarkStart().GetContentIndex(); const sal_Int32 nBEnd = pMark->GetMarkEnd().GetContentIndex(); // Keep only the bookmarks starting or ending in the snippet - bool bIsStartOk = ( pMark->GetMarkStart().nNode == nNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd ); - bool bIsEndOk = ( pMark->GetMarkEnd().nNode == nNd ) && ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); + bool bIsStartOk = ( pMark->GetMarkStart().GetNode() == rNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd ); + bool bIsEndOk = ( pMark->GetMarkEnd().GetNode() == rNd ) && ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); if ( bIsStartOk || bIsEndOk ) { @@ -2009,7 +2008,7 @@ bool MSWordExportBase::GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int3 sal_Int32 nEnd, IMarkVector& rArr ) { IDocumentMarkAccess* const pMarkAccess = m_rDoc.getIDocumentMarkAccess(); - SwNodeOffset nNd = rAttrs.GetNode().GetIndex(); + const SwNode& rNd = rAttrs.GetNode(); const sal_Int32 nMarks = pMarkAccess->getAnnotationMarksCount(); for ( sal_Int32 i = 0; i < nMarks; i++ ) @@ -2017,20 +2016,20 @@ bool MSWordExportBase::GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int3 IMark* pMark = pMarkAccess->getAnnotationMarksBegin()[i]; // Only keep the bookmarks starting or ending in this node - if ( pMark->GetMarkStart().nNode == nNd || - pMark->GetMarkEnd().nNode == nNd ) + if ( pMark->GetMarkStart().GetNode() == rNd || + pMark->GetMarkEnd().GetNode() == rNd ) { const sal_Int32 nBStart = pMark->GetMarkStart().GetContentIndex(); const sal_Int32 nBEnd = pMark->GetMarkEnd().GetContentIndex(); // Keep only the bookmarks starting or ending in the snippet - bool bIsStartOk = ( pMark->GetMarkStart().nNode == nNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd ); - bool bIsEndOk = ( pMark->GetMarkEnd().nNode == nNd ) && ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); + bool bIsStartOk = ( pMark->GetMarkStart().GetNode() == rNd ) && ( nBStart >= nStt ) && ( nBStart <= nEnd ); + bool bIsEndOk = ( pMark->GetMarkEnd().GetNode() == rNd ) && ( nBEnd >= nStt ) && ( nBEnd <= nEnd ); // Annotation marks always have at least one character: the anchor // point of the comment field. In this case Word wants only the // comment field, so ignore the annotation mark itself. - bool bSingleChar = pMark->GetMarkStart().nNode == pMark->GetMarkEnd().nNode && nBStart + 1 == nBEnd; + bool bSingleChar = pMark->GetMarkStart().GetNode() == pMark->GetMarkEnd().GetNode() && nBStart + 1 == nBEnd; if (bSingleChar) { @@ -2142,10 +2141,10 @@ void MSWordExportBase::GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sa const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex(); const SwTextNode& rNode = rAttrs.GetNode(); - if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) + if ( nStart > nCurrentPos && ( pMark->GetMarkStart().GetNode() == rNode) ) aSortedStart.push_back( pMark ); - if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) + if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().GetNode() == rNode) ) aSortedEnd.push_back( pMark ); } @@ -2175,10 +2174,10 @@ void MSWordExportBase::GetSortedBookmarks( const SwTextNode& rNode, sal_Int32 nC const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex(); const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex(); - if ( nStart > nCurrentPos && ( pMark->GetMarkStart().nNode == rNode.GetIndex()) ) + if ( nStart > nCurrentPos && (pMark->GetMarkStart().GetNode() == rNode) ) aSortedStart.push_back( pMark ); - if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().nNode == rNode.GetIndex()) ) + if ( nEnd > nCurrentPos && nEnd <= ( nCurrentPos + nLen ) && (pMark->GetMarkEnd().GetNode() == rNode) ) aSortedEnd.push_back( pMark ); } diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index e5a4ffd3ed87..967debe85dc4 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1435,7 +1435,7 @@ void WW8Export::AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, s const SwPosition* pOPos = nullptr; if(rBkmk.IsExpanded()) pOPos = &rBkmk.GetOtherMarkPos(); - if( pOPos && pOPos->nNode == pPos->nNode && + if( pOPos && pOPos->GetNode() == pPos->GetNode() && pOPos->nContent < pPos->nContent ) { pPos = pOPos; @@ -2754,7 +2754,7 @@ public: bool contentRemainsToExport(ww8::WW8TableInfo *pTableInfo) { bool bSimpleContentRemains = m_pCurPam->GetPoint()->nNode < m_pCurPam->GetMark()->nNode || - (m_pCurPam->GetPoint()->nNode == m_pCurPam->GetMark()->nNode && + (m_pCurPam->GetPoint()->GetNode() == m_pCurPam->GetMark()->GetNode() && m_pCurPam->GetPoint()->GetContentIndex() <= m_pCurPam->GetMark()->GetContentIndex()); if (bSimpleContentRemains) return true; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 7021a7d53633..8d07a23ba23e 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -2905,7 +2905,7 @@ bool WW8TabDesc::InFirstParaInCell() const if (!IsValidCell(GetCurrentCol())) return false; - return m_pIo->m_pPaM->GetPoint()->nNode == m_pTabBox->GetSttIdx() + 1; + return m_pIo->m_pPaM->GetPoint()->GetNodeIndex() == m_pTabBox->GetSttIdx() + 1; } void WW8TabDesc::SetPamInCell(short nWwCol, bool bPam) diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index 971059732e14..bfa7cb9675fa 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -656,7 +656,7 @@ void SwXMLImport::endDocument() { // If the PaM points to the first new node, move the PaM to the // end of the previous node. - if( pPaM->GetPoint()->nNode == aNxtIdx ) + if( pPaM->GetPoint()->GetNode() == aNxtIdx.GetNode() ) { pPaM->GetPoint()->Assign( *pTextNode, pTextNode->GetText().getLength()); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 4309517f4a21..6ac9a12aedc6 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -256,7 +256,7 @@ IMPL_LINK(SwInsertBookmarkDlg, EditingHdl, weld::TreeIter const&, rIter, bool) weld::fromId<sw::mark::IMark*>(m_xBookmarksBox->get_id(rIter))); assert(pBookmark); return pBookmark->IsExpanded() - && pBookmark->GetMarkPos().nNode == pBookmark->GetOtherMarkPos().nNode + && pBookmark->GetMarkPos().GetNode() == pBookmark->GetOtherMarkPos().GetNode() && !m_xBookmarksBox->get_text(rIter).endsWith(u"…"); } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 044c2790f2d1..03b20b333f2e 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -253,7 +253,7 @@ void SwWrtShell::Insert( const OUString &rStr ) bStarted = true; Push(); // let's interpret a selection within the same node as "replace" - bDeleted = DelRight(GetCursor()->GetPoint()->nNode == GetCursor()->GetMark()->nNode); + bDeleted = DelRight(GetCursor()->GetPoint()->GetNode() == GetCursor()->GetMark()->GetNode()); Pop(SwCursorShell::PopMode::DeleteCurrent); // Restore selection (if tracking changes) NormalizePam(false); // tdf#127635 put point at the end of deletion ClearMark(); |