Replace some macros in forms part 7
Remove BEGIN_DESCRIBE_PROPERTIES
Change-Id: Ic1f52f21037e890c4f7143a1283f34101dbb737a
Change-Id: I1bd902af7f634bb70313dda72b7a008bdda38f75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124782
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index b63ba67..23b0537 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -101,7 +101,10 @@ OButtonModel::~OButtonModel()
void OButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 6, OClickableImageBaseModel )
OClickableImageBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 6);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1( BUTTONTYPE, FormButtonType, BOUND );
DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND );
DECL_PROP1( DISPATCHURLINTERNAL, sal_Bool, BOUND );
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index f1ab646..033f601 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -109,7 +109,10 @@ css::uno::Sequence<OUString> SAL_CALL OCheckBoxModel::getSupportedServiceNames()
void OCheckBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent )
OReferenceValueComponent::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 1);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
}
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index 1b50e28..5145fd0 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -291,7 +291,10 @@ sal_Bool OComboBoxModel::convertFastPropertyValue(
void OComboBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 7, OBoundControlModel )
OBoundControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 7);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND);
DECL_PROP1(LISTSOURCE, OUString, BOUND);
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 4ef9f5a..4703d57 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -156,7 +156,10 @@ css::uno::Sequence<OUString> SAL_CALL OCurrencyModel::getSupportedServiceNames()
void OCurrencyModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 2);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
// Set Value to transient
// ModifyPropertyAttributes(_rAggregateProps, PROPERTY_VALUE, PropertyAttribute::TRANSIENT, 0);
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 287d091..d25ce94 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -141,7 +141,10 @@ OUString SAL_CALL ODateModel::getServiceName()
void ODateModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 4);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(DEFAULT_DATE, util::Date) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | css::beans::PropertyAttribute::MAYBEVOID);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP1(FORMATKEY, sal_Int32, TRANSIENT);
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index ed6f331..6dceef5 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -349,7 +349,10 @@ void SAL_CALL OEditModel::getFastPropertyValue(Any& rValue, sal_Int32 nHandle )
void OEditModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 5);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(PERSISTENCE_MAXTEXTLENGTH, sal_Int16) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
DECL_PROP_IMPL(DEFAULT_TEXT, OUString) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
*pProperties++ = css::beans::Property(PROPERTY_EMPTY_IS_NULL, PROPERTY_ID_EMPTY_IS_NULL, cppu::UnoType<bool>::get(),
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 7332f04..e287a91 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -170,7 +170,10 @@ sal_Bool OFileControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
void OFileControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 2);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(DEFAULT_TEXT, OUString, BOUND);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 764eb34..01bc6a8 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2780,7 +2780,10 @@ void OBoundControlModel::recheckValidity( bool _bForceNotification )
void OBoundControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 5);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1 ( CONTROLSOURCE, OUString, BOUND );
*pProperties++ = css::beans::Property(PROPERTY_BOUNDFIELD, PROPERTY_ID_BOUNDFIELD, cppu::UnoType<XPropertySet>::get(),
css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index a09fce0..0fb7b8e 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -339,7 +339,10 @@ OUString SAL_CALL OFormattedModel::getServiceName()
// XPropertySet
void OFormattedModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 3);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
*pProperties++ = css::beans::Property(PROPERTY_EMPTY_IS_NULL, PROPERTY_ID_EMPTY_IS_NULL, cppu::UnoType<bool>::get(),
css::beans::PropertyAttribute::BOUND);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx
index bb0cab6..580593b 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -75,7 +75,10 @@ css::uno::Sequence<OUString> OImageButtonModel::getSupportedServiceNames()
void OImageButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 5, OClickableImageBaseModel )
OClickableImageBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 5);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(BUTTONTYPE, FormButtonType, BOUND);
DECL_PROP1(DISPATCHURLINTERNAL, sal_Bool, BOUND);
DECL_PROP1(TARGET_URL, OUString, BOUND);
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index da46a5d..4e79509 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -310,7 +310,10 @@ sal_Bool OImageControlModel::convertFastPropertyValue(Any& rConvertedValue, Any&
void OImageControlModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OBoundControlModel )
OBoundControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 4);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
*pProperties++ = css::beans::Property(PROPERTY_GRAPHIC, PROPERTY_ID_GRAPHIC, cppu::UnoType<XGraphic>::get(),
css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::TRANSIENT);
DECL_PROP1 ( IMAGE_URL, OUString, BOUND );
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 8e2b5cb..8302ac0 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -487,7 +487,10 @@ namespace frm
void OListBoxModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 10, OBoundControlModel )
OBoundControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 10);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP_IMPL(BOUNDCOLUMN, sal_Int16) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEVOID);
DECL_PROP1(LISTSOURCETYPE, ListSourceType, BOUND);
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index 3b14db3..9041920 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -110,7 +110,10 @@ css::uno::Sequence<OUString> ONumericModel::getSupportedServiceNames()
void ONumericModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 2, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 2);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(DEFAULT_VALUE, double) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | css::beans::PropertyAttribute::MAYBEVOID);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx
index 8832a11..61b0249 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -98,7 +98,10 @@ css::uno::Sequence<OUString> SAL_CALL OPatternModel::getSupportedServiceNames()
void OPatternModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 4);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(DEFAULT_TEXT, OUString) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
*pProperties++ = css::beans::Property(PROPERTY_EMPTY_IS_NULL, PROPERTY_ID_EMPTY_IS_NULL, cppu::UnoType<bool>::get(),
css::beans::PropertyAttribute::BOUND);
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 43fe2d9..f07d9894 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -238,7 +238,10 @@ void ORadioButtonModel::setControlSource()
void ORadioButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OReferenceValueComponent )
OReferenceValueComponent::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 1);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
}
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 0248200..48bee4f 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -146,7 +146,10 @@ OUString SAL_CALL OTimeModel::getServiceName()
void OTimeModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 4, OEditBaseModel )
OEditBaseModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 4);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(DEFAULT_TIME, util::Time) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT | css::beans::PropertyAttribute::MAYBEVOID);
DECL_PROP1(TABINDEX, sal_Int16, BOUND);
DECL_PROP1(FORMATKEY, sal_Int32, TRANSIENT);
diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx
index fbbe8ff..c79c4b0a 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -447,7 +447,10 @@ namespace frm
void ONavigationBarModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 1);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index 00d204d..e8177a2 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -154,7 +154,10 @@ namespace frm
void OReferenceValueComponent::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OBoundControlModel )
OBoundControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 3);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1( REFVALUE, OUString, BOUND );
DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND );
DECL_PROP1( UNCHECKED_REFVALUE, OUString, BOUND );
diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx
index 19bf772d..b03e0ed 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -136,7 +136,10 @@ namespace frm
void OScrollBarModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 3);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1( DEFAULT_SCROLL_VALUE, sal_Int32, BOUND );
DECL_PROP1( TABINDEX, sal_Int16, BOUND );
DECL_PROP_IMPL(CONTROLSOURCEPROPERTY, OUString) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx
index dad2cd9..71ab77f 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -90,7 +90,10 @@ namespace frm
void OSpinButtonModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 3, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 3);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP1( DEFAULT_SPIN_VALUE, sal_Int32, BOUND );
DECL_PROP1( TABINDEX, sal_Int16, BOUND );
DECL_PROP_IMPL(CONTROLSOURCEPROPERTY, OUString) css::beans::PropertyAttribute::READONLY | css::beans::PropertyAttribute::TRANSIENT);
diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx
index 37fca9e..3282b4a 100644
--- a/forms/source/inc/property.hxx
+++ b/forms/source/inc/property.hxx
@@ -340,14 +340,6 @@ public:
#define DECL_PROP_IMPL(varname, type) \
*pProperties++ = css::beans::Property(PROPERTY_##varname, PROPERTY_ID_##varname, cppu::UnoType<type>::get(),
#define BEGIN_DESCRIBE_PROPERTIES( count, baseclass ) \
baseclass::describeFixedProperties( _rProps ); \
sal_Int32 nOldCount = _rProps.getLength(); \
_rProps.realloc( nOldCount + ( count ) ); \
css::beans::Property* pProperties = _rProps.getArray() + nOldCount; \
#define DECL_PROP1(varname, type, attrib1) \
DECL_PROP_IMPL(varname, type) css::beans::PropertyAttribute::attrib1)
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index ce61725..5947433 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -310,7 +310,10 @@ namespace frm
void ORichTextModel::describeFixedProperties( Sequence< Property >& _rProps ) const
{
BEGIN_DESCRIBE_PROPERTIES( 1, OControlModel )
OControlModel::describeFixedProperties( _rProps );
sal_Int32 nOldCount = _rProps.getLength();
_rProps.realloc( nOldCount + 1);
css::beans::Property* pProperties = _rProps.getArray() + nOldCount;
DECL_PROP_IMPL(TABINDEX, sal_Int16) css::beans::PropertyAttribute::BOUND | css::beans::PropertyAttribute::MAYBEDEFAULT);
DBG_ASSERT( pProperties == _rProps.getArray() + _rProps.getLength(), "<...>::describeFixedProperties/getInfoHelper: forgot to adjust the count ?");