summaryrefslogtreecommitdiff
path: root/forms/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2021-11-01 19:17:37 +0100
committerJulien Nabet <serval2412@yahoo.fr>2021-11-02 18:42:35 +0100
commitde9f8683234ea2187f650210b7c3e66818778e9f (patch)
tree664f2d8879dff940fc2831655ea2502b11f0b2ff /forms/source
parent39994c43bf6610f2a8fde55f54ed9a7e279935b4 (diff)
Replace some macros in forms
DECL_IFACE_PROP2 + DECL_IFACE_PROP3 + DECL_IFACE_PROP4 + DECL_BOOL_PROP3 Change-Id: Ibfe652001f4e914cad364222bcaf38dec69298e5 Change-Id: I432e045b9d071d61cd142bca66f40233cd59ef0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124564 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/DatabaseForm.cxx5
-rw-r--r--forms/source/component/Date.cxx2
-rw-r--r--forms/source/component/FormComponent.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx2
-rw-r--r--forms/source/component/Time.cxx2
-rw-r--r--forms/source/inc/property.hxx20
6 files changed, 9 insertions, 26 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 7411abf90351..0882d82a47c7 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1290,7 +1290,8 @@ void ODatabaseForm::describeFixedAndAggregateProperties(
RemoveProperty( _rAggregateProps, PROPERTY_HAVINGCLAUSE );
RemoveProperty( _rAggregateProps, PROPERTY_APPLYFILTER );
- DECL_IFACE_PROP4( ACTIVE_CONNECTION,XConnection, BOUND, TRANSIENT, MAYBEVOID, CONSTRAINED);
+ DECL_IFACE_PROP_IMPL(ACTIVE_CONNECTION, XConnection) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT |
+ css::beans::PropertyAttribute::MAYBEVOID | PropertyAttribute::CONSTRAINED);
DECL_BOOL_PROP2 ( APPLYFILTER, BOUND, MAYBEDEFAULT );
DECL_PROP1 ( NAME, OUString, BOUND );
DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >, BOUND );
@@ -1309,7 +1310,7 @@ void ODatabaseForm::describeFixedAndAggregateProperties(
DECL_PROP1 ( TARGET_FRAME, OUString, BOUND );
DECL_PROP1 ( SUBMIT_METHOD, FormSubmitMethod, BOUND );
DECL_PROP1 ( SUBMIT_ENCODING, FormSubmitEncoding, BOUND );
- DECL_BOOL_PROP3 ( DYNAMIC_CONTROL_BORDER, BOUND, MAYBEVOID, MAYBEDEFAULT );
+ DECL_BOOL_PROP_IMPL(DYNAMIC_CONTROL_BORDER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID | css::beans::PropertyAttribute::MAYBEDEFAULT );
DECL_PROP3 ( CONTROL_BORDER_COLOR_FOCUS, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT );
DECL_PROP3 ( CONTROL_BORDER_COLOR_MOUSE, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT );
DECL_PROP3 ( CONTROL_BORDER_COLOR_INVALID, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT );
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 1d16109ce672..90a348482540 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -145,7 +145,7 @@ void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) const
DECL_PROP3(DEFAULT_DATE, util::Date, BOUND, MAYBEDEFAULT, MAYBEVOID);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP1(FORMATKEY, sal_Int32, TRANSIENT);
- DECL_IFACE_PROP2(FORMATSSUPPLIER, XNumberFormatsSupplier, READONLY, TRANSIENT);
+ DECL_IFACE_PROP_IMPL(FORMATSSUPPLIER, XNumberFormatsSupplier) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
END_DESCRIBE_PROPERTIES();
}
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 0f67f8433e95..16d90a75f5df 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2780,8 +2780,8 @@ void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps
{
BEGIN_DESCRIBE_PROPERTIES( 5, OControlModel )
DECL_PROP1 ( CONTROLSOURCE, OUString, BOUND );
- DECL_IFACE_PROP3( BOUNDFIELD, XPropertySet, BOUND, READONLY, TRANSIENT );
- DECL_IFACE_PROP2( CONTROLLABEL, XPropertySet, BOUND, MAYBEVOID );
+ DECL_IFACE_PROP_IMPL(BOUNDFIELD, XPropertySet) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
+ DECL_IFACE_PROP_IMPL(CONTROLLABEL, XPropertySet) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID);
DECL_PROP2 ( CONTROLSOURCEPROPERTY, OUString, READONLY, TRANSIENT );
DECL_BOOL_PROP1 ( INPUT_REQUIRED, BOUND );
END_DESCRIBE_PROPERTIES()
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index f51988ee4ca2..efd3de934f2d 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -311,7 +311,7 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
- DECL_IFACE_PROP2( GRAPHIC, XGraphic, BOUND, TRANSIENT );
+ DECL_IFACE_PROP_IMPL(GRAPHIC, XGraphic) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT);
DECL_PROP1 ( IMAGE_URL, OUString, BOUND );
DECL_BOOL_PROP1 ( READONLY, BOUND );
DECL_PROP1 ( TABINDEX, sal_Int16, BOUND );
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 8ab3e9a10390..5e6fb79edc60 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -150,7 +150,7 @@ void OTimeModel::describeFixedProperties( Sequence< Property >& _rProps ) const
DECL_PROP3(DEFAULT_TIME, util::Time, BOUND, MAYBEDEFAULT, MAYBEVOID);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP1(FORMATKEY, sal_Int32, TRANSIENT);
- DECL_IFACE_PROP2(FORMATSSUPPLIER, XNumberFormatsSupplier, READONLY, TRANSIENT);
+ DECL_IFACE_PROP_IMPL(FORMATSSUPPLIER, XNumberFormatsSupplier) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
END_DESCRIBE_PROPERTIES();
}
diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx
index f0383433d4b9..61447430dced 100644
--- a/forms/source/inc/property.hxx
+++ b/forms/source/inc/property.hxx
@@ -381,20 +381,7 @@ public:
DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 | css::beans::PropertyAttribute::attrib4)
// === some property types require special handling
-// === such as interfaces
-
-#define DECL_IFACE_PROP2(varname, type, attrib1, attrib2) \
- DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2)
-
-
-#define DECL_IFACE_PROP3(varname, type, attrib1, attrib2, attrib3) \
- DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3)
-
-
-#define DECL_IFACE_PROP4(varname, type, attrib1, attrib2, attrib3, attrib4) \
- DECL_IFACE_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 | PropertyAttribute::attrib4)
-
-// === or Boolean properties
+// === such Boolean properties
#define DECL_BOOL_PROP1(varname, attrib1) \
DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1)
@@ -403,11 +390,6 @@ public:
#define DECL_BOOL_PROP2(varname, attrib1, attrib2) \
DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2)
-
-#define DECL_BOOL_PROP3( varname, attrib1, attrib2, attrib3 ) \
- DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3 )
-
-
#define END_DESCRIBE_PROPERTIES() \
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); \