Commits

Anonymous committed e738534

DEV300 masterfix: #i116814,i116838#: fix XCloneable so that tests work again

Comments (0)

Files changed (4)

toolkit/inc/toolkit/controls/controlmodelcontainerbase.hxx

 	::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;

toolkit/inc/toolkit/controls/dialogcontrol.hxx

 						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);
 	

toolkit/source/controls/controlmodelcontainerbase.cxx

 	static Reference< XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
 	return xInfo;
 }
-
+void ControlModelContainerBase::Clone_Impl(ControlModelContainerBase& _rClone) const
+{
+    // clone all children
+	::std::for_each(
+		maModels.begin(), maModels.end(),
+		CloneControlModel( _rClone.maModels )
+	);
+}
 UnoControlModel* ControlModelContainerBase::Clone() const
 {
 	// clone the container itself
 	ControlModelContainerBase* pClone = new ControlModelContainerBase( *this );
-
-	// clone all children
-	::std::for_each(
-		maModels.begin(), maModels.end(),
-		CloneControlModel( pClone->maModels )
-	);
+    Clone_Impl(*pClone);
 
 	return pClone;
 }

toolkit/source/controls/dialogcontrol.cxx

 {
 }
 
+UnoControlModel* UnoControlDialogModel::Clone() const
+{
+	// clone the container itself
+	UnoControlDialogModel* pClone = new UnoControlDialogModel( *this );
+
+	Clone_Impl(*pClone);
+
+	return pClone;
+}
+
 
 ::rtl::OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException)
 {