diff options
author | Eike Rathke <erack@redhat.com> | 2016-11-30 14:47:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-12-07 09:04:04 +0000 |
commit | e38a78b0ebd4239942b573ab120451ee2851d125 (patch) | |
tree | 87aa412b953a376c0230d40050bb2a036e4465d4 | |
parent | 0af5348f5d724abc6047055d1585fe3fda9ee6e1 (diff) |
Resolves: tdf#104152 suppress notifications from EditEngine during Paste
Broadcast once at the end instead to notify a11y.
(cherry picked from commit 7c20d0174c59d46b11fc5029fe3fc0c00f5dc6d0)
Conflicts:
editeng/source/editeng/impedit.cxx
Change-Id: I12383b6efbbb2b149f0d73c67d8576fcc050b253
Reviewed-on: https://gerrit.libreoffice.org/31427
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 59f20a4587b3..13d98c05a010 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1440,9 +1440,14 @@ void ImpEditView::Paste( css::uno::Reference< css::datatransfer::clipboard::XCli } else { + // Prevent notifications of paragraph inserts et al that would trigger + // a11y to format content in a half-ready state when obtaining + // paragraphs. Collect and broadcast when done instead. + pEditEngine->pImpEditEngine->EnterBlockNotifications(); aSel = pEditEngine->InsertText( xDataObj, OUString(), aSel.Min(), bUseSpecial && pEditEngine->GetInternalEditStatus().AllowPasteSpecial()); + pEditEngine->pImpEditEngine->LeaveBlockNotifications(); } aPasteOrDropInfos.nEndPara = pEditEngine->GetEditDoc().GetPos( aSel.Max().GetNode() ); |