diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2021-11-03 23:29:30 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2021-11-04 07:04:01 +0100 |
commit | 3c1bd037802f5fbad9f43566a33500e54a6b9de6 (patch) | |
tree | 7a44eb7a14097cc76531baec00e1f8aa226cd293 /forms | |
parent | bac1b748f5b600952b9bf3eaaaf5a4bb8342fe59 (diff) |
Replace some macros in forms part 3
Remove DECL_BOOL_PROP1 + DECL_BOOL_PROP2
Change-Id: I8a07ac7b2b8ab724d5277a11b37cf10a6711fdb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124664
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/Columns.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/ComboBox.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 10 | ||||
-rw-r--r-- | forms/source/component/Edit.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/FormattedField.cxx | 4 | ||||
-rw-r--r-- | forms/source/component/Grid.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/ImageControl.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/Pattern.cxx | 2 | ||||
-rw-r--r-- | forms/source/component/formcontrolfont.cxx | 4 | ||||
-rw-r--r-- | forms/source/inc/property.hxx | 11 |
11 files changed, 18 insertions, 29 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index b92b99768912..92733ad47c20 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -348,7 +348,7 @@ void OGridColumn::setOwnProperties(Sequence<Property>& aDescriptor) DECL_PROP1(LABEL, OUString, BOUND); DECL_PROP3(WIDTH, sal_Int32, BOUND, MAYBEVOID, MAYBEDEFAULT); DECL_PROP3(ALIGN, sal_Int16, BOUND, MAYBEVOID, MAYBEDEFAULT); - DECL_BOOL_PROP2(HIDDEN, BOUND, MAYBEDEFAULT); + DECL_BOOL_PROP_IMPL(HIDDEN) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1(COLUMNSERVICENAME, OUString, READONLY); } diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index fa28816c0890..ce61560f1c70 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -295,7 +295,7 @@ void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) co DECL_PROP1(TABINDEX, sal_Int16, BOUND); DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND); DECL_PROP1(LISTSOURCE, OUString, BOUND); - DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND); + DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); DECL_PROP1(DEFAULT_TEXT, OUString, BOUND); DECL_PROP1(STRINGITEMLIST, Sequence< OUString >,BOUND); DECL_PROP1(TYPEDITEMLIST, Sequence< Any >, OPTIONAL); diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 0882d82a47c7..8e04ff613619 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -1292,7 +1292,7 @@ void ODatabaseForm::describeFixedAndAggregateProperties( 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_BOOL_PROP_IMPL(APPLYFILTER) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAME, OUString, BOUND ); DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >, BOUND ); DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >, BOUND ); @@ -1300,11 +1300,11 @@ void ODatabaseForm::describeFixedAndAggregateProperties( DECL_PROP3 ( CYCLE, TabulatorCycle, BOUND, MAYBEVOID, MAYBEDEFAULT ); DECL_PROP2 ( FILTER, OUString, BOUND, MAYBEDEFAULT ); DECL_PROP2 ( HAVINGCLAUSE, OUString, BOUND, MAYBEDEFAULT ); - DECL_BOOL_PROP2 ( INSERTONLY, BOUND, MAYBEDEFAULT ); + DECL_BOOL_PROP_IMPL(INSERTONLY) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( NAVIGATION, NavigationBarMode, BOUND ); - DECL_BOOL_PROP1 ( ALLOWADDITIONS, BOUND ); - DECL_BOOL_PROP1 ( ALLOWEDITS, BOUND ); - DECL_BOOL_PROP1 ( ALLOWDELETIONS, BOUND ); + DECL_BOOL_PROP_IMPL(ALLOWADDITIONS) css::beans::PropertyAttribute::BOUND); + DECL_BOOL_PROP_IMPL(ALLOWEDITS) css::beans::PropertyAttribute::BOUND); + DECL_BOOL_PROP_IMPL(ALLOWDELETIONS) css::beans::PropertyAttribute::BOUND); DECL_PROP2 ( PRIVILEGES, sal_Int32, TRANSIENT, READONLY ); DECL_PROP1 ( TARGET_URL, OUString, BOUND ); DECL_PROP1 ( TARGET_FRAME, OUString, BOUND ); diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index e1eefb02f396..b8119211b08e 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -352,9 +352,9 @@ void OEditModel::describeFixedProperties( Sequence< Property >& _rProps ) const BEGIN_DESCRIBE_PROPERTIES( 5, OEditBaseModel ) DECL_PROP2(PERSISTENCE_MAXTEXTLENGTH,sal_Int16, READONLY, TRANSIENT); DECL_PROP2(DEFAULT_TEXT, OUString, BOUND, MAYBEDEFAULT); - DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND); + DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); DECL_PROP1(TABINDEX, sal_Int16, BOUND); - DECL_BOOL_PROP2(FILTERPROPOSAL, BOUND, MAYBEDEFAULT); + DECL_BOOL_PROP_IMPL(FILTERPROPOSAL) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); END_DESCRIBE_PROPERTIES(); } diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index 16d90a75f5df..98ceef3d467c 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -1012,7 +1012,7 @@ void OControlModel::describeFixedProperties( Sequence< Property >& _rProps ) con BEGIN_DESCRIBE_BASE_PROPERTIES( 7 ) DECL_PROP2 (CLASSID, sal_Int16, READONLY, TRANSIENT); DECL_PROP1 (NAME, OUString, BOUND); - DECL_BOOL_PROP2 (NATIVE_LOOK, BOUND, TRANSIENT); + DECL_BOOL_PROP_IMPL(NATIVE_LOOK) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT); DECL_PROP1 (TAG, OUString, BOUND); DECL_PROP1 (GENERATEVBAEVENTS, sal_Bool, TRANSIENT); DECL_PROP1 (CONTROL_TYPE_IN_MSO,sal_Int16, BOUND); @@ -2783,7 +2783,7 @@ void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps 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 ); + DECL_BOOL_PROP_IMPL(INPUT_REQUIRED) css::beans::PropertyAttribute::BOUND); END_DESCRIBE_PROPERTIES() } } diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 7bef964464e9..62d472d898ff 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -340,9 +340,9 @@ OUString SAL_CALL OFormattedModel::getServiceName() void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) const { BEGIN_DESCRIBE_PROPERTIES( 3, OEditBaseModel ) - DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND); + DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); DECL_PROP1(TABINDEX, sal_Int16, BOUND); - DECL_BOOL_PROP2(FILTERPROPOSAL, BOUND, MAYBEDEFAULT); + DECL_BOOL_PROP_IMPL(FILTERPROPOSAL) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT); END_DESCRIBE_PROPERTIES(); } diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 0b98db032679..8027c2912015 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -399,7 +399,7 @@ void OGridControlModel::describeFixedProperties( Sequence< Property >& _rProps ) DECL_PROP1(FONT_WEIGHT, float, MAYBEDEFAULT); DECL_PROP1(FONT_SLANT, sal_Int16, MAYBEDEFAULT); DECL_PROP1(FONT_UNDERLINE, sal_Int16, MAYBEDEFAULT); - DECL_BOOL_PROP1(FONT_WORDLINEMODE, MAYBEDEFAULT); + DECL_BOOL_PROP_IMPL(FONT_WORDLINEMODE) css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP3(TEXTLINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID); DECL_PROP2(FONTEMPHASISMARK, sal_Int16, BOUND, MAYBEDEFAULT); DECL_PROP2(FONTRELIEF, sal_Int16, BOUND, MAYBEDEFAULT); diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index efd3de934f2d..5077fbf58626 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -313,7 +313,7 @@ void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel ) 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_BOOL_PROP_IMPL(READONLY) css::beans::PropertyAttribute::BOUND); DECL_PROP1 ( TABINDEX, sal_Int16, BOUND ); END_DESCRIBE_PROPERTIES(); } diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index 129bbd3753f7..d6a3171e082d 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -100,7 +100,7 @@ void OPatternModel::describeFixedProperties( Sequence< Property >& _rProps ) con { BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel ) DECL_PROP2(DEFAULT_TEXT, OUString, BOUND, MAYBEDEFAULT); - DECL_BOOL_PROP1(EMPTY_IS_NULL, BOUND); + DECL_BOOL_PROP_IMPL(EMPTY_IS_NULL) css::beans::PropertyAttribute::BOUND); DECL_PROP1(TABINDEX, sal_Int16, BOUND); DECL_PROP2(FILTERPROPOSAL, sal_Bool, BOUND, MAYBEDEFAULT); END_DESCRIBE_PROPERTIES(); diff --git a/forms/source/component/formcontrolfont.cxx b/forms/source/component/formcontrolfont.cxx index 1399e2b94971..3fed287d9976 100644 --- a/forms/source/component/formcontrolfont.cxx +++ b/forms/source/component/formcontrolfont.cxx @@ -200,7 +200,7 @@ namespace frm DECL_PROP3 ( TEXTLINECOLOR, sal_Int32, BOUND, MAYBEDEFAULT, MAYBEVOID ); DECL_PROP1 ( FONT_CHARWIDTH, float, MAYBEDEFAULT ); - DECL_BOOL_PROP1 ( FONT_KERNING, MAYBEDEFAULT ); + DECL_BOOL_PROP_IMPL(FONT_KERNING) css::beans::PropertyAttribute::MAYBEDEFAULT); DECL_PROP1 ( FONT_ORIENTATION, float, MAYBEDEFAULT ); DECL_PROP1 ( FONT_PITCH, sal_Int16, MAYBEDEFAULT ); DECL_PROP1 ( FONT_TYPE, sal_Int16, MAYBEDEFAULT ); @@ -214,7 +214,7 @@ namespace frm DECL_PROP1 ( FONT_SLANT, sal_Int16, MAYBEDEFAULT ); DECL_PROP1 ( FONT_UNDERLINE, sal_Int16, MAYBEDEFAULT ); DECL_PROP1 ( FONT_STRIKEOUT, sal_Int16, MAYBEDEFAULT ); - DECL_BOOL_PROP1 ( FONT_WORDLINEMODE, MAYBEDEFAULT ); + DECL_BOOL_PROP_IMPL(FONT_WORDLINEMODE) css::beans::PropertyAttribute::MAYBEDEFAULT); } diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx index 7e9642b8d2d9..a99ae179fef9 100644 --- a/forms/source/inc/property.hxx +++ b/forms/source/inc/property.hxx @@ -376,17 +376,6 @@ public: #define DECL_PROP3(varname, type, attrib1, attrib2, attrib3) \ DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2 | css::beans::PropertyAttribute::attrib3) - -// === some property types require special handling -// === such Boolean properties - -#define DECL_BOOL_PROP1(varname, attrib1) \ - DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1) - - -#define DECL_BOOL_PROP2(varname, attrib1, attrib2) \ - DECL_BOOL_PROP_IMPL(varname) css::beans::PropertyAttribute::attrib1 | css::beans::PropertyAttribute::attrib2) - #define END_DESCRIBE_PROPERTIES() \ DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?"); \ |