summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-14 10:49:08 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-03-14 11:06:48 +0000
commit218cd09611583437c05c33e2aa3b2b81cb416f98 (patch)
tree1b3b99677e6acff1f6224f9bd7441f161fcf2596 /forms
parentf7965b0bcd559451c471a26bf5fd6f542887d95e (diff)
inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5 Reviewed-on: https://gerrit.libreoffice.org/23235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/DatabaseForm.cxx90
-rw-r--r--forms/source/inc/property.hxx8
2 files changed, 48 insertions, 50 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 8d9eb1771185..bf1b7d1bf750 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1332,48 +1332,54 @@ void ODatabaseForm::describeFixedAndAggregateProperties(
Sequence< Property >& _rProps,
Sequence< Property >& _rAggregateProps ) const
{
- BEGIN_DESCRIBE_AGGREGATION_PROPERTIES(22, m_xAggregateSet)
- // we want to "override" the privileges, since we have additional "AllowInsert" etc. properties
- RemoveProperty( _rAggregateProps, PROPERTY_PRIVILEGES );
-
- // InsertOnly is also to be overridden, since we sometimes change it ourself
- RemoveProperty( _rAggregateProps, PROPERTY_INSERTONLY );
-
- // we remove and re-declare the DataSourceName property, 'cause we want it to be constrained, and the
- // original property of our aggregate isn't
- RemoveProperty( _rAggregateProps, PROPERTY_DATASOURCE );
-
- // for connection sharing, we need to override the ActiveConnection property, too
- RemoveProperty( _rAggregateProps, PROPERTY_ACTIVE_CONNECTION );
-
- // the Filter property is also overwritten, since we have some implicit filters
- // (e.g. the ones which result from linking master fields to detail fields
- // via column names instead of parameters)
- RemoveProperty( _rAggregateProps, PROPERTY_FILTER );
- RemoveProperty( _rAggregateProps, PROPERTY_APPLYFILTER );
-
- DECL_IFACE_PROP4(ACTIVE_CONNECTION, XConnection, BOUND, TRANSIENT, MAYBEVOID, CONSTRAINED);
- DECL_BOOL_PROP2 ( APPLYFILTER, BOUND, MAYBEDEFAULT );
- DECL_PROP1 ( NAME, OUString, BOUND );
- DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >, BOUND );
- DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >, BOUND );
- DECL_PROP2 ( DATASOURCE, OUString, BOUND, CONSTRAINED );
- DECL_PROP3 ( CYCLE, TabulatorCycle, BOUND, MAYBEVOID, MAYBEDEFAULT );
- DECL_PROP2 ( FILTER, OUString, BOUND, MAYBEDEFAULT );
- DECL_BOOL_PROP2 ( INSERTONLY, BOUND, MAYBEDEFAULT );
- DECL_PROP1 ( NAVIGATION, NavigationBarMode, BOUND );
- DECL_BOOL_PROP1 ( ALLOWADDITIONS, BOUND );
- DECL_BOOL_PROP1 ( ALLOWEDITS, BOUND );
- DECL_BOOL_PROP1 ( ALLOWDELETIONS, BOUND );
- DECL_PROP2 ( PRIVILEGES, sal_Int32, TRANSIENT, READONLY );
- DECL_PROP1 ( TARGET_URL, OUString, BOUND );
- 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_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 );
+ _rProps.realloc( 22 );
+ css::beans::Property* pProperties = _rProps.getArray();
+
+ if (m_xAggregateSet.is())
+ _rAggregateProps = m_xAggregateSet->getPropertySetInfo()->getProperties();
+
+
+ // we want to "override" the privileges, since we have additional "AllowInsert" etc. properties
+ RemoveProperty( _rAggregateProps, PROPERTY_PRIVILEGES );
+
+ // InsertOnly is also to be overridden, since we sometimes change it ourself
+ RemoveProperty( _rAggregateProps, PROPERTY_INSERTONLY );
+
+ // we remove and re-declare the DataSourceName property, 'cause we want it to be constrained, and the
+ // original property of our aggregate isn't
+ RemoveProperty( _rAggregateProps, PROPERTY_DATASOURCE );
+
+ // for connection sharing, we need to override the ActiveConnection property, too
+ RemoveProperty( _rAggregateProps, PROPERTY_ACTIVE_CONNECTION );
+
+ // the Filter property is also overwritten, since we have some implicit filters
+ // (e.g. the ones which result from linking master fields to detail fields
+ // via column names instead of parameters)
+ RemoveProperty( _rAggregateProps, PROPERTY_FILTER );
+ RemoveProperty( _rAggregateProps, PROPERTY_APPLYFILTER );
+
+ DECL_IFACE_PROP4( ACTIVE_CONNECTION,XConnection, BOUND, TRANSIENT, MAYBEVOID, CONSTRAINED);
+ DECL_BOOL_PROP2 ( APPLYFILTER, BOUND, MAYBEDEFAULT );
+ DECL_PROP1 ( NAME, OUString, BOUND );
+ DECL_PROP1 ( MASTERFIELDS, Sequence< OUString >, BOUND );
+ DECL_PROP1 ( DETAILFIELDS, Sequence< OUString >, BOUND );
+ DECL_PROP2 ( DATASOURCE, OUString, BOUND, CONSTRAINED );
+ DECL_PROP3 ( CYCLE, TabulatorCycle, BOUND, MAYBEVOID, MAYBEDEFAULT );
+ DECL_PROP2 ( FILTER, OUString, BOUND, MAYBEDEFAULT );
+ DECL_BOOL_PROP2 ( INSERTONLY, BOUND, MAYBEDEFAULT );
+ DECL_PROP1 ( NAVIGATION, NavigationBarMode, BOUND );
+ DECL_BOOL_PROP1 ( ALLOWADDITIONS, BOUND );
+ DECL_BOOL_PROP1 ( ALLOWEDITS, BOUND );
+ DECL_BOOL_PROP1 ( ALLOWDELETIONS, BOUND );
+ DECL_PROP2 ( PRIVILEGES, sal_Int32, TRANSIENT, READONLY );
+ DECL_PROP1 ( TARGET_URL, OUString, BOUND );
+ 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_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 );
END_DESCRIBE_PROPERTIES();
}
diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx
index 220aa325572d..0fe9750df5dd 100644
--- a/forms/source/inc/property.hxx
+++ b/forms/source/inc/property.hxx
@@ -124,14 +124,6 @@ public:
css::beans::Property* pProperties = _rProps.getArray(); \
-#define BEGIN_DESCRIBE_AGGREGATION_PROPERTIES( count, aggregate ) \
- _rProps.realloc( count ); \
- css::beans::Property* pProperties = _rProps.getArray(); \
- \
- if (aggregate.is()) \
- _rAggregateProps = aggregate->getPropertySetInfo()->getProperties(); \
-
-
#define DECL_PROP0(varname, type) \
DECL_PROP_IMPL(varname, type) 0)