summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-04-16 15:17:13 -0400
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-04-17 00:10:50 +0000
commit8d63fce4ec73aa4ee9fd5348fe675e4f0b0a3b6b (patch)
tree520faf2f574f2bf8f8853e09133b523736abb4da
parent9585ea8a3f10be60c42b671a07dfafd78f173e52 (diff)
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 <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/undo/undoblk3.cxx11
1 files 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);
}