diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 11:39:07 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-03 11:06:42 +0000 |
commit | 4acac00df5a85ff006ecead06c4018e88caaf401 (patch) | |
tree | 0ac5013cea32e4eaec4e92eaa7b73d8757027a81 /svx | |
parent | 405db7afbdba02eed9a9a4c4f22000fe623b029c (diff) |
svx: track view shell id in SdrUndoAction
This is used in Impress e.g. when resizing a picture.
Change-Id: I2e0a9228ed0ff9ecfd72696ef84e56f88e4c0f70
Reviewed-on: https://gerrit.libreoffice.org/27822
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdundo.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx index ec5f2fe61751..42b8337db3b1 100644 --- a/svx/source/svdraw/svdundo.cxx +++ b/svx/source/svdraw/svdundo.cxx @@ -45,6 +45,7 @@ #include <sdr/contact/viewcontactofgraphic.hxx> #include <svx/svdotable.hxx> // #i124389# #include <vcl/svapp.hxx> +#include <sfx2/viewsh.hxx> // iterates over all views and unmarks this SdrObject if it is marked @@ -57,6 +58,12 @@ static void ImplUnmarkObject( SdrObject* pObj ) } } +SdrUndoAction::SdrUndoAction(SdrModel& rNewMod) + : rMod(rNewMod), m_nViewShellId(-1) +{ + if (SfxViewShell* pViewShell = SfxViewShell::Current()) + m_nViewShellId = pViewShell->GetViewShellId(); +} SdrUndoAction::~SdrUndoAction() {} @@ -95,6 +102,10 @@ OUString SdrUndoAction::GetSdrRepeatComment(SdrView& /*rView*/) const return OUString(); } +sal_Int32 SdrUndoAction::GetViewShellId() const +{ + return m_nViewShellId; +} SdrUndoGroup::SdrUndoGroup(SdrModel& rNewMod) : SdrUndoAction(rNewMod), |