From 8d63fce4ec73aa4ee9fd5348fe675e4f0b0a3b6b Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Wed, 16 Apr 2014 15:17:13 -0400 Subject: fdo#74687: Undo & redo of format-only changes don't need broadcasting. Also discovered that the undo path was broadcasting twice. Let's only do it once. Change-Id: I169f1659aecb1eb78be3a497e244f79c5883e50f (cherry picked from commit 1d1fbbe81b4435765d3f69c6bcae2840dc629912) Reviewed-on: https://gerrit.libreoffice.org/9075 Tested-by: Markus Mohrhard Reviewed-by: Markus Mohrhard --- sc/source/ui/undo/undoblk3.cxx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 3239b1c0f8b8..a06a07627ebf 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -141,7 +141,6 @@ void ScUndoDeleteContents::DoChange( const sal_Bool bUndo ) aCopyRange.aEnd.SetTab(nTabCount-1); pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, bMulti, pDoc, &aMarkData ); - BroadcastChanges(aCopyRange); DoSdrUndoAction( pDrawUndo, pDoc ); @@ -183,7 +182,10 @@ void ScUndoDeleteContents::Undo() DoChange( sal_True ); EndUndo(); - BroadcastChanges(aRange); + if (nFlags & IDF_CONTENTS) + // Broadcast only when the content changes. fdo#74687 + BroadcastChanges(aRange); + HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange); } @@ -193,7 +195,10 @@ void ScUndoDeleteContents::Redo() DoChange( false ); EndRedo(); - BroadcastChanges(aRange); + if (nFlags & IDF_CONTENTS) + // Broadcast only when the content changes. fdo#74687 + BroadcastChanges(aRange); + HelperNotifyChanges::NotifyIfChangesListeners(*pDocShell, aRange); } -- cgit v1.2.1