summaryrefslogtreecommitdiff
path: root/sw/inc/undobj.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-29 17:58:19 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-29 17:02:25 +0000
commitd60708c5116b4c48b30b94095aafd3e77de46f6a (patch)
tree8c15e2088db0fff140e91090caf1369468787e97 /sw/inc/undobj.hxx
parent3ee2cae3a36e5d052e02c3f7b226dc3b79bd2ebc (diff)
sw undo: implement SfxUndoAction::GetViewShellId() interface
With this, it's possible to tell which view shell created which undo actions. It's visible only in the doc model xml dump only, though. Change-Id: Ia76d218a1d8b578aaad00ab733c772b10dda39f0 Reviewed-on: https://gerrit.libreoffice.org/27693 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sw/inc/undobj.hxx')
-rw-r--r--sw/inc/undobj.hxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index 79d890cf022a..14e099fd93de 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -49,6 +49,7 @@ class SwUndo
{
SwUndoId const m_nId;
sal_uInt16 nOrigRedlineMode;
+ sal_Int32 m_nViewShellId;
protected:
bool bCacheComment;
@@ -81,6 +82,8 @@ public: // should not be public, but ran into trouble in untbl.cxx
virtual void RedoImpl( ::sw::UndoRedoContext & ) = 0;
private:
+ /// Try to obtain the view shell ID of the current view.
+ static sal_Int32 CreateViewShellId(const SwDoc* pDoc);
// SfxUndoAction
virtual void Undo() override;
virtual void Redo() override;
@@ -90,7 +93,7 @@ private:
virtual bool CanRepeat(SfxRepeatTarget &) const override;
public:
- SwUndo(SwUndoId const nId);
+ SwUndo(SwUndoId const nId, const SwDoc* pDoc);
virtual ~SwUndo();
/**
@@ -104,6 +107,9 @@ public:
*/
virtual OUString GetComment() const override;
+ /// See SfxUndoAction::GetViewShellId().
+ sal_Int32 GetViewShellId() const override;
+
// UndoObject remembers which mode was turned on.
// In Undo/Redo/Repeat this remembered mode is switched on.
sal_uInt16 GetRedlineMode() const { return nOrigRedlineMode; }