diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-10-07 16:15:07 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-10-07 16:45:46 +0200 |
commit | 41c2c9ea02e6db37fd23012873fd30d665729122 (patch) | |
tree | b019f40ebd9f50b1af3a4d8199d3bbe194c6a68e /include/sfx2/recentdocsview.hxx | |
parent | 8fab6ab36589d0dcd75d45feab43a0b06b7f2a3e (diff) |
sfx2: resolve "enum ApplicationType" conflict...
... with windows.h by putting our enum into a namespace, and while we're
at it convert it to enum class etc.
Change-Id: I804cd82565e77e6ab9a9d3a529f1ea43379fe0be
Diffstat (limited to 'include/sfx2/recentdocsview.hxx')
-rw-r--r-- | include/sfx2/recentdocsview.hxx | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx index 76c7647c4931..1d316bf1c755 100644 --- a/include/sfx2/recentdocsview.hxx +++ b/include/sfx2/recentdocsview.hxx @@ -14,10 +14,15 @@ #include <sfx2/recentdocsviewitem.hxx> #include <vcl/image.hxx> +#include <o3tl/typed_flags_set.hxx> + #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/frame/XDispatch.hpp> +namespace sfx2 +{ + struct LoadRecentFile { css::util::URL aTargetURL; @@ -26,7 +31,7 @@ struct LoadRecentFile VclPtr< ThumbnailView > pView; }; -enum ApplicationType +enum class ApplicationType { TYPE_NONE = 0, TYPE_WRITER = 1 << 0, @@ -38,6 +43,16 @@ enum ApplicationType TYPE_OTHER = 1 << 6 }; +} // namespace sfx2 + +namespace o3tl { + +template<> struct typed_flags<sfx2::ApplicationType> : is_typed_flags<sfx2::ApplicationType, 0x7f> {}; + +} // namespace o3tl + +namespace sfx2 +{ class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView { @@ -51,7 +66,7 @@ public: static bool typeMatchesExtension(ApplicationType type, const OUString &rExt); static BitmapEx getDefaultThumbnail(const OUString &rURL); - int mnFileTypes; + ApplicationType mnFileTypes; virtual void Clear() override; @@ -85,6 +100,8 @@ protected: OUString maWelcomeLine2; }; +} // namespace sfx2 + #endif // INCLUDED_SFX2_RECENTDOCSVIEW_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |