diff options
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 90 | ||||
-rw-r--r-- | forms/source/inc/property.hxx | 8 |
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) |