summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-23 13:57:46 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-23 15:19:43 +0200
commit0925dc81415276932aef66107b2d924b22c02d1e (patch)
tree3ea39ece7f2491b99a102b51a9395cbf5cc70ed9 /sw/source/uibase/wrtsh
parentfc10c4a3a7700fc96890149ae9095206b5e67685 (diff)
Use more SwPosition::Adjust
to keep the internal fields of SwPosition in sync. Change-Id: I9a9889a819a3998aa4ff2188a2dc3e0cb2ec6888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138727 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r--sw/source/uibase/wrtsh/delete.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx
index 12a2f35b583a..4351f6f6acbb 100644
--- a/sw/source/uibase/wrtsh/delete.cxx
+++ b/sw/source/uibase/wrtsh/delete.cxx
@@ -242,8 +242,7 @@ bool SwWrtShell::DelLeft()
{
// If we are just to the right to a fieldmark, then remove it completely
const SwPosition* pCurPos = GetCursor()->GetPoint();
- SwPosition aPrevChar(*pCurPos);
- --aPrevChar.nContent;
+ SwPosition aPrevChar(*pCurPos->GetContentNode(), pCurPos->GetContentIndex() - 1);
sw::mark::IFieldmark* pFm = getIDocumentMarkAccess()->getFieldmarkAt(aPrevChar);
if (pFm && pFm->GetMarkEnd() == *pCurPos)
{