Kaydet (Commit) 65eaebd2 authored tarafından Paul Trojahn's avatar Paul Trojahn Kaydeden (comit) Caolán McNamara

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/57286Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e2a5932d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment