diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-29 13:39:36 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-09-29 17:46:31 +0200 |
commit | b3e07612eb6536aa14f2108484705068fc8e30d8 (patch) | |
tree | a0964e74fa1c46381f5c7bc414bb6747722ac247 | |
parent | 22535b5a6591e1f9f1ebd6c95bc6173f570f0082 (diff) |
use more SwPosition::SetContent
part of the process of hiding the internals of SwPosition.
In thi case we just need to point aDelPam somewhere else, so
that is doesn't point into a node that is about to be deleted.
Change-Id: I7b2ae167af30cebd896565e5e597bcbf79505e80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140734
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/doc/DocumentContentOperationsManager.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx index 2221a5ec49d9..ec52d3ec1221 100644 --- a/sw/source/core/doc/DocumentContentOperationsManager.cxx +++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx @@ -4610,9 +4610,8 @@ bool DocumentContentOperationsManager::ReplaceRangeImpl( SwPaM& rPam, const OUSt OUString(), IDocumentMarkAccess::MarkType::UNO_BOOKMARK, ::sw::mark::InsertMode::New); - SwContentIndex& rIdx = aDelPam.GetPoint()->nContent; - rIdx.Assign( nullptr, 0 ); - aDelPam.GetMark()->nContent = rIdx; + aDelPam.GetPoint()->Assign( SwNodeOffset(0) ); + aDelPam.GetMark()->Assign( SwNodeOffset(0) ); rPam.GetPoint()->Assign( SwNodeOffset(0) ); *rPam.GetMark() = *rPam.GetPoint(); m_rDoc.getIDocumentRedlineAccess().SetRedlineFlags( eOld ); |