diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2017-03-18 18:24:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-24 06:14:17 +0000 |
commit | 7916487cf4d9603cdbe4c7ffbe9bb3f28b51ce4e (patch) | |
tree | e3bafe408d8efd97d156521c1ea93d741a5215a8 /include | |
parent | 9ee2d69c610d94280103e089671e9ba78b070e23 (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')
-rw-r--r-- | include/editeng/editund2.hxx | 8 | ||||
-rw-r--r-- | include/editeng/outliner.hxx | 3 | ||||
-rw-r--r-- | include/sfx2/viewsh.hxx | 2 | ||||
-rw-r--r-- | include/svl/undo.hxx | 14 | ||||
-rw-r--r-- | include/svx/svdundo.hxx | 6 |
5 files changed, 19 insertions, 14 deletions
diff --git a/include/editeng/editund2.hxx b/include/editeng/editund2.hxx index 0a86fe7a96a5..e4af37b25a36 100644 --- a/include/editeng/editund2.hxx +++ b/include/editeng/editund2.hxx @@ -46,9 +46,9 @@ public: class EDITENG_DLLPUBLIC EditUndo : public SfxUndoAction { private: - sal_uInt16 nId; - sal_Int32 mnViewShellId; - EditEngine* mpEditEngine; + sal_uInt16 nId; + ViewShellId mnViewShellId; + EditEngine* mpEditEngine; public: EditUndo(sal_uInt16 nI, EditEngine* pEE); @@ -62,7 +62,7 @@ public: virtual bool CanRepeat(SfxRepeatTarget&) const override; virtual OUString GetComment() const override; /// See SfxUndoAction::GetViewShellId(). - sal_Int32 GetViewShellId() const override; + ViewShellId GetViewShellId() const override; sal_uInt16 GetId() const; }; diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx index 034de4776bfc..75127e7e5f30 100644 --- a/include/editeng/outliner.hxx +++ b/include/editeng/outliner.hxx @@ -26,6 +26,7 @@ #include <rtl/ustring.hxx> #include <svl/SfxBroadcaster.hxx> #include <svl/languageoptions.hxx> +#include <svl/undo.hxx> #include <tools/gen.hxx> #include <tools/color.hxx> #include <tools/contnr.hxx> @@ -377,7 +378,7 @@ class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI OutlinerViewShell { public: virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const = 0; - virtual sal_uInt32 GetViewShellId() const = 0; + virtual ViewShellId GetViewShellId() const = 0; /// Wrapper around SfxLokHelper::notifyOtherViews(). virtual void NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload) = 0; /// Wrapper around SfxLokHelper::notifyOtherView(). diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx index 14466922f461..e8aef57c7c50 100644 --- a/include/sfx2/viewsh.hxx +++ b/include/sfx2/viewsh.hxx @@ -332,7 +332,7 @@ public: virtual int getPart() const; virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const; /// See OutlinerViewShell::GetViewShellId(). - sal_uInt32 GetViewShellId() const override; + ViewShellId GetViewShellId() const override; /// See OutlinerViewShell::NotifyOtherViews(). void NotifyOtherViews(int nType, const OString& rKey, const OString& rPayload) override; /// See OutlinerViewShell::NotifyOtherView(). 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; diff --git a/include/svx/svdundo.hxx b/include/svx/svdundo.hxx index e53ca9872744..2653ba8569e8 100644 --- a/include/svx/svdundo.hxx +++ b/include/svx/svdundo.hxx @@ -54,8 +54,8 @@ class OutlinerParaObject; class SVX_DLLPUBLIC SdrUndoAction : public SfxUndoAction { protected: - SdrModel& rMod; - sal_Int32 m_nViewShellId; + SdrModel& rMod; + ViewShellId m_nViewShellId; protected: SdrUndoAction(SdrModel& rNewMod); @@ -73,7 +73,7 @@ public: virtual void SdrRepeat(SdrView& rView); /// See SfxUndoAction::GetViewShellId(). - sal_Int32 GetViewShellId() const override; + ViewShellId GetViewShellId() const override; }; /** |