diff options
-rw-r--r-- | include/svl/undo.hxx | 2 | ||||
-rw-r--r-- | svl/source/undo/undo.cxx | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index 59adae466895..69664720e98b 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -59,6 +59,8 @@ public: virtual OUString GetComment() const; virtual OUString GetRepeatComment(SfxRepeatTarget&) const; virtual sal_uInt16 GetId() const; + /// ID of the view shell that created this undo action. + virtual sal_Int32 GetViewShellId() const; virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const; private: diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 4b0dda7070fc..2de91945e2fc 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -72,6 +72,10 @@ sal_uInt16 SfxUndoAction::GetId() const return 0; } +sal_Int32 SfxUndoAction::GetViewShellId() const +{ + return -1; +} OUString SfxUndoAction::GetRepeatComment(SfxRepeatTarget&) const { @@ -125,6 +129,7 @@ void SfxUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("symbol"), BAD_CAST(typeid(*this).name())); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("comment"), BAD_CAST(GetComment().toUtf8().getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("viewShellId"), BAD_CAST(OString::number(GetViewShellId()).getStr())); xmlTextWriterEndElement(pWriter); } |