summaryrefslogtreecommitdiffstats
path: root/extensions/source/propctrlr/inspectormodelbase.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/source/propctrlr/inspectormodelbase.cxx')
-rw-r--r--extensions/source/propctrlr/inspectormodelbase.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/extensions/source/propctrlr/inspectormodelbase.cxx b/extensions/source/propctrlr/inspectormodelbase.cxx
index 1fdc8a0b5dfc..aaa994e94abd 100644
--- a/extensions/source/propctrlr/inspectormodelbase.cxx
+++ b/extensions/source/propctrlr/inspectormodelbase.cxx
@@ -28,18 +28,20 @@
namespace pcr
{
-
-
-#define MODEL_PROPERTY_ID_HAS_HELP_SECTION 2000
-#define MODEL_PROPERTY_ID_MIN_HELP_TEXT_LINES 2001
-#define MODEL_PROPERTY_ID_MAX_HELP_TEXT_LINES 2002
-#define MODEL_PROPERTY_ID_IS_READ_ONLY 2003
-
+ namespace
+ {
+ enum class ModelPropertyId
+ {
+ HAS_HELP_SECTION = 2000,
+ MIN_HELP_TEXT_LINES = 2001,
+ MAX_HELP_TEXT_LINES = 2002,
+ IS_READ_ONLY = 2003
+ };
+ };
using ::com::sun::star::uno::Reference;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::Sequence;
- using ::com::sun::star::uno::makeAny;
using ::com::sun::star::beans::Property;
namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute;
@@ -95,25 +97,25 @@ namespace pcr
{
registerProperty(
"HasHelpSection",
- MODEL_PROPERTY_ID_HAS_HELP_SECTION,
+ static_cast<sal_Int32>(ModelPropertyId::HAS_HELP_SECTION),
PropertyAttribute::READONLY,
&m_bHasHelpSection, cppu::UnoType<decltype(m_bHasHelpSection)>::get()
);
registerProperty(
"MinHelpTextLines",
- MODEL_PROPERTY_ID_MIN_HELP_TEXT_LINES,
+ static_cast<sal_Int32>(ModelPropertyId::MIN_HELP_TEXT_LINES),
PropertyAttribute::READONLY,
&m_nMinHelpTextLines, cppu::UnoType<decltype(m_nMinHelpTextLines)>::get()
);
registerProperty(
"MaxHelpTextLines",
- MODEL_PROPERTY_ID_MAX_HELP_TEXT_LINES,
+ static_cast<sal_Int32>(ModelPropertyId::MAX_HELP_TEXT_LINES),
PropertyAttribute::READONLY,
&m_nMaxHelpTextLines, cppu::UnoType<decltype(m_nMaxHelpTextLines)>::get()
);
registerProperty(
"IsReadOnly",
- MODEL_PROPERTY_ID_IS_READ_ONLY,
+ static_cast<sal_Int32>(ModelPropertyId::IS_READ_ONLY),
PropertyAttribute::BOUND,
&m_bIsReadOnly, cppu::UnoType<decltype(m_bIsReadOnly)>::get()
);
@@ -226,7 +228,7 @@ namespace pcr
void SAL_CALL ImplInspectorModel::setIsReadOnly( sal_Bool IsReadOnly )
{
- setFastPropertyValue( MODEL_PROPERTY_ID_IS_READ_ONLY, makeAny( IsReadOnly ) );
+ setFastPropertyValue( static_cast<sal_Int32>(ModelPropertyId::IS_READ_ONLY), Any( IsReadOnly ) );
}
sal_Bool SAL_CALL ImplInspectorModel::supportsService( const OUString& ServiceName )