summaryrefslogtreecommitdiff
path: root/include/svl
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-03-18 18:24:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-24 06:14:17 +0000
commit7916487cf4d9603cdbe4c7ffbe9bb3f28b51ce4e (patch)
treee3bafe408d8efd97d156521c1ea93d741a5215a8 /include/svl
parent9ee2d69c610d94280103e089671e9ba78b070e23 (diff)
convert ViewShellId to o3tl::strong_int
Change-Id: I45553d11d56aa8c4432aec126ca51f24bd3ead09 Reviewed-on: https://gerrit.libreoffice.org/35421 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svl')
-rw-r--r--include/svl/undo.hxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 3fdfb8b4babc..abb892788cbf 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -22,12 +22,16 @@
#include <svl/svldllapi.h>
#include <rtl/ustring.hxx>
#include <tools/datetime.hxx>
+#include <o3tl/strong_int.hxx>
#include <limits>
#include <memory>
struct MarkedUndoAction;
+struct ViewShellIdTag;
+typedef o3tl::strong_int<sal_Int32, ViewShellIdTag> ViewShellId;
+
class SVL_DLLPUBLIC SfxRepeatTarget
{
public:
@@ -60,7 +64,7 @@ public:
virtual OUString GetComment() const;
virtual OUString GetRepeatComment(SfxRepeatTarget&) const;
/// ID of the view shell that created this undo action.
- virtual sal_Int32 GetViewShellId() const;
+ virtual ViewShellId GetViewShellId() const;
/// Timestamp when this undo item was created.
const DateTime& GetDateTime() const;
virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const;
@@ -134,7 +138,7 @@ class SVL_DLLPUBLIC SfxListUndoAction : public SfxUndoAction, public SfxUndoArra
public:
SfxListUndoAction(
- const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, sal_Int32 nViewShellId, SfxUndoArray *pFather );
+ const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId, SfxUndoArray *pFather );
virtual ~SfxListUndoAction() override;
virtual void Undo() override;
@@ -148,7 +152,7 @@ public:
virtual OUString GetComment() const override;
/// See SfxUndoAction::GetViewShellId().
- sal_Int32 GetViewShellId() const override;
+ ViewShellId GetViewShellId() const override;
virtual OUString GetRepeatComment(SfxRepeatTarget&) const override;
virtual sal_uInt16 GetId() const;
@@ -237,7 +241,7 @@ namespace svl
virtual bool Repeat( SfxRepeatTarget &rTarget ) = 0;
virtual bool CanRepeat( SfxRepeatTarget &rTarget ) const = 0;
- virtual void EnterListAction(const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, sal_Int32 nViewShellId) = 0;
+ virtual void EnterListAction(const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId) = 0;
/** leaves the list action entered with EnterListAction
@return the number of the sub actions in the list which has just been left. Note that in case no such
@@ -329,7 +333,7 @@ public:
virtual OUString GetRepeatActionComment( SfxRepeatTarget &rTarget) const override;
virtual bool Repeat( SfxRepeatTarget &rTarget ) override;
virtual bool CanRepeat( SfxRepeatTarget &rTarget ) const override;
- virtual void EnterListAction(const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, sal_Int32 nViewShellId) override;
+ virtual void EnterListAction(const OUString &rComment, const OUString& rRepeatComment, sal_uInt16 nId, ViewShellId nViewShellId) override;
virtual size_t LeaveListAction() override;
virtual size_t LeaveAndMergeListAction() override;
virtual bool IsInListAction() const override;