[Libreoffice-commits] core.git: include/svl svl/source
Miklos Vajna
vmiklos at collabora.co.uk
Fri Jul 29 12:50:05 UTC 2016
include/svl/undo.hxx | 2 ++
svl/source/undo/undo.cxx | 5 +++++
2 files changed, 7 insertions(+)
New commits:
commit 7494466e43daa4d071224f401267e2b6fd4222aa
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Jul 29 13:58:07 2016 +0200
svl: add SfxUndoAction::GetViewShellId()
In preparation of a Writer version that overrides this and remembers
which view shell introduced which action.
Change-Id: I4970f8ce9c56f1b57ab1ae92f3ea8be804ca27bf
Reviewed-on: https://gerrit.libreoffice.org/27682
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 59adae4..6966472 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 4b0dda7..2de9194 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);
}
More information about the Libreoffice-commits
mailing list