diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2018-07-09 20:36:09 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-08-10 10:56:56 +0200 |
commit | 8300bbf30c5a53bdb462f1d2ed9049e1c0ce9cdc (patch) | |
tree | f12bc7e0ff2bb5f496315ff6dcbe306170edf0cd /editeng | |
parent | ede9b0f7a435b449f3eeb3448adc520e1d4790a2 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 65eaebd2879c18926d4672c9276ef7f73f87af99)
Reviewed-on: https://gerrit.libreoffice.org/58218
Tested-by: Jenkins
Reviewed-by: Paul Trojahn <paul.trojahn@gmail.com>
(cherry picked from commit c47d8e5fc91fa3f067eb4955fd5bd27cbffd5d51)
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 67fa9f3e0fed..c39295b11a2d 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -632,7 +632,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; } |