summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-08-03 11:39:07 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-04 09:56:12 +0200
commit64eba246de2277602eb10f26789093ba3c066b5b (patch)
tree8d1271fdf5ebe2048605b5d4b6d0e91169801dd5 /svx
parent9ab633b5ea1266e354a3d0f122dff9c10c4e7120 (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> (cherry picked from commit 4acac00df5a85ff006ecead06c4018e88caaf401)
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdundo.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index 835d34be58d0..28064e702f6f 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),