forms/source/component/Button.cxx              |    8 
 forms/source/component/Button.hxx              |    9 
 forms/source/component/CheckBox.cxx            |    8 
 forms/source/component/CheckBox.hxx            |    9 
 forms/source/component/ComboBox.cxx            |    7 
 forms/source/component/ComboBox.hxx            |    9 
 forms/source/component/Currency.cxx            |    8 
 forms/source/component/Currency.hxx            |    9 
 forms/source/component/Date.cxx                |    7 
 forms/source/component/Date.hxx                |   10 
 forms/source/component/Edit.cxx                |    7 
 forms/source/component/Edit.hxx                |    9 
 forms/source/component/EditBase.hxx            |    7 
 forms/source/component/File.cxx                |    7 
 forms/source/component/File.hxx                |    9 
 forms/source/component/FixedText.cxx           |    7 
 forms/source/component/FixedText.hxx           |    9 
 forms/source/component/FormattedField.cxx      |    7 
 forms/source/component/FormattedField.hxx      |    9 
 forms/source/component/Grid.hxx                |    9 
 forms/source/component/GroupBox.cxx            |    7 
 forms/source/component/GroupBox.hxx            |    9 
 forms/source/component/Hidden.cxx              |    7 
 forms/source/component/Hidden.hxx              |    9 
 forms/source/component/ImageButton.cxx         |    7 
 forms/source/component/ImageButton.hxx         |    9 
 forms/source/component/ImageControl.cxx        |    7 
 forms/source/component/ImageControl.hxx        |    9 
 forms/source/component/ListBox.cxx             |    7 
 forms/source/component/ListBox.hxx             |    9 
 forms/source/component/Numeric.cxx             |    7 
 forms/source/component/Numeric.hxx             |    9 
 forms/source/component/Pattern.cxx             |    7 
 forms/source/component/Pattern.hxx             |    9 
 forms/source/component/RadioButton.cxx         |    7 
 forms/source/component/RadioButton.hxx         |    9 
 forms/source/component/Time.cxx                |    7 
 forms/source/component/Time.hxx                |    9 
 forms/source/component/clickableimage.hxx      |    7 
 forms/source/component/navigationbar.cxx       |    7 
 forms/source/component/navigationbar.hxx       |    9 
 forms/source/component/refvaluecomponent.hxx   |    6 
 forms/source/component/scrollbar.cxx           |    7 
 forms/source/component/scrollbar.hxx           |    9 
 forms/source/component/spinbutton.cxx          |    7 
 forms/source/component/spinbutton.hxx          |    9 
 forms/source/inc/FormComponent.hxx             |   28 --
 forms/source/misc/property.cxx                 |  321 ++++++++++++-------------
 forms/source/richtext/richtextmodel.cxx        |    7 
 forms/source/richtext/richtextmodel.hxx        |    9 
 forms/source/solar/component/navbarcontrol.cxx |   25 +
 forms/source/xforms/binding.cxx                |   19 -
 forms/source/xforms/convert.cxx                |   40 ---
 forms/source/xforms/datatypes.hxx              |   90 ++++---
 54 files changed, 582 insertions(+), 326 deletions(-)

