Kaydet (Commit) a31e1f1a authored tarafından Noel Grandin's avatar Noel Grandin

convert PROPERTY_FLAG to o3tl::typed_flags

Change-Id: Ib652b83b1beed048cabce91aee22fc98605fd654
üst 76ab8c76
...@@ -24,6 +24,24 @@ ...@@ -24,6 +24,24 @@
#include <vcl/lstbox.hxx> #include <vcl/lstbox.hxx>
#include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp>
#include "pickercallbacks.hxx" #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 namespace svt
...@@ -79,7 +97,7 @@ namespace svt ...@@ -79,7 +97,7 @@ namespace svt
the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL. the affected control. Must be the same as referred by <arg>_nControlId</arg>, or NULL.
@param _nProperty @param _nProperty
the property to set the property to set
See PROPERTY_FLAG_* See PropFlags::*
@param _rValue @param _rValue
the value to set the value to set
@param _bIgnoreIllegalArgument @param _bIgnoreIllegalArgument
...@@ -87,10 +105,10 @@ namespace svt ...@@ -87,10 +105,10 @@ namespace svt
*/ */
void implSetControlProperty( void implSetControlProperty(
sal_Int16 _nControlId, 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 ); 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 /** implements the various methods for retrieving properties from controls
...@@ -99,10 +117,10 @@ namespace svt ...@@ -99,10 +117,10 @@ namespace svt
@PRECOND not <NULL/> @PRECOND not <NULL/>
@param _nProperty @param _nProperty
the property to retrieve the property to retrieve
See PROPERTY_FLAG_* See PropFlags::*
@return @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 ); static void implDoListboxAction( ListBox* _pListbox, sal_Int16 _nCtrlAction, const css::uno::Any& _rValue );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment