diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-04 09:13:33 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-05 14:31:26 +0200 |
commit | 392635220aad1c361897fedeff1c4e7ca5c8476d (patch) | |
tree | 0d86d181b5218b21e4f386f3e9f4c70c8a6d6e39 /sc/source/ui/undo/undobase.cxx | |
parent | ed91412a2f12f59d98575ccd1baa8bbf06d71896 (diff) |
sc: implement SfxUndoAction::GetViewShellId() interface ...
... in SfxUndoAction subclasses
Change-Id: I1504e2cfb0f58ff97e2de7a641d72e4867238164
Reviewed-on: https://gerrit.libreoffice.org/27861
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 7cbb0664b94bb9f4587098c1940de98e4f7aae16)
Diffstat (limited to 'sc/source/ui/undo/undobase.cxx')
-rw-r--r-- | sc/source/ui/undo/undobase.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 64ce53a7bcca..1859b5876035 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -38,8 +38,16 @@ ScSimpleUndo::ScSimpleUndo( ScDocShell* pDocSh ) : pDocShell( pDocSh ), - pDetectiveUndo( nullptr ) + pDetectiveUndo( nullptr ), + mnViewShellId(-1) { + if (ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell()) + mnViewShellId = pViewShell->GetViewShellId(); +} + +sal_Int32 ScSimpleUndo::GetViewShellId() const +{ + return mnViewShellId; } ScSimpleUndo::~ScSimpleUndo() @@ -562,8 +570,11 @@ void ScDBFuncUndo::EndRedo() } ScUndoWrapper::ScUndoWrapper( SfxUndoAction* pUndo ) : - pWrappedUndo( pUndo ) + pWrappedUndo( pUndo ), + mnViewShellId( -1 ) { + if (pWrappedUndo) + mnViewShellId = pWrappedUndo->GetViewShellId(); } ScUndoWrapper::~ScUndoWrapper() @@ -583,6 +594,11 @@ OUString ScUndoWrapper::GetComment() const return OUString(); } +sal_Int32 ScUndoWrapper::GetViewShellId() const +{ + return mnViewShellId; +} + OUString ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const { if (pWrappedUndo) |