summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorPaul Trojahn <paul.trojahn@gmail.com>2018-07-09 20:36:09 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-07-28 16:48:02 +0200
commit19d6d196c9bc70f7a5938c89830b57dbdcfb8801 (patch)
tree59434d6cdc012a17255bd1f337b1f635f4ede349 /editeng
parentc20eb29560fa9d9e552c799203156c0742451eba (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/58136 Tested-by: Jenkins Reviewed-by: Paul Trojahn <paul.trojahn@gmail.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 4c2c0c73a3e4..4bd83aa6e644 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -614,7 +614,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;
}