summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/docbm.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-19 10:32:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-19 13:39:00 +0200
commit390c7b97ad674a8281735980120733a48e5d89a3 (patch)
treee0cbd8f3e0b0397f58bbbe8f4ceda4dc2cde769d /sw/source/core/doc/docbm.cxx
parenteb8252f738bfd1689edee205c6a5e13643f89c29 (diff)
use more SwPosition::GetContentIndex
part of the process of hiding the internals of SwPosition Change-Id: Iaf038c006fc9f82073664536278aac4d44754340 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138512 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.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index 2da73745fb2f..52461872b6e0 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -190,7 +190,7 @@ namespace
return oContentIdx.has_value()
? ( rPos.GetNode() > rNdIdx
|| ( rPos.GetNode() == rNdIdx
- && rPos.nContent >= *oContentIdx ) )
+ && rPos.GetContentIndex() >= *oContentIdx ) )
: rPos.GetNode() >= rNdIdx;
}
@@ -199,7 +199,7 @@ namespace
return rPos.GetNode() < rNdIdx
|| ( oContentIdx.has_value()
&& rPos.GetNode() == rNdIdx
- && rPos.nContent < *oContentIdx );
+ && rPos.GetContentIndex() < *oContentIdx );
}
bool lcl_MarkOrderingByStart(const ::sw::mark::MarkBase *const pFirst,
@@ -998,11 +998,11 @@ namespace sw::mark
if ( oEndContentIdx.has_value()
&& ( ( rbIsOtherPosInRange
&& pMark->GetMarkPos().GetNode() == rEnd
- && pMark->GetMarkPos().nContent == *oEndContentIdx )
+ && pMark->GetMarkPos().GetContentIndex() == *oEndContentIdx )
|| ( rbIsPosInRange
&& pMark->IsExpanded()
&& pMark->GetOtherMarkPos().GetNode() == rEnd
- && pMark->GetOtherMarkPos().nContent == *oEndContentIdx ) ) )
+ && pMark->GetOtherMarkPos().GetContentIndex() == *oEndContentIdx ) ) )
{
rbIsPosInRange = true;
rbIsOtherPosInRange = true;
@@ -1029,7 +1029,7 @@ namespace sw::mark
|| pMark->IsExpanded()
|| !oStartContentIdx.has_value()
|| pMark->GetMarkPos().nNode != rStt
- || pMark->GetMarkPos().nContent != *oStartContentIdx;
+ || pMark->GetMarkPos().GetContentIndex() != *oStartContentIdx;
break;
default:
bDeleteMark = true;
@@ -1782,7 +1782,8 @@ namespace
{
bool lcl_Greater( const SwPosition& rPos, const SwNode& rNdIdx, std::optional<sal_Int32> oContentIdx )
{
- return rPos.GetNode() > rNdIdx || ( oContentIdx && rPos.GetNode() == rNdIdx && rPos.nContent > *oContentIdx );
+ return rPos.GetNode() > rNdIdx ||
+ ( oContentIdx && rPos.GetNode() == rNdIdx && rPos.GetContentIndex() > *oContentIdx );
}
}