[Libreoffice-commits] core.git: editeng/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jul 26 15:57:28 UTC 2018
editeng/source/editeng/impedit2.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 65eaebd2879c18926d4672c9276ef7f73f87af99
Author: Paul Trojahn <paul.trojahn at gmail.com>
AuthorDate: Mon Jul 9 20:36:09 2018 +0200
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Jul 26 17:57:02 2018 +0200
tdf#115438 Fix freeze when pasting unformatted text
ImpConnectParagraphs calls TextModified, which calculates the selection rectangles of
the paragraph for accessibility services by calling DrawSelectionXOR. When
calling ImpConnectParagraphs from ImpDeleteSelection, the selection isn't
valid, because UpdateSelection wasn't called yet. DrawSelectionXOR ends up
freezing the application, because pEndNode isn't valid.
This can be fixed by calling EnterBlockNotifications, to deliver the notification
sent by TextModified when the insertion is done.
Change-Id: Ia3a0e5b59a28f3503cbc54da682fcdaa5af277be
Reviewed-on: https://gerrit.libreoffice.org/57286
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index f3c9930ed9e8..bd641ce70b7b 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -624,7 +624,9 @@ bool ImpEditEngine::MouseMove( const MouseEvent& rMEvt, EditView* pView )
EditPaM ImpEditEngine::InsertText(const EditSelection& aSel, const OUString& rStr)
{
+ EnterBlockNotifications();
EditPaM aPaM = ImpInsertText( aSel, rStr );
+ LeaveBlockNotifications();
return aPaM;
}
More information about the Libreoffice-commits
mailing list