New commits:
commit 73334560b2dd2d60ac58d2cc2b1a5295490b03e1
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Nov 7 15:40:37 2021 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sun Nov 7 21:58:53 2021 +0100

    Replace some macros in forms part 16
    
    Remove DEFAULT_DECLARE_SUBTYPE + EXCEPT + EXPAND_PROP_INIT
    + DECLARE_DEFAULT_CLONE_CTOR + DECLARE_DEFAULT_LEAF_XTOR + FORWARD_TO_PEER_1
    + IMPLEMENT_DEFAULT_CLONING
    + ADD_ENTRY (include removing:
    /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:56:14: error: 
unused function 'lcl_toXSD_bool' [-Werror,-Wunused-function]
        OUString lcl_toXSD_bool( const Any& rAny )
                 ^
    /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:60:9: error: 
unused function 'lcl_toAny_bool' [-Werror,-Wunused-function]
        Any lcl_toAny_bool( const OUString& rStr )
            ^
    /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:67:14: error: 
unused function 'lcl_toXSD_double' [-Werror,-Wunused-function]
        OUString lcl_toXSD_double( const Any& rAny )
                 ^
    /home/julien/lo/libreoffice/forms/source/xforms/convert.cxx:80:9: error: 
unused function 'lcl_toAny_double' [-Werror,-Wunused-function]
        Any lcl_toAny_double( const OUString& rString )
            ^
    )
    
    Change-Id: I1e6923922b7037e8d1e9d009b05a27111c94b6fa
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124827
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/forms/source/component/Button.cxx 
b/forms/source/component/Button.cxx
index 3b58ea317303..8b913ac7a0c3 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -115,7 +115,13 @@ void OButtonModel::describeFixedProperties( Sequence< 
Property >& _rProps ) cons
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OButtonModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OButtonModel::createClone()
+{
+    rtl::Reference<OButtonModel> pClone = new OButtonModel(this, getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
+
 
 // XServiceInfo
 
diff --git a/forms/source/component/Button.hxx 
b/forms/source/component/Button.hxx
index fa77e4abd3a7..7ccaf7d8adee 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -45,7 +45,14 @@ class OButtonModel  :public OClickableImageBaseModel
                     ,public OButtonModel_Base
 {
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OButtonModel );
+    OButtonModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OButtonModel(
+        const OButtonModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OButtonModel() override;
 
     // UNO
     DECLARE_UNO3_AGG_DEFAULTS( OButtonModel, OClickableImageBaseModel )
diff --git a/forms/source/component/CheckBox.cxx 
b/forms/source/component/CheckBox.cxx
index 8b34ba18af66..7718b7d74504 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -78,7 +78,13 @@ OCheckBoxModel::~OCheckBoxModel()
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OCheckBoxModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OCheckBoxModel::createClone()
+{
+    rtl::Reference<OCheckBoxModel> pClone = new OCheckBoxModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
+
 
 // XServiceInfo
 
diff --git a/forms/source/component/CheckBox.hxx 
b/forms/source/component/CheckBox.hxx
index 7f4ab7103153..8023e7446cf5 100644
--- a/forms/source/component/CheckBox.hxx
+++ b/forms/source/component/CheckBox.hxx
@@ -30,7 +30,14 @@ class OCheckBoxModel final : public OReferenceValueComponent
     bool        DbUseBool();
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OCheckBoxModel );
+    OCheckBoxModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OCheckBoxModel(
+        const OCheckBoxModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OCheckBoxModel() override;
 
     // XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/ComboBox.cxx 
b/forms/source/component/ComboBox.cxx
index d6a2ae13ddfd..4e59c99ed503 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -144,7 +144,12 @@ OComboBoxModel::~OComboBoxModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( OComboBoxModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OComboBoxModel::createClone()
+{
+    rtl::Reference<OComboBoxModel> pClone = new OComboBoxModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 void OComboBoxModel::disposing()
diff --git a/forms/source/component/ComboBox.hxx 
b/forms/source/component/ComboBox.hxx
index 7b88717cc5c3..ed2360144225 100644
--- a/forms/source/component/ComboBox.hxx
+++ b/forms/source/component/ComboBox.hxx
@@ -54,7 +54,14 @@ class OComboBoxModel final
     virtual css::uno::Sequence< css::uno::Type>   _getTypes() override;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OComboBoxModel );
+    OComboBoxModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OComboBoxModel(
+        const OComboBoxModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OComboBoxModel() override;
 
     virtual void SAL_CALL disposing() override;
 
diff --git a/forms/source/component/Currency.cxx 
b/forms/source/component/Currency.cxx
index b6c2cb8ff42e..fe3018659df8 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -130,7 +130,13 @@ OCurrencyModel::~OCurrencyModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( OCurrencyModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OCurrencyModel::createClone()
+{
+    rtl::Reference<OCurrencyModel> pClone = new OCurrencyModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
+
 
 // XServiceInfo
 
diff --git a/forms/source/component/Currency.hxx 
b/forms/source/component/Currency.hxx
index 1deca259533f..f77f711f090a 100644
--- a/forms/source/component/Currency.hxx
+++ b/forms/source/component/Currency.hxx
@@ -31,7 +31,14 @@ class OCurrencyModel final
     css::uno::Any          m_aSaveValue;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OCurrencyModel );
+    OCurrencyModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OCurrencyModel(
+        const OCurrencyModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OCurrencyModel() override;
 
     // css::lang::XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 86dd52158b92..cf3de99e1b24 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -110,7 +110,12 @@ ODateModel::~ODateModel( )
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( ODateModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL ODateModel::createClone()
+{
+    rtl::Reference<ODateModel> pClone = new ODateModel(this, getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 // XServiceInfo
 
diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx
index 36a04acc79fa..77d4d8a3e033 100644
--- a/forms/source/component/Date.hxx
+++ b/forms/source/component/Date.hxx
@@ -37,7 +37,15 @@ protected:
     virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( ODateModel );
+    ODateModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    ODateModel(
+        const ODateModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~ODateModel() override;
+
 
     // XPersistObject
     virtual OUString SAL_CALL getServiceName() override;
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index 1d9a1d870e4b..f82a8479e4bd 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -288,7 +288,12 @@ OEditModel::~OEditModel()
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OEditModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL OEditModel::createClone()
+{
+    rtl::Reference<OEditModel> pClone = new OEditModel(this, getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 void OEditModel::disposing()
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index 998a44aacf55..005e63e7cbef 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -42,7 +42,14 @@ class OEditModel final : public OEditBaseModel
     bool                    m_bWritingFormattedFake : 1; // are we writing 
something which should be interpreted as formatted upon reading?
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OEditModel );
+    OEditModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OEditModel(
+        const OEditModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OEditModel() override;
 
 private:
     void enableFormattedWriteFake() { m_bWritingFormattedFake = true; }
diff --git a/forms/source/component/EditBase.hxx 
b/forms/source/component/EditBase.hxx
index 67e88a433b27..c74476bc038c 100644
--- a/forms/source/component/EditBase.hxx
+++ b/forms/source/component/EditBase.hxx
@@ -57,7 +57,12 @@ public:
         const bool _bSupportExternalBinding,
         const bool _bSupportsValidation
     );
-    DECLARE_DEFAULT_CLONE_CTOR( OEditBaseModel )
+
+    OEditBaseModel(
+        const OEditBaseModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+
     virtual ~OEditBaseModel() override;
 
     // XPersistObject
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 076b60f46428..1859e38c97ad 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -95,7 +95,12 @@ OFileControlModel::~OFileControlModel()
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OFileControlModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OFileControlModel::createClone()
+{
+    rtl::Reference<OFileControlModel> pClone = new OFileControlModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 Any SAL_CALL OFileControlModel::queryAggregation(const Type& _rType)
diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx
index a2bf28d6214c..194bbdfa327f 100644
--- a/forms/source/component/File.hxx
+++ b/forms/source/component/File.hxx
@@ -36,7 +36,14 @@ protected:
     virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OFileControlModel );
+    OFileControlModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OFileControlModel(
+        const OFileControlModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OFileControlModel() override;
 
     DECLARE_UNO3_AGG_DEFAULTS(OFileControlModel, OControlModel)
     virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type& 
_rType) override;
diff --git a/forms/source/component/FixedText.cxx 
b/forms/source/component/FixedText.cxx
index 67fa5288ef75..e68b09fed08f 100644
--- a/forms/source/component/FixedText.cxx
+++ b/forms/source/component/FixedText.cxx
@@ -60,7 +60,12 @@ OFixedTextModel::~OFixedTextModel( )
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OFixedTextModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OFixedTextModel::createClone()
+{
+    rtl::Reference<OFixedTextModel> pClone = new OFixedTextModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 css::uno::Sequence<OUString> SAL_CALL 
OFixedTextModel::getSupportedServiceNames()
diff --git a/forms/source/component/FixedText.hxx 
b/forms/source/component/FixedText.hxx
index a6d6f0b2d5c1..a4bafab60d27 100644
--- a/forms/source/component/FixedText.hxx
+++ b/forms/source/component/FixedText.hxx
@@ -29,7 +29,14 @@ class OFixedTextModel
         :public OControlModel
 {
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OFixedTextModel );
+    OFixedTextModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OFixedTextModel(
+        const OFixedTextModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OFixedTextModel() override;
 
 // XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/FormattedField.cxx 
b/forms/source/component/FormattedField.cxx
index 6d826aaab861..340ee79a8a0f 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -287,7 +287,12 @@ OFormattedModel::~OFormattedModel()
 }
 
 // XCloneable
-IMPLEMENT_DEFAULT_CLONING( OFormattedModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OFormattedModel::createClone()
+{
+    rtl::Reference<OFormattedModel> pClone = new OFormattedModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 void SAL_CALL OFormattedModel::disposing()
 {
diff --git a/forms/source/component/FormattedField.hxx 
b/forms/source/component/FormattedField.hxx
index e1520cd6ee47..c9d0f1c1705e 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -50,7 +50,14 @@ class OFormattedModel final
         css::uno::Reference< css::util::XNumberFormatsSupplier>  
calcFormFormatsSupplier() const;
         css::uno::Reference< css::util::XNumberFormatsSupplier>  
calcFormatsSupplier() const;
 
-        DECLARE_DEFAULT_LEAF_XTOR( OFormattedModel );
+        OFormattedModel(
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        OFormattedModel(
+            const OFormattedModel* _pOriginal,
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        virtual ~OFormattedModel() override;
 
         friend class OFormattedFieldWrapper;
 
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index 523a8132db68..d4eaec67fe9e 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -87,7 +87,14 @@ class OGridControlModel final :public OControlModel
     void _reset();
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OGridControlModel );
+    OGridControlModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OGridControlModel(
+        const OGridControlModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OGridControlModel() override;
 
     // UNO Binding
     DECLARE_UNO3_AGG_DEFAULTS(OGridControlModel, OControlModel)
diff --git a/forms/source/component/GroupBox.cxx 
b/forms/source/component/GroupBox.cxx
index 25c353a0bceb..fab26e2e7fb8 100644
--- a/forms/source/component/GroupBox.cxx
+++ b/forms/source/component/GroupBox.cxx
@@ -73,7 +73,12 @@ OGroupBoxModel::~OGroupBoxModel()
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OGroupBoxModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OGroupBoxModel::createClone()
+{
+    rtl::Reference<OGroupBoxModel> pClone = new OGroupBoxModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 void OGroupBoxModel::describeAggregateProperties( Sequence< Property >& 
_rAggregateProps ) const
diff --git a/forms/source/component/GroupBox.hxx 
b/forms/source/component/GroupBox.hxx
index 00f4523aad07..c1c53df0b613 100644
--- a/forms/source/component/GroupBox.hxx
+++ b/forms/source/component/GroupBox.hxx
@@ -29,7 +29,14 @@ class OGroupBoxModel
         :public OControlModel
 {
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OGroupBoxModel );
+    OGroupBoxModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OGroupBoxModel(
+        const OGroupBoxModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OGroupBoxModel() override;
 
     // XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/Hidden.cxx 
b/forms/source/component/Hidden.cxx
index 49a3a5c40f54..092eeb773fe4 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -59,7 +59,12 @@ OHiddenModel::~OHiddenModel( )
 }
 
 
-IMPLEMENT_DEFAULT_CLONING( OHiddenModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OHiddenModel::createClone()
+{
+    rtl::Reference<OHiddenModel> pClone = new OHiddenModel(this, getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 void OHiddenModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
diff --git a/forms/source/component/Hidden.hxx 
b/forms/source/component/Hidden.hxx
index 9ed34f3e406f..7bd01ccf939a 100644
--- a/forms/source/component/Hidden.hxx
+++ b/forms/source/component/Hidden.hxx
@@ -31,7 +31,14 @@ class OHiddenModel
     OUString     m_sHiddenValue;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OHiddenModel );
+    OHiddenModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OHiddenModel(
+        const OHiddenModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OHiddenModel() override;
 
     // OPropertySetHelper
     virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, 
sal_Int32 nHandle) const override;
diff --git a/forms/source/component/ImageButton.cxx 
b/forms/source/component/ImageButton.cxx
index a5676c499263..27c152035b41 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -55,7 +55,12 @@ OImageButtonModel::OImageButtonModel( const 
OImageButtonModel* _pOriginal, const
     implInitializeImageURL();
 }
 
-IMPLEMENT_DEFAULT_CLONING( OImageButtonModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OImageButtonModel::createClone()
+{
+    rtl::Reference<OImageButtonModel> pClone = new OImageButtonModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 OImageButtonModel::~OImageButtonModel()
 {
diff --git a/forms/source/component/ImageButton.hxx 
b/forms/source/component/ImageButton.hxx
index d3d248566944..0e5c402abbc3 100644
--- a/forms/source/component/ImageButton.hxx
+++ b/forms/source/component/ImageButton.hxx
@@ -30,7 +30,14 @@ class OImageButtonModel
         :public OClickableImageBaseModel
 {
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OImageButtonModel );
+    OImageButtonModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OImageButtonModel(
+        const OImageButtonModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OImageButtonModel() override;
 
 // css::lang::XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/ImageControl.cxx 
b/forms/source/component/ImageControl.cxx
index 122f878490eb..08276d84bba6 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -178,7 +178,12 @@ OImageControlModel::~OImageControlModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( OImageControlModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OImageControlModel::createClone()
+{
+    rtl::Reference<OImageControlModel> pClone = new OImageControlModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 // XServiceInfo
 
diff --git a/forms/source/component/ImageControl.hxx 
b/forms/source/component/ImageControl.hxx
index 8776d891e83a..a31779f1a5a9 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -57,7 +57,14 @@ class OImageControlModel final
     ImageProducer* GetImageProducer() { return m_xImageProducer.get(); }
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OImageControlModel );
+    OImageControlModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OImageControlModel(
+        const OImageControlModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OImageControlModel() override;
 
     virtual void SAL_CALL getFastPropertyValue(css::uno::Any& rValue, 
sal_Int32 nHandle ) const override;
     virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, 
const css::uno::Any& rValue) override;
diff --git a/forms/source/component/ListBox.cxx 
b/forms/source/component/ListBox.cxx
index 854c8261763c..851add9092a5 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -193,7 +193,12 @@ namespace frm
 
     // XCloneable
 
-    IMPLEMENT_DEFAULT_CLONING( OListBoxModel )
+    css::uno::Reference< css::util::XCloneable > SAL_CALL 
OListBoxModel::createClone()
+{
+    rtl::Reference<OListBoxModel> pClone = new OListBoxModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
     // XServiceInfo
 
diff --git a/forms/source/component/ListBox.hxx 
b/forms/source/component/ListBox.hxx
index b4b51d4d8ce0..ec2927d01525 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -121,7 +121,14 @@ private:
     virtual css::uno::Sequence< css::uno::Type>   _getTypes() override;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OListBoxModel );
+    OListBoxModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OListBoxModel(
+        const OListBoxModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OListBoxModel() override;
 
 // XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/Numeric.cxx 
b/forms/source/component/Numeric.cxx
index feafca722cdf..41dea5c47e29 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -79,7 +79,12 @@ ONumericModel::~ONumericModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( ONumericModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
ONumericModel::createClone()
+{
+    rtl::Reference<ONumericModel> pClone = new ONumericModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 // XServiceInfo
 
diff --git a/forms/source/component/Numeric.hxx 
b/forms/source/component/Numeric.hxx
index 6a77cc556dce..0b5cb703eca2 100644
--- a/forms/source/component/Numeric.hxx
+++ b/forms/source/component/Numeric.hxx
@@ -32,7 +32,14 @@ private:
     css::uno::Any          m_aSaveValue;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( ONumericModel );
+    ONumericModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    ONumericModel(
+        const ONumericModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~ONumericModel() override;
 
     // css::lang::XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/Pattern.cxx 
b/forms/source/component/Pattern.cxx
index 95f6da4161fe..434bf27f7cfc 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -79,7 +79,12 @@ OPatternModel::~OPatternModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( OPatternModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
OPatternModel::createClone()
+{
+    rtl::Reference<OPatternModel> pClone = new OPatternModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 // XServiceInfo
 
diff --git a/forms/source/component/Pattern.hxx 
b/forms/source/component/Pattern.hxx
index d7cfa9d09f0d..d0923c13cf58 100644
--- a/forms/source/component/Pattern.hxx
+++ b/forms/source/component/Pattern.hxx
@@ -38,7 +38,14 @@ private:
                                 m_pFormattedValue;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OPatternModel );
+    OPatternModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OPatternModel(
+        const OPatternModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OPatternModel() override;
 
     // css::lang::XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/RadioButton.cxx 
b/forms/source/component/RadioButton.cxx
index 84a5b74cdcd8..e7829c39bc4c 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -83,7 +83,12 @@ ORadioButtonModel::~ORadioButtonModel()
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( ORadioButtonModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL 
ORadioButtonModel::createClone()
+{
+    rtl::Reference<ORadioButtonModel> pClone = new ORadioButtonModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 // XServiceInfo
 
diff --git a/forms/source/component/RadioButton.hxx 
b/forms/source/component/RadioButton.hxx
index b85a0a27ef9f..0e50acfc4245 100644
--- a/forms/source/component/RadioButton.hxx
+++ b/forms/source/component/RadioButton.hxx
@@ -28,7 +28,14 @@ namespace frm
 class ORadioButtonModel final : public OReferenceValueComponent
 {
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( ORadioButtonModel );
+    ORadioButtonModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    ORadioButtonModel(
+        const ORadioButtonModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~ORadioButtonModel() override;
 
     // XServiceInfo
     OUString SAL_CALL getImplementationName() override
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 88350ca7f9a0..24d4a0369a90 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -134,7 +134,12 @@ OTimeModel::~OTimeModel( )
 
 // XCloneable
 
-IMPLEMENT_DEFAULT_CLONING( OTimeModel )
+css::uno::Reference< css::util::XCloneable > SAL_CALL OTimeModel::createClone()
+{
+    rtl::Reference<OTimeModel> pClone = new OTimeModel(this, getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
 OUString SAL_CALL OTimeModel::getServiceName()
diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx
index d1187d39f318..3a6793fa5c81 100644
--- a/forms/source/component/Time.hxx
+++ b/forms/source/component/Time.hxx
@@ -38,7 +38,14 @@ protected:
     virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
 
 public:
-    DECLARE_DEFAULT_LEAF_XTOR( OTimeModel );
+    OTimeModel(
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    OTimeModel(
+        const OTimeModel* _pOriginal,
+        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+    );
+    virtual ~OTimeModel() override;
 
     // css::io::XPersistObject
     virtual OUString SAL_CALL getServiceName() override;
diff --git a/forms/source/component/clickableimage.hxx 
b/forms/source/component/clickableimage.hxx
index eea5ed827e7d..e7bd4094bc4d 100644
--- a/forms/source/component/clickableimage.hxx
+++ b/forms/source/component/clickableimage.hxx
@@ -91,7 +91,12 @@ namespace frm
             const OUString& _rUnoControlModelTypeName,
             const OUString& _rDefault
         );
-        DECLARE_DEFAULT_CLONE_CTOR( OClickableImageBaseModel )
+
+        OClickableImageBaseModel (
+        const OClickableImageBaseModel* _pOriginal,
+        const   css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+
         virtual ~OClickableImageBaseModel() override;
 
         // UNO Binding
diff --git a/forms/source/component/navigationbar.cxx 
b/forms/source/component/navigationbar.cxx
index 12491dc975a8..ba564141ab23 100644
--- a/forms/source/component/navigationbar.cxx
+++ b/forms/source/component/navigationbar.cxx
@@ -158,7 +158,12 @@ namespace frm
     IMPLEMENT_FORWARD_XTYPEPROVIDER2( ONavigationBarModel, OControlModel, 
ONavigationBarModel_BASE )
 
 
-    IMPLEMENT_DEFAULT_CLONING( ONavigationBarModel )
+    css::uno::Reference< css::util::XCloneable > SAL_CALL 
ONavigationBarModel::createClone()
+{
+    rtl::Reference<ONavigationBarModel> pClone = new ONavigationBarModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
     OUString SAL_CALL ONavigationBarModel::getImplementationName()
diff --git a/forms/source/component/navigationbar.hxx 
b/forms/source/component/navigationbar.hxx
index fade59422f8c..ceb84dbe8ecd 100644
--- a/forms/source/component/navigationbar.hxx
+++ b/forms/source/component/navigationbar.hxx
@@ -59,7 +59,14 @@ namespace frm
         // </properties>
 
     public:
-        DECLARE_DEFAULT_LEAF_XTOR( ONavigationBarModel );
+        ONavigationBarModel(
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        ONavigationBarModel(
+            const ONavigationBarModel* _pOriginal,
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        virtual ~ONavigationBarModel() override;
 
         // UNO
         DECLARE_UNO3_AGG_DEFAULTS( ONavigationBarModel, OControlModel )
diff --git a/forms/source/component/refvaluecomponent.hxx 
b/forms/source/component/refvaluecomponent.hxx
index 09131c172bf7..79f343888c1c 100644
--- a/forms/source/component/refvaluecomponent.hxx
+++ b/forms/source/component/refvaluecomponent.hxx
@@ -52,7 +52,11 @@ namespace frm
             const OUString& _rUnoControlModelTypeName,
             const OUString& _rDefault
         );
-        DECLARE_DEFAULT_CLONE_CTOR( OReferenceValueComponent )
+        OReferenceValueComponent(
+            const OReferenceValueComponent* _pOriginal,
+            const   css::uno::Reference< css::uno::XComponentContext>& 
_rxFactory
+        );
+
         virtual ~OReferenceValueComponent() override;
 
         // OPropertySet and friends
diff --git a/forms/source/component/scrollbar.cxx 
b/forms/source/component/scrollbar.cxx
index e2b740183c57..0bc5e0240900 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -131,7 +131,12 @@ namespace frm
         );
     }
 
-    IMPLEMENT_DEFAULT_CLONING( OScrollBarModel )
+    css::uno::Reference< css::util::XCloneable > SAL_CALL 
OScrollBarModel::createClone()
+{
+    rtl::Reference<OScrollBarModel> pClone = new OScrollBarModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
     void OScrollBarModel::describeFixedProperties( Sequence< Property >& 
_rProps ) const
diff --git a/forms/source/component/scrollbar.hxx 
b/forms/source/component/scrollbar.hxx
index 574faaff38c7..0acb91a3a009 100644
--- a/forms/source/component/scrollbar.hxx
+++ b/forms/source/component/scrollbar.hxx
@@ -31,7 +31,14 @@ namespace frm
         // </properties>
 
     public:
-        DECLARE_DEFAULT_LEAF_XTOR( OScrollBarModel );
+        OScrollBarModel(
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        OScrollBarModel(
+            const OScrollBarModel* _pOriginal,
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        virtual ~OScrollBarModel() override;
 
     protected:
         // XServiceInfo
diff --git a/forms/source/component/spinbutton.cxx 
b/forms/source/component/spinbutton.cxx
index 772b364db504..197497671860 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -85,7 +85,12 @@ namespace frm
         );
     }
 
-    IMPLEMENT_DEFAULT_CLONING( OSpinButtonModel )
+    css::uno::Reference< css::util::XCloneable > SAL_CALL 
OSpinButtonModel::createClone()
+{
+    rtl::Reference<OSpinButtonModel> pClone = new OSpinButtonModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
     void OSpinButtonModel::describeFixedProperties( Sequence< Property >& 
_rProps ) const
diff --git a/forms/source/component/spinbutton.hxx 
b/forms/source/component/spinbutton.hxx
index debbfc72d286..b9800274f063 100644
--- a/forms/source/component/spinbutton.hxx
+++ b/forms/source/component/spinbutton.hxx
@@ -32,7 +32,14 @@ namespace frm
         // </properties>
 
     public:
-        DECLARE_DEFAULT_LEAF_XTOR( OSpinButtonModel );
+        OSpinButtonModel(
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        OSpinButtonModel(
+            const OSpinButtonModel* _pOriginal,
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        virtual ~OSpinButtonModel() override;
 
     protected:
         // XServiceInfo
diff --git a/forms/source/inc/FormComponent.hxx 
b/forms/source/inc/FormComponent.hxx
index 8d1f97154cce..7a59d37d5574 100644
--- a/forms/source/inc/FormComponent.hxx
+++ b/forms/source/inc/FormComponent.hxx
@@ -483,34 +483,6 @@ public:
                         getInstanceMutex() { return m_aMutex; }
 };
 
-// constructor for cloning a class
-#define DECLARE_DEFAULT_CLONE_CTOR( classname )  \
-    classname( \
-        const classname* _pOriginal, \
-        const   css::uno::Reference< css::uno::XComponentContext>& _rxFactory \
-    ); \
-
-// all xtors for a leaf class of the object hierarchy
-#define DECLARE_DEFAULT_LEAF_XTOR( classname )  \
-    classname( \
-        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory \
-    ); \
-    classname( \
-        const classname* _pOriginal, \
-        const css::uno::Reference< css::uno::XComponentContext>& _rxFactory \
-    ); \
-    virtual ~classname() override \
-
-
-#define IMPLEMENT_DEFAULT_CLONING( classname ) \
-    css::uno::Reference< css::util::XCloneable > SAL_CALL 
classname::createClone( ) \
-    { \
-        rtl::Reference<classname> pClone = new classname( this, getContext() 
); \
-        pClone->clonedFrom( this ); \
-        return pClone; \
-    }
-
-
 //= OBoundControlModel
 //= model of a form layer control which is bound to a data source field
 
diff --git a/forms/source/misc/property.cxx b/forms/source/misc/property.cxx
index 11c3ad7d2022..6200b343865d 100644
--- a/forms/source/misc/property.cxx
+++ b/forms/source/misc/property.cxx
@@ -45,174 +45,171 @@ sal_Int32 
ConcreteInfoService::getPreferredPropertyId(const OUString& _rName)
 }
 
 
-#define EXPAND_PROP_INIT(varname) \
-    { PROPERTY_##varname, PROPERTY_ID_##varname }
-
 void PropertyInfoService::initialize()
 {
     if (!s_AllKnownProperties.empty())
         return;
 
     s_AllKnownProperties.insert({
-        EXPAND_PROP_INIT(NAME),
-        EXPAND_PROP_INIT(TAG),
-        EXPAND_PROP_INIT(TABINDEX),
-        EXPAND_PROP_INIT(CLASSID),
-        EXPAND_PROP_INIT(ALIGN),
-        EXPAND_PROP_INIT(FETCHSIZE),
-        EXPAND_PROP_INIT(VALUE),
-        EXPAND_PROP_INIT(VALUEMIN),
-        EXPAND_PROP_INIT(VALUEMAX),
-        EXPAND_PROP_INIT(VALUESTEP),
-        EXPAND_PROP_INIT(TEXT),
-        EXPAND_PROP_INIT(LABEL),
-        EXPAND_PROP_INIT(NAVIGATION),
-        EXPAND_PROP_INIT(CYCLE),
-        EXPAND_PROP_INIT(CONTROLSOURCE),
-        EXPAND_PROP_INIT(ENABLED),
-        EXPAND_PROP_INIT(ENABLEVISIBLE),
-        EXPAND_PROP_INIT(SPIN),
-        EXPAND_PROP_INIT(READONLY),
-        EXPAND_PROP_INIT(FILTER),
-        EXPAND_PROP_INIT(WIDTH),
-        EXPAND_PROP_INIT(SEARCHABLE),
-        EXPAND_PROP_INIT(MULTILINE),
-        EXPAND_PROP_INIT(TARGET_URL),
-        EXPAND_PROP_INIT(DEFAULTCONTROL),
-        EXPAND_PROP_INIT(MAXTEXTLEN),
-        EXPAND_PROP_INIT(SIZE),
-        EXPAND_PROP_INIT(DATE),
-        EXPAND_PROP_INIT(TIME),
-        EXPAND_PROP_INIT(STATE),
-        EXPAND_PROP_INIT(TRISTATE),
-        EXPAND_PROP_INIT(HIDDEN_VALUE),
-        EXPAND_PROP_INIT(TARGET_FRAME),
-        EXPAND_PROP_INIT(BUTTONTYPE),
-        EXPAND_PROP_INIT(STRINGITEMLIST),
-        EXPAND_PROP_INIT(TYPEDITEMLIST),
-        EXPAND_PROP_INIT(DEFAULT_TEXT),
-        EXPAND_PROP_INIT(DEFAULT_STATE),
-        EXPAND_PROP_INIT(DEFAULT_DATE),
-        EXPAND_PROP_INIT(DEFAULT_TIME),
-        EXPAND_PROP_INIT(DEFAULT_VALUE),
-        EXPAND_PROP_INIT(FORMATKEY),
-        EXPAND_PROP_INIT(FORMATSSUPPLIER),
-        EXPAND_PROP_INIT(SUBMIT_ACTION),
-        EXPAND_PROP_INIT(SUBMIT_TARGET),
-        EXPAND_PROP_INIT(SUBMIT_METHOD),
-        EXPAND_PROP_INIT(SUBMIT_ENCODING),
-        EXPAND_PROP_INIT(IMAGE_URL),
-        EXPAND_PROP_INIT(GRAPHIC),
-        EXPAND_PROP_INIT(EMPTY_IS_NULL),
-        EXPAND_PROP_INIT(LISTSOURCETYPE),
-        EXPAND_PROP_INIT(LISTSOURCE),
-        EXPAND_PROP_INIT(SELECT_SEQ),
-        EXPAND_PROP_INIT(VALUE_SEQ),
-        EXPAND_PROP_INIT(SELECT_VALUE),
-        EXPAND_PROP_INIT(SELECT_VALUE_SEQ),
-        EXPAND_PROP_INIT(DEFAULT_SELECT_SEQ),
-        EXPAND_PROP_INIT(MULTISELECTION),
-        EXPAND_PROP_INIT(DECIMAL_ACCURACY),
-        EXPAND_PROP_INIT(EDITMASK),
-        EXPAND_PROP_INIT(ISREADONLY),
-        EXPAND_PROP_INIT(FIELDTYPE),
-        EXPAND_PROP_INIT(DECIMALS),
-        EXPAND_PROP_INIT(REFVALUE),
-        EXPAND_PROP_INIT(STRICTFORMAT),
-        EXPAND_PROP_INIT(DATASOURCE),
-        EXPAND_PROP_INIT(ALLOWADDITIONS),
-        EXPAND_PROP_INIT(ALLOWEDITS),
-        EXPAND_PROP_INIT(ALLOWDELETIONS),
-        EXPAND_PROP_INIT(MASTERFIELDS),
-        EXPAND_PROP_INIT(ISPASSTHROUGH),
-        EXPAND_PROP_INIT(QUERY),
-        EXPAND_PROP_INIT(LITERALMASK),
-        EXPAND_PROP_INIT(SHOWTHOUSANDSEP),
-        EXPAND_PROP_INIT(CURRENCYSYMBOL),
-        EXPAND_PROP_INIT(DATEFORMAT),
-        EXPAND_PROP_INIT(DATEMIN),
-        EXPAND_PROP_INIT(DATEMAX),
-        EXPAND_PROP_INIT(DATE_SHOW_CENTURY),
-        EXPAND_PROP_INIT(TIMEFORMAT),
-        EXPAND_PROP_INIT(TIMEMIN),
-        EXPAND_PROP_INIT(TIMEMAX),
-        EXPAND_PROP_INIT(LINECOUNT),
-        EXPAND_PROP_INIT(BOUNDCOLUMN),
-        EXPAND_PROP_INIT(HASNAVIGATION),
-        EXPAND_PROP_INIT(FONT),
-        EXPAND_PROP_INIT(BACKGROUNDCOLOR),
-        EXPAND_PROP_INIT(FILLCOLOR),
-        EXPAND_PROP_INIT(TEXTCOLOR),
-        EXPAND_PROP_INIT(LINECOLOR),
-        EXPAND_PROP_INIT(BORDER),
-        EXPAND_PROP_INIT(DROPDOWN),
-        EXPAND_PROP_INIT(HSCROLL),
-        EXPAND_PROP_INIT(VSCROLL),
-        EXPAND_PROP_INIT(TABSTOP),
-        EXPAND_PROP_INIT(AUTOCOMPLETE),
-        EXPAND_PROP_INIT(HARDLINEBREAKS),
-        EXPAND_PROP_INIT(PRINTABLE),
-        EXPAND_PROP_INIT(ECHO_CHAR),
-        EXPAND_PROP_INIT(ROWHEIGHT),
-        EXPAND_PROP_INIT(HELPTEXT),
-        EXPAND_PROP_INIT(FONT_NAME),
-        EXPAND_PROP_INIT(FONT_STYLENAME),
-        EXPAND_PROP_INIT(FONT_FAMILY),
-        EXPAND_PROP_INIT(FONT_CHARSET),
-        EXPAND_PROP_INIT(FONT_HEIGHT),
-        EXPAND_PROP_INIT(FONT_WEIGHT),
-        EXPAND_PROP_INIT(FONT_SLANT),
-        EXPAND_PROP_INIT(FONT_UNDERLINE),
-        EXPAND_PROP_INIT(FONT_WORDLINEMODE),
-        EXPAND_PROP_INIT(FONT_STRIKEOUT),
-        EXPAND_PROP_INIT(TEXTLINECOLOR),
-        EXPAND_PROP_INIT(FONTEMPHASISMARK),
-        EXPAND_PROP_INIT(FONTRELIEF),
-        EXPAND_PROP_INIT(HELPURL),
-        EXPAND_PROP_INIT(RECORDMARKER),
-        EXPAND_PROP_INIT(BOUNDFIELD),
-        EXPAND_PROP_INIT(INPUT_REQUIRED),
-        EXPAND_PROP_INIT(TREATASNUMERIC),
-        EXPAND_PROP_INIT(EFFECTIVE_VALUE),
-        EXPAND_PROP_INIT(EFFECTIVE_DEFAULT),
-        EXPAND_PROP_INIT(EFFECTIVE_MIN),
-        EXPAND_PROP_INIT(EFFECTIVE_MAX),
-        EXPAND_PROP_INIT(HIDDEN),
-        EXPAND_PROP_INIT(FILTERPROPOSAL),
-        EXPAND_PROP_INIT(FIELDSOURCE),
-        EXPAND_PROP_INIT(TABLENAME),
-        EXPAND_PROP_INIT(CONTROLLABEL),
-        EXPAND_PROP_INIT(CURRSYM_POSITION),
-        EXPAND_PROP_INIT(CURSORCOLOR),
-        EXPAND_PROP_INIT(ALWAYSSHOWCURSOR),
-        EXPAND_PROP_INIT(DISPLAYSYNCHRON),
-        EXPAND_PROP_INIT(ISMODIFIED),
-        EXPAND_PROP_INIT(ISNEW),
-        EXPAND_PROP_INIT(PRIVILEGES),
-        EXPAND_PROP_INIT(DETAILFIELDS),
-        EXPAND_PROP_INIT(COMMAND),
-        EXPAND_PROP_INIT(COMMANDTYPE),
-        EXPAND_PROP_INIT(RESULTSET_CONCURRENCY),
-        EXPAND_PROP_INIT(INSERTONLY),
-        EXPAND_PROP_INIT(RESULTSET_TYPE),
-        EXPAND_PROP_INIT(ESCAPE_PROCESSING),
-        EXPAND_PROP_INIT(APPLYFILTER),
-        EXPAND_PROP_INIT(ISNULLABLE),
-        EXPAND_PROP_INIT(ACTIVECOMMAND),
-        EXPAND_PROP_INIT(ISCURRENCY),
-        EXPAND_PROP_INIT(URL),
-        EXPAND_PROP_INIT(TITLE),
-        EXPAND_PROP_INIT(ACTIVE_CONNECTION),
-        EXPAND_PROP_INIT(SCALE),
-        EXPAND_PROP_INIT(SORT),
-        EXPAND_PROP_INIT(PERSISTENCE_MAXTEXTLENGTH),
-        EXPAND_PROP_INIT(SCROLL_VALUE),
-        EXPAND_PROP_INIT(SPIN_VALUE),
-        EXPAND_PROP_INIT(DEFAULT_SCROLL_VALUE),
-        EXPAND_PROP_INIT(DEFAULT_SPIN_VALUE),
-        EXPAND_PROP_INIT( WRITING_MODE ),
-        EXPAND_PROP_INIT( CONTEXT_WRITING_MODE ),
-        EXPAND_PROP_INIT( GENERATEVBAEVENTS )
+        { PROPERTY_NAME, PROPERTY_ID_NAME },
+        { PROPERTY_TAG, PROPERTY_ID_TAG },
+        { PROPERTY_TABINDEX, PROPERTY_ID_TABINDEX },
+        { PROPERTY_CLASSID, PROPERTY_ID_CLASSID },
+        { PROPERTY_ALIGN, PROPERTY_ID_ALIGN },
+        { PROPERTY_FETCHSIZE, PROPERTY_ID_FETCHSIZE },
+        { PROPERTY_VALUE, PROPERTY_ID_VALUE },
+        { PROPERTY_VALUEMIN, PROPERTY_ID_VALUEMIN },
+        { PROPERTY_VALUEMAX, PROPERTY_ID_VALUEMAX },
+        { PROPERTY_VALUESTEP, PROPERTY_ID_VALUESTEP },
+        { PROPERTY_TEXT, PROPERTY_ID_TEXT },
+        { PROPERTY_LABEL, PROPERTY_ID_LABEL },
+        { PROPERTY_NAVIGATION, PROPERTY_ID_NAVIGATION },
+        { PROPERTY_CYCLE, PROPERTY_ID_CYCLE },
+        { PROPERTY_CONTROLSOURCE, PROPERTY_ID_CONTROLSOURCE },
+        { PROPERTY_ENABLED, PROPERTY_ID_ENABLED },
+        { PROPERTY_ENABLEVISIBLE, PROPERTY_ID_ENABLEVISIBLE },
+        { PROPERTY_SPIN, PROPERTY_ID_SPIN },
+        { PROPERTY_READONLY, PROPERTY_ID_READONLY },
+        { PROPERTY_FILTER, PROPERTY_ID_FILTER },
+        { PROPERTY_WIDTH, PROPERTY_ID_WIDTH },
+        { PROPERTY_SEARCHABLE, PROPERTY_ID_SEARCHABLE },
+        { PROPERTY_MULTILINE, PROPERTY_ID_MULTILINE },
+        { PROPERTY_TARGET_URL, PROPERTY_ID_TARGET_URL },
+        { PROPERTY_DEFAULTCONTROL, PROPERTY_ID_DEFAULTCONTROL },
+        { PROPERTY_MAXTEXTLEN, PROPERTY_ID_MAXTEXTLEN },
+        { PROPERTY_SIZE, PROPERTY_ID_SIZE },
+        { PROPERTY_DATE, PROPERTY_ID_DATE },
+        { PROPERTY_TIME, PROPERTY_ID_TIME },
+        { PROPERTY_STATE, PROPERTY_ID_STATE },
+        { PROPERTY_TRISTATE, PROPERTY_ID_TRISTATE },
+        { PROPERTY_HIDDEN_VALUE, PROPERTY_ID_HIDDEN_VALUE },
+        { PROPERTY_TARGET_FRAME, PROPERTY_ID_TARGET_FRAME },
+        { PROPERTY_BUTTONTYPE, PROPERTY_ID_BUTTONTYPE },
+        { PROPERTY_STRINGITEMLIST, PROPERTY_ID_STRINGITEMLIST },
+        { PROPERTY_TYPEDITEMLIST, PROPERTY_ID_TYPEDITEMLIST },
+        { PROPERTY_DEFAULT_TEXT, PROPERTY_ID_DEFAULT_TEXT },
+        { PROPERTY_DEFAULT_STATE, PROPERTY_ID_DEFAULT_STATE },
+        { PROPERTY_DEFAULT_DATE, PROPERTY_ID_DEFAULT_DATE },
+        { PROPERTY_DEFAULT_TIME, PROPERTY_ID_DEFAULT_TIME },
+        { PROPERTY_DEFAULT_VALUE, PROPERTY_ID_DEFAULT_VALUE },
+        { PROPERTY_FORMATKEY, PROPERTY_ID_FORMATKEY },
+        { PROPERTY_FORMATSSUPPLIER, PROPERTY_ID_FORMATSSUPPLIER },
+        { PROPERTY_SUBMIT_ACTION, PROPERTY_ID_SUBMIT_ACTION },
+        { PROPERTY_SUBMIT_TARGET, PROPERTY_ID_SUBMIT_TARGET },
+        { PROPERTY_SUBMIT_METHOD, PROPERTY_ID_SUBMIT_METHOD },
+        { PROPERTY_SUBMIT_ENCODING, PROPERTY_ID_SUBMIT_ENCODING },
+        { PROPERTY_IMAGE_URL, PROPERTY_ID_IMAGE_URL },
+        { PROPERTY_GRAPHIC, PROPERTY_ID_GRAPHIC },
+        { PROPERTY_EMPTY_IS_NULL, PROPERTY_ID_EMPTY_IS_NULL },
+        { PROPERTY_LISTSOURCETYPE, PROPERTY_ID_LISTSOURCETYPE },
+        { PROPERTY_LISTSOURCE, PROPERTY_ID_LISTSOURCE },
+        { PROPERTY_SELECT_SEQ, PROPERTY_ID_SELECT_SEQ },
+        { PROPERTY_VALUE_SEQ, PROPERTY_ID_VALUE_SEQ },
+        { PROPERTY_SELECT_VALUE, PROPERTY_ID_SELECT_VALUE },
+        { PROPERTY_SELECT_VALUE_SEQ, PROPERTY_ID_SELECT_VALUE_SEQ },
+        { PROPERTY_DEFAULT_SELECT_SEQ, PROPERTY_ID_DEFAULT_SELECT_SEQ },
+        { PROPERTY_MULTISELECTION, PROPERTY_ID_MULTISELECTION },
+        { PROPERTY_DECIMAL_ACCURACY, PROPERTY_ID_DECIMAL_ACCURACY },
+        { PROPERTY_EDITMASK, PROPERTY_ID_EDITMASK },
+        { PROPERTY_ISREADONLY, PROPERTY_ID_ISREADONLY },
+        { PROPERTY_FIELDTYPE, PROPERTY_ID_FIELDTYPE },
+        { PROPERTY_DECIMALS, PROPERTY_ID_DECIMALS },
+        { PROPERTY_REFVALUE, PROPERTY_ID_REFVALUE },
+        { PROPERTY_STRICTFORMAT, PROPERTY_ID_STRICTFORMAT },
+        { PROPERTY_DATASOURCE, PROPERTY_ID_DATASOURCE },
+        { PROPERTY_ALLOWADDITIONS, PROPERTY_ID_ALLOWADDITIONS },
+        { PROPERTY_ALLOWEDITS, PROPERTY_ID_ALLOWEDITS },
+        { PROPERTY_ALLOWDELETIONS, PROPERTY_ID_ALLOWDELETIONS },
+        { PROPERTY_MASTERFIELDS, PROPERTY_ID_MASTERFIELDS },
+        { PROPERTY_ISPASSTHROUGH, PROPERTY_ID_ISPASSTHROUGH },
+        { PROPERTY_QUERY, PROPERTY_ID_QUERY },
+        { PROPERTY_LITERALMASK, PROPERTY_ID_LITERALMASK },
+        { PROPERTY_SHOWTHOUSANDSEP, PROPERTY_ID_SHOWTHOUSANDSEP },
+        { PROPERTY_CURRENCYSYMBOL, PROPERTY_ID_CURRENCYSYMBOL },
+        { PROPERTY_DATEFORMAT, PROPERTY_ID_DATEFORMAT },
+        { PROPERTY_DATEMIN, PROPERTY_ID_DATEMIN },
+        { PROPERTY_DATEMAX, PROPERTY_ID_DATEMAX },
+        { PROPERTY_DATE_SHOW_CENTURY, PROPERTY_ID_DATE_SHOW_CENTURY },
+        { PROPERTY_TIMEFORMAT, PROPERTY_ID_TIMEFORMAT },
+        { PROPERTY_TIMEMIN, PROPERTY_ID_TIMEMIN },
+        { PROPERTY_TIMEMAX, PROPERTY_ID_TIMEMAX },
+        { PROPERTY_LINECOUNT, PROPERTY_ID_LINECOUNT },
+        { PROPERTY_BOUNDCOLUMN, PROPERTY_ID_BOUNDCOLUMN },
+        { PROPERTY_HASNAVIGATION, PROPERTY_ID_HASNAVIGATION },
+        { PROPERTY_FONT, PROPERTY_ID_FONT },
+        { PROPERTY_BACKGROUNDCOLOR, PROPERTY_ID_BACKGROUNDCOLOR },
+        { PROPERTY_FILLCOLOR, PROPERTY_ID_FILLCOLOR },
+        { PROPERTY_TEXTCOLOR, PROPERTY_ID_TEXTCOLOR },
+        { PROPERTY_LINECOLOR, PROPERTY_ID_LINECOLOR },
+        { PROPERTY_BORDER, PROPERTY_ID_BORDER },
+        { PROPERTY_DROPDOWN, PROPERTY_ID_DROPDOWN },
+        { PROPERTY_HSCROLL, PROPERTY_ID_HSCROLL },
+        { PROPERTY_VSCROLL, PROPERTY_ID_VSCROLL },
+        { PROPERTY_TABSTOP, PROPERTY_ID_TABSTOP },
+        { PROPERTY_AUTOCOMPLETE, PROPERTY_ID_AUTOCOMPLETE },
+        { PROPERTY_HARDLINEBREAKS, PROPERTY_ID_HARDLINEBREAKS },
+        { PROPERTY_PRINTABLE, PROPERTY_ID_PRINTABLE },
+        { PROPERTY_ECHO_CHAR, PROPERTY_ID_ECHO_CHAR },
+        { PROPERTY_ROWHEIGHT, PROPERTY_ID_ROWHEIGHT },
+        { PROPERTY_HELPTEXT, PROPERTY_ID_HELPTEXT },
+        { PROPERTY_FONT_NAME, PROPERTY_ID_FONT_NAME },
+        { PROPERTY_FONT_STYLENAME, PROPERTY_ID_FONT_STYLENAME },
+        { PROPERTY_FONT_FAMILY, PROPERTY_ID_FONT_FAMILY },
+        { PROPERTY_FONT_CHARSET, PROPERTY_ID_FONT_CHARSET },
+        { PROPERTY_FONT_HEIGHT, PROPERTY_ID_FONT_HEIGHT },
+        { PROPERTY_FONT_WEIGHT, PROPERTY_ID_FONT_WEIGHT },
+        { PROPERTY_FONT_SLANT, PROPERTY_ID_FONT_SLANT },
+        { PROPERTY_FONT_UNDERLINE, PROPERTY_ID_FONT_UNDERLINE },
+        { PROPERTY_FONT_WORDLINEMODE, PROPERTY_ID_FONT_WORDLINEMODE },
+        { PROPERTY_FONT_STRIKEOUT, PROPERTY_ID_FONT_STRIKEOUT },
+        { PROPERTY_TEXTLINECOLOR, PROPERTY_ID_TEXTLINECOLOR },
+        { PROPERTY_FONTEMPHASISMARK, PROPERTY_ID_FONTEMPHASISMARK },
+        { PROPERTY_FONTRELIEF, PROPERTY_ID_FONTRELIEF },
+        { PROPERTY_HELPURL, PROPERTY_ID_HELPURL },
+        { PROPERTY_RECORDMARKER, PROPERTY_ID_RECORDMARKER },
+        { PROPERTY_BOUNDFIELD, PROPERTY_ID_BOUNDFIELD },
+        { PROPERTY_INPUT_REQUIRED, PROPERTY_ID_INPUT_REQUIRED },
+        { PROPERTY_TREATASNUMERIC, PROPERTY_ID_TREATASNUMERIC },
+        { PROPERTY_EFFECTIVE_VALUE, PROPERTY_ID_EFFECTIVE_VALUE },
+        { PROPERTY_EFFECTIVE_DEFAULT, PROPERTY_ID_EFFECTIVE_DEFAULT },
+        { PROPERTY_EFFECTIVE_MIN, PROPERTY_ID_EFFECTIVE_MIN },
+        { PROPERTY_EFFECTIVE_MAX, PROPERTY_ID_EFFECTIVE_MAX },
+        { PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN },
+        { PROPERTY_FILTERPROPOSAL, PROPERTY_ID_FILTERPROPOSAL },
+        { PROPERTY_FIELDSOURCE, PROPERTY_ID_FIELDSOURCE },
+        { PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME },
+        { PROPERTY_CONTROLLABEL, PROPERTY_ID_CONTROLLABEL },
+        { PROPERTY_CURRSYM_POSITION, PROPERTY_ID_CURRSYM_POSITION },
+        { PROPERTY_CURSORCOLOR, PROPERTY_ID_CURSORCOLOR },
+        { PROPERTY_ALWAYSSHOWCURSOR, PROPERTY_ID_ALWAYSSHOWCURSOR },
+        { PROPERTY_DISPLAYSYNCHRON, PROPERTY_ID_DISPLAYSYNCHRON },
+        { PROPERTY_ISMODIFIED, PROPERTY_ID_ISMODIFIED },
+        { PROPERTY_ISNEW, PROPERTY_ID_ISNEW },
+        { PROPERTY_PRIVILEGES, PROPERTY_ID_PRIVILEGES },
+        { PROPERTY_DETAILFIELDS, PROPERTY_ID_DETAILFIELDS },
+        { PROPERTY_COMMAND, PROPERTY_ID_COMMAND },
+        { PROPERTY_COMMANDTYPE, PROPERTY_ID_COMMANDTYPE },
+        { PROPERTY_RESULTSET_CONCURRENCY, PROPERTY_ID_RESULTSET_CONCURRENCY },
+        { PROPERTY_INSERTONLY, PROPERTY_ID_INSERTONLY },
+        { PROPERTY_RESULTSET_TYPE, PROPERTY_ID_RESULTSET_TYPE },
+        { PROPERTY_ESCAPE_PROCESSING, PROPERTY_ID_ESCAPE_PROCESSING },
+        { PROPERTY_APPLYFILTER, PROPERTY_ID_APPLYFILTER },
+        { PROPERTY_ISNULLABLE, PROPERTY_ID_ISNULLABLE },
+        { PROPERTY_ACTIVECOMMAND, PROPERTY_ID_ACTIVECOMMAND },
+        { PROPERTY_ISCURRENCY, PROPERTY_ID_ISCURRENCY },
+        { PROPERTY_URL, PROPERTY_ID_URL },
+        { PROPERTY_TITLE, PROPERTY_ID_TITLE },
+        { PROPERTY_ACTIVE_CONNECTION, PROPERTY_ID_ACTIVE_CONNECTION },
+        { PROPERTY_SCALE, PROPERTY_ID_SCALE },
+        { PROPERTY_SORT, PROPERTY_ID_SORT },
+        { PROPERTY_PERSISTENCE_MAXTEXTLENGTH, 
PROPERTY_ID_PERSISTENCE_MAXTEXTLENGTH },
+        { PROPERTY_SCROLL_VALUE, PROPERTY_ID_SCROLL_VALUE },
+        { PROPERTY_SPIN_VALUE, PROPERTY_ID_SPIN_VALUE },
+        { PROPERTY_DEFAULT_SCROLL_VALUE, PROPERTY_ID_DEFAULT_SCROLL_VALUE },
+        { PROPERTY_DEFAULT_SPIN_VALUE, PROPERTY_ID_DEFAULT_SPIN_VALUE },
+        { PROPERTY_WRITING_MODE , PROPERTY_ID_WRITING_MODE  },
+        { PROPERTY_CONTEXT_WRITING_MODE , PROPERTY_ID_CONTEXT_WRITING_MODE  },
+        { PROPERTY_GENERATEVBAEVENTS , PROPERTY_ID_GENERATEVBAEVENTS  }
     });
 }
 
diff --git a/forms/source/richtext/richtextmodel.cxx 
b/forms/source/richtext/richtextmodel.cxx
index 1029ce9a7352..2dcfd7a18587 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -279,7 +279,12 @@ namespace frm
         );
     }
 
-    IMPLEMENT_DEFAULT_CLONING( ORichTextModel )
+    css::uno::Reference< css::util::XCloneable > SAL_CALL 
ORichTextModel::createClone()
+{
+    rtl::Reference<ORichTextModel> pClone = new ORichTextModel(this, 
getContext());
+    pClone->clonedFrom(this);
+    return pClone;
+}
 
 
     void SAL_CALL ORichTextModel::disposing()
diff --git a/forms/source/richtext/richtextmodel.hxx 
b/forms/source/richtext/richtextmodel.hxx
index c4f73a1a37c6..dfb1093904c8 100644
--- a/forms/source/richtext/richtextmodel.hxx
+++ b/forms/source/richtext/richtextmodel.hxx
@@ -53,7 +53,14 @@ namespace frm
             ,public ORichTextModel_BASE
     {
     public:
-        DECLARE_DEFAULT_LEAF_XTOR( ORichTextModel );
+        ORichTextModel(
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        ORichTextModel(
+            const ORichTextModel* _pOriginal,
+            const css::uno::Reference< css::uno::XComponentContext>& _rxFactory
+        );
+        virtual ~ORichTextModel() override;
 
     private:
         // <properties>
diff --git a/forms/source/solar/component/navbarcontrol.cxx 
b/forms/source/solar/component/navbarcontrol.cxx
index af8c6d561d55..ce70d2336c22 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -48,13 +48,6 @@ namespace frm
     using namespace ::com::sun::star::graphic;
     namespace FormFeature = ::com::sun::star::form::runtime::FormFeature;
 
-#define FORWARD_TO_PEER_1( unoInterface, method, param1 )   \
-    Reference< unoInterface > xTypedPeer( getPeer(), UNO_QUERY );   \
-    if ( xTypedPeer.is() )  \
-    {   \
-        xTypedPeer->method( param1 );  \
-    }
-
     ONavigationBarControl::ONavigationBarControl( const Reference< 
XComponentContext >& _rxORB)
         : m_xContext(_rxORB)
     {
@@ -174,20 +167,32 @@ namespace frm
 
     void SAL_CALL ONavigationBarControl::registerDispatchProviderInterceptor( 
const Reference< XDispatchProviderInterceptor >& _rxInterceptor )
     {
-        FORWARD_TO_PEER_1( XDispatchProviderInterception, 
registerDispatchProviderInterceptor, _rxInterceptor );
+        Reference< XDispatchProviderInterception > xTypedPeer(getPeer(), 
UNO_QUERY);
+        if (xTypedPeer.is())
+        {
+            xTypedPeer->registerDispatchProviderInterceptor(_rxInterceptor);
+        }
     }
 
 
     void SAL_CALL ONavigationBarControl::releaseDispatchProviderInterceptor( 
const Reference< XDispatchProviderInterceptor >& _rxInterceptor )
     {
-        FORWARD_TO_PEER_1( XDispatchProviderInterception, 
releaseDispatchProviderInterceptor, _rxInterceptor );
+        Reference< XDispatchProviderInterception > xTypedPeer(getPeer(), 
UNO_QUERY);
+        if (xTypedPeer.is())
+        {
+            xTypedPeer->registerDispatchProviderInterceptor(_rxInterceptor);
+        }
     }
 
 
     void SAL_CALL ONavigationBarControl::setDesignMode( sal_Bool _bOn )
     {
         UnoControl::setDesignMode( _bOn );
-        FORWARD_TO_PEER_1( XVclWindowPeer, setDesignMode, _bOn );
+        Reference< XVclWindowPeer > xTypedPeer(getPeer(), UNO_QUERY);
+        if (xTypedPeer.is())
+        {
+            xTypedPeer->setDesignMode(_bOn);
+        }
     }
 
 
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index 0f176ddabc8f..b87b33e3a8c1 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -90,9 +90,6 @@ using com::sun::star::xml::dom::events::XEventListener;
 using com::sun::star::xml::dom::events::XEventTarget;
 using com::sun::star::xsd::XDataType;
 
-
-#define EXCEPT(msg) msg,static_cast<XValueBinding*>(this)
-
 #define HANDLE_BindingID 0
 #define HANDLE_BindingExpression 1
 #define HANDLE_Model 2
@@ -437,7 +434,7 @@ bool Binding::getExternalData() const
 void Binding::checkLive()
 {
     if( ! isLive() )
-        throw RuntimeException( EXCEPT("Binding not initialized") );
+        throw RuntimeException("Binding not initialized", 
static_cast<XValueBinding*>(this));
 }
 
 bool Binding::isLive() const
@@ -512,7 +509,7 @@ static void lcl_removeListenerFromNode( const 
Reference<XNode>& xNode,
 void Binding::bind( bool bForceRebind )
 {
     if( ! mxModel.is() )
-        throw RuntimeException( EXCEPT("Binding has no Model") );
+        throw RuntimeException("Binding has no Model", 
static_cast<XValueBinding*>(this));
 
     // bind() will evaluate this binding as follows:
     // 1) evaluate the binding expression
@@ -964,7 +961,7 @@ css::uno::Any Binding::getValue( const css::uno::Type& 
rType )
 
     // second, check for type
     if( ! supportsType( rType ) )
-        throw IncompatibleTypesException( EXCEPT( "type unsupported" ) );
+        throw IncompatibleTypesException("type unsupported", 
static_cast<XValueBinding*>(this));
 
     // return string value (if present; else return empty Any)
     css::uno::Any result;
@@ -984,19 +981,19 @@ void Binding::setValue( const css::uno::Any& aValue )
 
     // check for supported type
     if( ! supportsType( aValue.getValueType() ) )
-        throw IncompatibleTypesException( EXCEPT( "type unsupported" ) );
+        throw IncompatibleTypesException("type unsupported", 
static_cast<XValueBinding*>(this));
 
     if( !maBindingExpression.hasValue() )
-        throw InvalidBindingStateException( EXCEPT( "no suitable node found" ) 
);
+        throw InvalidBindingStateException("no suitable node found", 
static_cast<XValueBinding*>(this));
 
     css::uno::Reference<css::xml::dom::XNode> xNode = 
maBindingExpression.getNode();
     if( !xNode.is() )
-        throw InvalidBindingStateException( EXCEPT( "no suitable node found" ) 
);
+        throw InvalidBindingStateException("no suitable node found", 
static_cast<XValueBinding*>(this));
 
     OUString sValue = Convert::get().toXSD( aValue );
     bool bSuccess = getModelImpl()->setSimpleContent( xNode, sValue );
     if( ! bSuccess )
-        throw InvalidBindingStateException( EXCEPT( "can't set value" ) );
+        throw InvalidBindingStateException("can't set value", 
static_cast<XValueBinding*>(this));
 
 
 }
@@ -1047,7 +1044,7 @@ OUString Binding::getListEntry( sal_Int32 nPosition )
     // check bounds and return proper item
     PathExpression::NodeVector_t aNodes = maBindingExpression.getNodeList();
     if( nPosition < 0 || nPosition >= static_cast<sal_Int32>( aNodes.size() ) )
-        throw IndexOutOfBoundsException( EXCEPT("") );
+        throw IndexOutOfBoundsException("", static_cast<XValueBinding*>(this));
     return lcl_getString( aNodes[ nPosition ] );
 }
 
diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index acaac1bd7ba8..948d526930f8 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -42,8 +42,6 @@ Convert::Convert()
     init();
 }
 
-#define ADD_ENTRY(XCONVERT,TYPE) XCONVERT->maMap[ cppu::UnoType<TYPE>::get() ] 
= Convert_t( &lcl_toXSD_##TYPE, &lcl_toAny_##TYPE )
-
 namespace
 {
 
@@ -54,40 +52,6 @@ namespace
     Any lcl_toAny_OUString( const OUString& rStr )
     { return Any(rStr); }
 
-
-    OUString lcl_toXSD_bool( const Any& rAny )
-    { bool b = false; rAny >>= b; return b ? OUString("true") : 
OUString("false"); }
-
-
-    Any lcl_toAny_bool( const OUString& rStr )
-    {
-        bool b = ( rStr == "true"  ||  rStr == "1" );
-        return makeAny( b );
-    }
-
-
-    OUString lcl_toXSD_double( const Any& rAny )
-    {
-        double f = 0.0;
-        rAny >>= f;
-
-        return std::isfinite( f )
-            ? rtl::math::doubleToUString( f, rtl_math_StringFormat_Automatic,
-                                        rtl_math_DecimalPlaces_Max, '.',
-                                        true )
-            : OUString();
-    }
-
-
-    Any lcl_toAny_double( const OUString& rString )
-    {
-        rtl_math_ConversionStatus eStatus;
-        double f = rtl::math::stringToDouble(
-            rString, '.', ',', &eStatus );
-        return ( eStatus == rtl_math_ConversionStatus_Ok ) ? makeAny( f ) : 
Any();
-    }
-
-
     void lcl_appendInt32ToBuffer( const sal_Int32 _nValue, OUStringBuffer& 
_rBuffer, sal_Int16 _nMinDigits )
     {
         if ( ( _nMinDigits >= 4 ) && ( _nValue < 1000 ) )
@@ -268,9 +232,7 @@ namespace
 
 void Convert::init()
 {
-    ADD_ENTRY( this, OUString );
-    ADD_ENTRY( this, bool );
-    ADD_ENTRY( this, double );
+    maMap[ cppu::UnoType<OUString>::get() ] = Convert_t(&lcl_toXSD_OUString, 
&lcl_toAny_OUString);
     maMap[ cppu::UnoType<css::util::Date>::get() ] = Convert_t( 
&lcl_toXSD_UNODate, &lcl_toAny_UNODate );
     maMap[ cppu::UnoType<css::util::Time>::get() ] = Convert_t( 
&lcl_toXSD_UNOTime, &lcl_toAny_UNOTime );
     maMap[ cppu::UnoType<css::util::DateTime>::get() ] = Convert_t( 
&lcl_toXSD_UNODateTime, &lcl_toAny_UNODateTime );
diff --git a/forms/source/xforms/datatypes.hxx 
b/forms/source/xforms/datatypes.hxx
index 055ca566fe24..bed7f2d3aa3b 100644
--- a/forms/source/xforms/datatypes.hxx
+++ b/forms/source/xforms/datatypes.hxx
@@ -291,44 +291,78 @@ namespace xforms
 
     //=
 
-#define DEFAULT_DECLARE_SUBTYPE( classname, valuetype )         \
-    class classname;                                            \
-    typedef ODerivedDataType< classname, OValueLimitedType< valuetype > > 
classname##_Base;  \
-    class classname : public classname##_Base                   \
-    {                                                           \
-    public:                                                     \
-        explicit classname( const OUString& _rName );           \
-                                                                \
-    protected:                                                  \
-        virtual rtl::Reference<OXSDDataType> createClone(const OUString& 
_rName) const override; \
-        virtual void initializeClone(const OXSDDataType& _rCloneSource) 
override; \
-                                                                \
-        /* OXSDDataType overridables */                         \
-        virtual TranslateId         _validate( const OUString& value ) 
override;  \
-        virtual bool                _getValue( const OUString& value, double& 
fValue ) override;  \
-                                                                \
-        /* OValueLimitedType overridables */                    \
-        virtual OUString     typedValueAsHumanReadableString( const 
css::uno::Any& _rValue ) const override;  \
-        virtual void normalizeValue( const css::uno::Any& _rValue, double& 
_rDoubleValue ) const override; \
-                                                                \
-    private:                                                    \
-        using classname##_Base::initializeTypedClone;          \
+    class ODateType;
+    typedef ODerivedDataType< ODateType, OValueLimitedType< css::util::Date > 
> ODateType_Base;
+    class ODateType : public ODateType_Base
+    {
+    public:
+        explicit ODateType( const OUString& _rName );
+
+    protected:
+        virtual rtl::Reference<OXSDDataType> createClone(const OUString& 
_rName) const override;
+        virtual void initializeClone(const OXSDDataType& _rCloneSource) 
override;
+
+        /* OXSDDataType overridables */
+        virtual TranslateId         _validate( const OUString& value ) 
override;
+        virtual bool                _getValue( const OUString& value, double& 
fValue ) override;
+
+        /* OValueLimitedType overridables */
+        virtual OUString     typedValueAsHumanReadableString( const 
css::uno::Any& _rValue ) const override;
+        virtual void normalizeValue( const css::uno::Any& _rValue, double& 
_rDoubleValue ) const override;
+
+    private:
+        using ODateType_Base::initializeTypedClone;
     };
 
 
-    //= ODateType
+    class OTimeType;
+    typedef ODerivedDataType< OTimeType, OValueLimitedType< css::util::Time > 
> OTimeType_Base;
+    class OTimeType : public OTimeType_Base
+    {
+    public:
+        explicit OTimeType( const OUString& _rName );
+
+    protected:
+        virtual rtl::Reference<OXSDDataType> createClone(const OUString& 
_rName) const override;
+        virtual void initializeClone(const OXSDDataType& _rCloneSource) 
override;
+
+        /* OXSDDataType overridables */
+        virtual TranslateId         _validate( const OUString& value ) 
override;
+        virtual bool                _getValue( const OUString& value, double& 
fValue ) override;
+
+        /* OValueLimitedType overridables */
+        virtual OUString     typedValueAsHumanReadableString( const 
css::uno::Any& _rValue ) const override;
+        virtual void normalizeValue( const css::uno::Any& _rValue, double& 
_rDoubleValue ) const override;
+
+    private:
+        using OTimeType_Base::initializeTypedClone;
+    };
+
 
-    DEFAULT_DECLARE_SUBTYPE( ODateType, css::util::Date )
 
+    class ODateTimeType;
+    typedef ODerivedDataType< OTimeType, OValueLimitedType< 
css::util::DateTime > > ODateTimeType_Base;
+    class ODateTimeType : public ODateTimeType_Base
+    {
+    public:
+        explicit ODateTimeType( const OUString& _rName );
 
-    //= OTimeType
+    protected:
+        virtual rtl::Reference<OXSDDataType> createClone(const OUString& 
_rName) const override;
+        virtual void initializeClone(const OXSDDataType& _rCloneSource) 
override;
 
-    DEFAULT_DECLARE_SUBTYPE( OTimeType, css::util::Time )
+        /* OXSDDataType overridables */
+        virtual TranslateId         _validate( const OUString& value ) 
override;
+        virtual bool                _getValue( const OUString& value, double& 
fValue ) override;
 
+        /* OValueLimitedType overridables */
+        virtual OUString     typedValueAsHumanReadableString( const 
css::uno::Any& _rValue ) const override;
+        virtual void normalizeValue( const css::uno::Any& _rValue, double& 
_rDoubleValue ) const override;
 
-    //= ODateTimeType
+    private:
+        using ODateTimeType_Base::initializeTypedClone;
+    };
 
-    DEFAULT_DECLARE_SUBTYPE( ODateTimeType, css::util::DateTime )
 
     class OShortIntegerType;
     typedef ODerivedDataType< OShortIntegerType, OValueLimitedType< sal_Int16 
> > OShortIntegerType_Base;

Reply via email to