summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens-Heiner Rechtien [hr] <jens-heiner.rechtien@oracle.com>2011-02-11 18:06:45 +0100
committerJens-Heiner Rechtien [hr] <jens-heiner.rechtien@oracle.com>2011-02-11 18:06:45 +0100
commitce5f1dd187c3a7d8113c7653fa887b98fd50aaf6 (patch)
treeb3b3c031a32d5d5d6e316e723ca7f657472845e2
parent0df020f4b8904219c73eb09278b0f5f9878f8118 (diff)
DEV300 masterfix: #i116814,i116838#: fix XCloneable so that tests work again
Notes
split repo tag: libs-gui_ooo/DEV300_m100
-rw-r--r--toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx1
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx1
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx14
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx10
4 files changed, 20 insertions, 6 deletions
diff --git a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
index d50fecd8a344..2246ec0204b4 100644
--- a/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx
@@ -95,6 +95,7 @@ protected:
::rtl::OUString m_sTooltip;
sal_Int16 m_nTabPageId;
+ void Clone_Impl(ControlModelContainerBase& _rClone) const;
protected:
::com::sun::star::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index a68760715035..1ab0120ec470 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -52,6 +52,7 @@ public:
UnoControlDialogModel( const UnoControlDialogModel& rModel );
~UnoControlDialogModel();
+ UnoControlModel* Clone() const;
// ::com::sun::star::beans::XMultiPropertySet
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 58ca81f74541..940b99bd41c3 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -310,17 +310,19 @@ Reference< XPropertySetInfo > ControlModelContainerBase::getPropertySetInfo( )
static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
return xInfo;
}
-
-UnoControlModel* ControlModelContainerBase::Clone() const
+void ControlModelContainerBase::Clone_Impl(ControlModelContainerBase& _rClone) const
{
- // clone the container itself
- ControlModelContainerBase* pClone = new ControlModelContainerBase( *this );
-
// clone all children
::std::for_each(
maModels.begin(), maModels.end(),
- CloneControlModel( pClone->maModels )
+ CloneControlModel( _rClone.maModels )
);
+}
+UnoControlModel* ControlModelContainerBase::Clone() const
+{
+ // clone the container itself
+ ControlModelContainerBase* pClone = new ControlModelContainerBase( *this );
+ Clone_Impl(*pClone);
return pClone;
}
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 7a7f7444645b..15eeb2aa1939 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -109,6 +109,16 @@ UnoControlDialogModel::~UnoControlDialogModel()
{
}
+UnoControlModel* UnoControlDialogModel::Clone() const
+{
+ // clone the container itself
+ UnoControlDialogModel* pClone = new UnoControlDialogModel( *this );
+
+ Clone_Impl(*pClone);
+
+ return pClone;
+}
+
::rtl::OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException)
{