diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-23 15:19:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-08-23 19:05:21 +0200 |
commit | 0de37cdd0251a7fc080bc6b95ac8708833bd0552 (patch) | |
tree | 9c3b5ea9109e37553e569541fd5c4f729aba8c1e /sw/source/uibase/dochdl | |
parent | 285f5306d75892963707b64a3782850c80d4a315 (diff) |
Use more SwPosition::Adjust
to keep the internal fields of SwPosition in sync.
Change-Id: I46dbb7e562cf41dcceab57e2f5bf1e19babb955a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138731
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/dochdl')
-rw-r--r-- | sw/source/uibase/dochdl/swdtflvr.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index a735c9dffc73..c6610e387ca0 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -1339,14 +1339,13 @@ SwPasteContext::~SwPasteContext() *m_oPaM->GetMark() = *pCursor->GetPoint(); // Restore point. - ++m_oPaM->GetPoint()->nNode; + m_oPaM->GetPoint()->Adjust(SwNodeOffset(1)); SwNode& rNode = m_oPaM->GetPointNode(); if (!rNode.IsTextNode()) // Starting point is no longer text. return; - m_oPaM->GetPoint()->nContent.Assign(static_cast<SwContentNode*>(&rNode), - m_nStartContent); + m_oPaM->GetPoint()->SetContent(m_nStartContent); aPropertyValue.Name = "TextRange"; const uno::Reference<text::XTextRange> xTextRange = SwXTextRange::CreateXTextRange( |