diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-08-16 18:44:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-17 18:18:52 +0200 |
commit | 3a02b5f8aae803b7b5a232c724135594483627a4 (patch) | |
tree | 3e51ea888f4ed012295a3736cd4cff7d81ba11c5 /sw/source/core/doc/docbm.cxx | |
parent | a18a74d6762e56a20093ca51cfd12925697c2524 (diff) |
convert more nNode to SwPosition::GetNode
in places where we are using the result with operator==
Change-Id: I28f8f6fa2c3754ec6612ab2334c3a58b61ecd065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138401
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/doc/docbm.cxx')
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
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 ); } } |