summaryrefslogtreecommitdiff
path: root/fpicker/source/office/OfficeControlAccess.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-23 11:22:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-23 11:55:09 +0200
commita31e1f1a3204b2265bfda9ab77d704a93bb40d51 (patch)
tree91b8c71e36f259c6ebdfce5051f4c53a136ea6a2 /fpicker/source/office/OfficeControlAccess.hxx
parent76ab8c76daa57d21288c3a90f017ea5ae51db564 (diff)
convert PROPERTY_FLAG to o3tl::typed_flags
Change-Id: Ib652b83b1beed048cabce91aee22fc98605fd654
Diffstat (limited to 'fpicker/source/office/OfficeControlAccess.hxx')
-rw-r--r--fpicker/source/office/OfficeControlAccess.hxx28
1 files changed, 23 insertions, 5 deletions
diff --git a/fpicker/source/office/OfficeControlAccess.hxx b/fpicker/source/office/OfficeControlAccess.hxx
index 91fd79bd251d..7c3724e6f908 100644
--- a/fpicker/source/office/OfficeControlAccess.hxx
+++ b/fpicker/source/office/OfficeControlAccess.hxx
@@ -24,6 +24,24 @@
#include <vcl/lstbox.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
#include "pickercallbacks.hxx"
+#include <o3tl/typed_flags_set.hxx>
+
+
+enum class PropFlags {
+ Unknown = -1, // used as an error sentinel
+ NONE = 0x0000,
+ Text = 0x0001,
+ Enabled = 0x0002,
+ Visible = 0x0004,
+ HelpUrl = 0x0008,
+ ListItems = 0x0010,
+ SelectedItem = 0x0020,
+ SelectedItemIndex = 0x0040,
+ Checked = 0x0080,
+};
+namespace o3tl {
+ template<> struct typed_flags<PropFlags> : is_typed_flags<PropFlags, 0x00ff> {};
+}
namespace svt
@@ -79,7 +97,7 @@ namespace svt
the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL.
@param _nProperty
the property to set
- See PROPERTY_FLAG_*
+ See PropFlags::*
@param _rValue
the value to set
@param _bIgnoreIllegalArgument
@@ -87,10 +105,10 @@ namespace svt
*/
void implSetControlProperty(
sal_Int16 _nControlId,
- Control* _pControl, sal_Int16 _nProperty, const css::uno::Any& _rValue,
+ Control* _pControl, PropFlags _nProperty, const css::uno::Any& _rValue,
bool _bIgnoreIllegalArgument = true );
- Control* implGetControl( const OUString& _rControlName, sal_Int16* _pId, sal_Int32* _pPropertyMask = nullptr ) const;
+ Control* implGetControl( const OUString& _rControlName, sal_Int16* _pId, PropFlags* _pPropertyMask = nullptr ) const;
/** implements the various methods for retrieving properties from controls
@@ -99,10 +117,10 @@ namespace svt
@PRECOND not <NULL/>
@param _nProperty
the property to retrieve
- See PROPERTY_FLAG_*
+ See PropFlags::*
@return
*/
- css::uno::Any implGetControlProperty( Control* _pControl, sal_Int16 _nProperty ) const;
+ css::uno::Any implGetControlProperty( Control* _pControl, PropFlags _nProperty ) const;
static void implDoListboxAction( ListBox* _pListbox, sal_Int16 _nCtrlAction, const css::uno::Any& _rValue );