diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 10:22:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 12:42:04 +0200 |
commit | 344957aae65637c64b4f6d16f64c4488ddd2d085 (patch) | |
tree | 66c93fa144bef00c794357b075e966a05e639f30 /framework/source/inc/loadenv | |
parent | 3910f943e9bf7e70589d9a7c42c05a43ac11856c (diff) |
convert LoadEnv::EFeature to o3tl::typed_flags
Change-Id: I4c16b68c820783e9bd27fa273f2017b5088f4b85
Diffstat (limited to 'framework/source/inc/loadenv')
-rw-r--r-- | framework/source/inc/loadenv/loadenv.hxx | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/framework/source/inc/loadenv/loadenv.hxx b/framework/source/inc/loadenv/loadenv.hxx index 3597547675c1..288da8f8a1bc 100644 --- a/framework/source/inc/loadenv/loadenv.hxx +++ b/framework/source/inc/loadenv/loadenv.hxx @@ -35,6 +35,33 @@ #include <rtl/ref.hxx> #include <unotools/mediadescriptor.hxx> #include <comphelper/sequenceashashmap.hxx> +#include <o3tl/typed_flags_set.hxx> + + +/** @short enable/disable special features + of a load request. + + @desrc Such features must outcome without + any special parameters. + To make enabling/disabling of + features very easy (e.g. at the ctor of + this class) these values must be combinable + as flags. That means: its values must be in + range of [2^n]! + */ +enum class LoadEnvFeatures +{ + /// we should be informed, if no feature is enabled :-) + NONE = 0, + /// enable using of UI elements during loading (means progress, interaction handler etcpp.) + WorkWithUI = 1, + /// enable loading of resources, which are not related to a target frame! (see concept of ContentHandler) + AllowContentHandler = 2 +}; +namespace o3tl { + template<> struct typed_flags<LoadEnvFeatures> : is_typed_flags<LoadEnvFeatures, 0x3> {}; +} + namespace framework { @@ -51,28 +78,6 @@ class QuietInteraction; class LoadEnv { public: - - /** @short enable/disable special features - of a load request. - - @desrc Such features must outcome without - any special parameters. - To make enabling/disabling of - features very easy (e.g. at the ctor of - this class) these values must be combinable - as flags. That means: its values must be in - range of [2^n]! - */ - enum EFeature - { - /// we should be informed, if no feature is enabled :-) - E_NO_FEATURE = 0, - /// enable using of UI elements during loading (means progress, interaction handler etcpp.) - E_WORK_WITH_UI = 1, - /// enable loading of resources, which are not related to a target frame! (see concept of ContentHandler) - E_ALLOW_CONTENTHANDLER = 2 - }; - /** @short classify a content. @descr The load environment must know, if a content @@ -153,7 +158,7 @@ private: css::util::URL m_aURL; /** @short enable/disable special features of a load request. */ - EFeature m_eFeature; + LoadEnvFeatures m_eFeature; /** @short classify the content, which should be loaded by this instance. */ EContentType m_eContentType; @@ -264,7 +269,7 @@ public: const css::uno::Reference< css::frame::XFrame >& xBaseFrame , const OUString& sTarget , sal_Int32 nSearchFlags , - EFeature eFeature = E_NO_FEATURE); + LoadEnvFeatures eFeature = LoadEnvFeatures::NONE); /** @short start loading of the resource represented by this loadenv instance. |