diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-04 15:55:45 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-08-05 14:32:28 +0200 |
commit | e3d57b2c8219fff9653120558eb363ebc5672e3e (patch) | |
tree | 1713f4f86f8a703e641ce8741d40ad88a4082ce4 /svl/source | |
parent | 8094a21526cd46074d529509c00a03d0839fc28e (diff) |
svl: track creation time of SfxUndoAction instances
It's not yet clear how to expose this on the UI, though.
Reviewed-on: https://gerrit.libreoffice.org/27878
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 33a5ab1eb74d140265b471fb33ca98aca7cfb1a6)
Conflicts:
svl/source/undo/undo.cxx
Change-Id: Iee6737922d36e896653b4fae557442747dda1b8b
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/undo/undo.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx index 8481ed3986ab..0fa3867326f3 100644 --- a/svl/source/undo/undo.cxx +++ b/svl/source/undo/undo.cxx @@ -26,6 +26,7 @@ #include <comphelper/flagguard.hxx> #include <tools/diagnose_ex.h> #include <libxml/xmlwriter.h> +#include <unotools/datetime.hxx> #include <vector> #include <list> @@ -62,7 +63,8 @@ SfxUndoAction::~SfxUndoAction() SfxUndoAction::SfxUndoAction() -: mpSfxLinkUndoAction(nullptr) +: mpSfxLinkUndoAction(nullptr), + m_aDateTime(DateTime::SYSTEM) { } @@ -89,6 +91,11 @@ sal_Int32 SfxUndoAction::GetViewShellId() const return -1; } +const DateTime& SfxUndoAction::GetDateTime() const +{ + return m_aDateTime; +} + OUString SfxUndoAction::GetRepeatComment(SfxRepeatTarget&) const { return GetComment(); @@ -142,6 +149,7 @@ void SfxUndoAction::dumpAsXml(xmlTextWriterPtr pWriter) const 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())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("dateTime"), BAD_CAST(utl::toISO8601(m_aDateTime.GetUNODateTime()).toUtf8().getStr())); xmlTextWriterEndElement(pWriter); } |