summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-11-30 14:47:58 +0100
committerEike Rathke <erack@redhat.com>2016-11-30 15:21:57 +0000
commitbc04956ca38c0100784845118cff43931956ae35 (patch)
tree16017e0e789920d6559b6a6a254ec701d886b321
parentce679e36e5e5d90afd9ef48fe5e3502dab5d1a71 (diff)
Resolves: tdf#104152 suppress notifications from EditEngine during Paste
Broadcast once at the end instead to notify a11y. Change-Id: I12383b6efbbb2b149f0d73c67d8576fcc050b253 (cherry picked from commit 7c20d0174c59d46b11fc5029fe3fc0c00f5dc6d0) Reviewed-on: https://gerrit.libreoffice.org/31424 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r--editeng/source/editeng/impedit.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index eeacfe0bdb4c..e4eb6156b27e 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1521,9 +1521,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() );