[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sat Oct 24 18:09:23 UTC 2020
svx/source/dialog/weldeditview.cxx | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 3b29b80398d9e3b8c086c8d45599611440239b86
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 23 15:55:30 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sat Oct 24 20:08:35 2020 +0200
use SetSelection and DeleteSelected to make cursor go to the right place
Change-Id: I6452f9a45fac67b64c7b84f290029e96eb9623e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104735
Tested-by: Justin Luth <justin_luth at sil.org>
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth at sil.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/dialog/weldeditview.cxx b/svx/source/dialog/weldeditview.cxx
index 1031385282e5..c90b211cee23 100644
--- a/svx/source/dialog/weldeditview.cxx
+++ b/svx/source/dialog/weldeditview.cxx
@@ -1449,15 +1449,14 @@ int WeldEditView::GetSurroundingText(OUString& rSurrounding)
bool WeldEditView::DeleteSurroundingText(const Selection& rRange)
{
bool bRes(false);
- EditEngine* pEditEngine = m_xEditView ? m_xEditView->GetEditEngine() : nullptr;
- if (pEditEngine)
+ if (m_xEditView)
{
ESelection aSel(m_xEditView->GetSelection());
aSel.nEndPara = aSel.nStartPara;
aSel.nStartPos = rRange.Min();
aSel.nEndPos = rRange.Max();
- pEditEngine->QuickDelete(aSel);
- pEditEngine->QuickFormatDoc();
+ m_xEditView->SetSelection(aSel);
+ m_xEditView->DeleteSelected();
bRes = true;
}
return bRes;
More information about the Libreoffice-commits
mailing list