summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-30 13:56:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-30 15:31:16 +0200
commit210042432462316db196464a83763405acc6b698 (patch)
tree97edf209396aa9194f25d77ba96dd2b1c5ef6cf0 /sw
parent0e17717404d147a99d4c1f797298598ba54bb95f (diff)
use more SwPosition::Assign
part of hiding the internals of SwPosition Change-Id: I8dfb5e72563d2036b89ebdf49a7b1c29629ada14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139008 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index a53753299f22..1c8489ab95ce 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -4444,8 +4444,8 @@ bool DocumentContentOperationsManager::DeleteRangeImplImpl(SwPaM & rPam, SwDelet
// If the Node that contained the Cursor has been deleted,
// the Content has to be assigned to the current Content.
- pStt->nContent.Assign( pStt->GetNode().GetContentNode(),
- pStt->GetContentIndex() );
+ if (pStt->GetNode().GetContentNode())
+ pStt->SetContent( pStt->GetContentIndex() );
// If we deleted across Node boundaries we have to correct the PaM,
// because they are in different Nodes now.
@@ -5291,7 +5291,7 @@ bool DocumentContentOperationsManager::CopyImplImpl(SwPaM& rPam, SwPosition& rPo
// If the next node is a start node, then step back: the start node
// has been copied and needs to be in the selection for the undo
if (pCopyPam->GetPoint()->GetNode().IsStartNode())
- pCopyPam->GetPoint()->nNode--;
+ pCopyPam->GetPoint()->Adjust(SwNodeOffset(-1));
}
pCopyPam->Exchange();