diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-09 18:13:37 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-09 16:44:27 +0000 |
commit | 5d8639aaf2f60157c99c3ee3a8bfa78e4efd010a (patch) | |
tree | fc3e431ce0398bff382ff792a97e0588a8ca31b0 /sw/source/uibase/shells/basesh.cxx | |
parent | e328cab3c987a057411264209d1393440504a2cd (diff) |
sw lok: limit undo/redo access to undo actions created by the same view
So one view can't undo the changes of an other view by accident. If
this is found to be useful in the desktop case, perhaps a dedicated
config option can be added for it; for now the behavior is LOK-only.
Change-Id: I7ff505d021bd6f6be36953ecc8f8bb971ce8927e
Reviewed-on: https://gerrit.libreoffice.org/28007
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/source/uibase/shells/basesh.cxx')
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index fc2bfb1d963b..6f802bed355f 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -527,7 +527,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) { case SID_UNDO: { - if (rSh.GetLastUndoInfo(nullptr, nullptr)) + if (rSh.GetLastUndoInfo(nullptr, nullptr, &rSh.GetView())) { rSet.Put( SfxStringItem(nWhich, rSh.GetDoString(SwWrtShell::UNDO))); @@ -538,7 +538,7 @@ void SwBaseShell::StateUndo(SfxItemSet &rSet) } case SID_REDO: { - if (rSh.GetFirstRedoInfo(nullptr)) + if (rSh.GetFirstRedoInfo(nullptr, &rSh.GetView())) { rSet.Put(SfxStringItem(nWhich, rSh.GetDoString(SwWrtShell::REDO))); |