diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-30 09:58:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-30 11:20:32 +0200 |
commit | ffe488c38741f4391b2f19440a8d20f4ed38a886 (patch) | |
tree | ea36093724bb311885cce0875e29afa43e485a90 | |
parent | 2b25dac755fbad79a9f30a7295a6e5cf0414d38c (diff) |
use more SwPosition::Assign
part of hiding the internals of SwPosition
Change-Id: Ib3a3867d8eafd66de3c426eacf50d3f7c97fc4da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139016
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index e757f1ec7ba1..95d4fcc040ec 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -139,18 +139,18 @@ namespace SwNodeIndex InitDelCount(SwPaM const& rSourcePaM, SwNodeOffset & rDelCount) { - SwNodeIndex const& rStart(rSourcePaM.Start()->nNode); + SwPosition const& rStart(*rSourcePaM.Start()); // Special handling for SwDoc::AppendDoc if (rSourcePaM.GetDoc().GetNodes().GetEndOfExtras().GetIndex() + 1 - == rStart.GetIndex()) + == rStart.GetNodeIndex()) { rDelCount = SwNodeOffset(1); - return SwNodeIndex(rStart, +1); + return SwNodeIndex(rStart.GetNode(), +1); } else { rDelCount = SwNodeOffset(0); - return rStart; + return SwNodeIndex(rStart.GetNode()); } } |