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-10 15:23:32 +0200 |
commit | 4fbc3dbe44857b52677844c47a750abc40713d60 (patch) | |
tree | ae53141b6530685434a9ae26ca1b8fd581601012 /sw/source/uibase | |
parent | e980542150085b65567ffe85c6acb72aa5f6e13a (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>
(cherry picked from commit 5d8639aaf2f60157c99c3ee3a8bfa78e4efd010a)
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/shells/basesh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtundo.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx index 0b8fb13380cf..4d3b743de106 100644 --- a/sw/source/uibase/shells/basesh.cxx +++ b/sw/source/uibase/shells/basesh.cxx @@ -526,7 +526,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))); @@ -537,7 +537,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))); diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index d8e7ed8498a0..d7da499af1fe 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -102,11 +102,11 @@ OUString SwWrtShell::GetDoString( DoType eDoType ) const { case UNDO: nResStr = STR_UNDO; - (void)GetLastUndoInfo(&aUndoStr, nullptr); + (void)GetLastUndoInfo(&aUndoStr, nullptr, &m_rView); break; case REDO: nResStr = STR_REDO; - (void)GetFirstRedoInfo(&aUndoStr); + (void)GetFirstRedoInfo(&aUndoStr, &m_rView); break; default:;//prevent warning } |