summaryrefslogtreecommitdiff
path: root/forms/source/component
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-12-02 08:56:36 +0000
committerFrank Schönheit <fs@openoffice.org>2002-12-02 08:56:36 +0000
commitb0c4be14883b4390642c3c60da343d0571ca34e7 (patch)
tree3eb1ff42f79f4f6ad5af7f387195f8abee11cd3f /forms/source/component
parent426af421c326aa4670c92c9559bfed40cffea077 (diff)
#105577# properly (hopefully :) implemented XClonable
Diffstat (limited to 'forms/source/component')
-rw-r--r--forms/source/component/Button.cxx16
-rw-r--r--forms/source/component/Button.hxx10
-rw-r--r--forms/source/component/CheckBox.cxx51
-rw-r--r--forms/source/component/CheckBox.hxx11
-rw-r--r--forms/source/component/Columns.cxx66
-rw-r--r--forms/source/component/Columns.hxx29
-rw-r--r--forms/source/component/ComboBox.cxx33
-rw-r--r--forms/source/component/ComboBox.hxx9
-rw-r--r--forms/source/component/Currency.cxx44
-rw-r--r--forms/source/component/Currency.hxx12
-rw-r--r--forms/source/component/Date.cxx29
-rw-r--r--forms/source/component/Date.hxx9
-rw-r--r--forms/source/component/Edit.cxx41
-rw-r--r--forms/source/component/Edit.hxx9
-rw-r--r--forms/source/component/EditBase.cxx40
-rw-r--r--forms/source/component/EditBase.hxx22
-rw-r--r--forms/source/component/File.cxx21
-rw-r--r--forms/source/component/File.hxx11
-rw-r--r--forms/source/component/FixedText.cxx31
-rw-r--r--forms/source/component/FixedText.hxx15
-rw-r--r--forms/source/component/FormComponent.cxx94
-rw-r--r--forms/source/component/FormattedField.cxx63
-rw-r--r--forms/source/component/FormattedField.hxx12
-rw-r--r--forms/source/component/Grid.cxx74
-rw-r--r--forms/source/component/Grid.hxx13
-rw-r--r--forms/source/component/GroupBox.cxx18
-rw-r--r--forms/source/component/GroupBox.hxx10
-rw-r--r--forms/source/component/Hidden.cxx24
-rw-r--r--forms/source/component/Hidden.hxx9
-rw-r--r--forms/source/component/ImageButton.cxx16
-rw-r--r--forms/source/component/ImageButton.hxx10
-rw-r--r--forms/source/component/ImageControl.cxx52
-rw-r--r--forms/source/component/ImageControl.hxx14
-rw-r--r--forms/source/component/ListBox.cxx21
-rw-r--r--forms/source/component/ListBox.hxx9
-rw-r--r--forms/source/component/Numeric.cxx20
-rw-r--r--forms/source/component/Numeric.hxx10
-rw-r--r--forms/source/component/Pattern.cxx20
-rw-r--r--forms/source/component/Pattern.hxx10
-rw-r--r--forms/source/component/RadioButton.cxx45
-rw-r--r--forms/source/component/RadioButton.hxx9
-rw-r--r--forms/source/component/Time.cxx25
-rw-r--r--forms/source/component/Time.hxx10
43 files changed, 838 insertions, 259 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx
index a92d9c091d8e..188db4d92dcd 100644
--- a/forms/source/component/Button.cxx
+++ b/forms/source/component/Button.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Button.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2002-02-21 08:52:19 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -104,10 +104,17 @@ OButtonModel::OButtonModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OImageModel(_rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_CONTROL_COMMANDBUTTON)
// use the old control name for compytibility reasons
{
- DBG_CTOR(OButtonModel, NULL);
+ DBG_CTOR( OButtonModel, NULL );
m_nClassId = FormComponentType::COMMANDBUTTON;
}
+//------------------------------------------------------------------
+OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OImageModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( OButtonModel, NULL );
+}
+
//------------------------------------------------------------------------------
OButtonModel::~OButtonModel()
{
@@ -143,6 +150,9 @@ void OButtonModel::fillProperties(
return *const_cast<OButtonModel*>(this)->getArrayHelper();
}
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OButtonModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence OButtonModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx
index 0692b3310f33..52b86605cee7 100644
--- a/forms/source/component/Button.hxx
+++ b/forms/source/component/Button.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Button.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 10:56:32 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -98,8 +98,7 @@ class OButtonModel
,public ::comphelper::OAggregationArrayUsageHelper<OButtonModel>
{
public:
- OButtonModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OButtonModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OButtonModel );
// ::com::sun::star::lang::XServiceInfo
IMPLEMENTATION_NAME(OButtonModel);
@@ -119,6 +118,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 8706a3b0d442..439a4015bb42 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CheckBox.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: oj $ $Date: 2002-03-19 13:18:45 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -128,25 +128,48 @@ InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServic
}
//------------------------------------------------------------------
+DBG_NAME( OCheckBoxModel )
+//------------------------------------------------------------------
OCheckBoxModel::OCheckBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_CONTROL_CHECKBOX, sal_False, sal_False)
- // use the old control name for compytibility reasons
- ,OPropertyChangeListener(m_aMutex)
- ,m_bInReset(sal_False)
- ,m_pAggregatePropertyMultiplexer(NULL)
+ :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_CONTROL_CHECKBOX, sal_False, sal_False)
+ // use the old control name for compytibility reasons
+ ,OPropertyChangeListener(m_aMutex)
+ ,m_bInReset(sal_False)
+ ,m_pAggregatePropertyMultiplexer(NULL)
{
+ DBG_CTOR( OCheckBoxModel, NULL );
+ implConstruct();
+
m_nClassId = FormComponentType::CHECKBOX;
m_nDefaultChecked = CB_NOCHECK;
m_sDataFieldConnectivityProperty = PROPERTY_STATE;
+}
- increment(m_refCount);
- if (m_xAggregateSet.is())
+//------------------------------------------------------------------
+OCheckBoxModel::OCheckBoxModel( const OCheckBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OBoundControlModel( _pOriginal, _rxFactory, sal_False, sal_False )
+ ,OPropertyChangeListener( m_aMutex )
+ ,m_bInReset( sal_False )
+ ,m_pAggregatePropertyMultiplexer( NULL )
+{
+ DBG_CTOR( OCheckBoxModel, NULL );
+ implConstruct();
+
+ m_nDefaultChecked = _pOriginal->m_nDefaultChecked;
+ m_sReferenceValue = _pOriginal->m_sReferenceValue;
+}
+
+//------------------------------------------------------------------------------
+void OCheckBoxModel::implConstruct()
+{
+ increment( m_refCount );
+ if ( m_xAggregateSet.is() )
{
- m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer(this, m_xAggregateSet, sal_False);
+ m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, sal_False );
m_pAggregatePropertyMultiplexer->acquire();
- m_pAggregatePropertyMultiplexer->addProperty(PROPERTY_STATE);
+ m_pAggregatePropertyMultiplexer->addProperty( PROPERTY_STATE );
}
- decrement(m_refCount);
+ decrement( m_refCount );
doSetDelegator();
}
@@ -162,9 +185,13 @@ OCheckBoxModel::~OCheckBoxModel()
m_pAggregatePropertyMultiplexer->release();
m_pAggregatePropertyMultiplexer = NULL;
}
+ DBG_DTOR( OCheckBoxModel, NULL );
}
//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OCheckBoxModel )
+
+//------------------------------------------------------------------------------
void SAL_CALL OCheckBoxModel::disposing()
{
if (m_pAggregatePropertyMultiplexer)
diff --git a/forms/source/component/CheckBox.hxx b/forms/source/component/CheckBox.hxx
index c6a274ccdf24..5ca287cc5e07 100644
--- a/forms/source/component/CheckBox.hxx
+++ b/forms/source/component/CheckBox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CheckBox.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: fs $ $Date: 2001-06-21 18:24:00 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,8 +97,7 @@ protected:
virtual ::com::sun::star::uno::Any _getControlValue() const;
public:
- OCheckBoxModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OCheckBoxModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OCheckBoxModel );
// XServiceInfo
IMPLEMENTATION_NAME(OCheckBoxModel);
@@ -142,6 +141,10 @@ protected:
protected:
virtual void _reset();
virtual sal_Bool _commit();
+
+ void implConstruct();
+
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 8c71ff8b19a8..a78ef9365cbf 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Columns.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: fs $ $Date: 2002-10-23 12:47:00 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -280,41 +280,68 @@ Any SAL_CALL OGridColumn::queryAggregation( const Type& _rType ) throw (RuntimeE
DBG_NAME(OGridColumn);
//------------------------------------------------------------------------------
OGridColumn::OGridColumn(const Reference<XMultiServiceFactory>& _rxFactory, const ::rtl::OUString& _sModelName)
- :OGridColumn_BASE(m_aMutex)
- ,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper)
- ,m_aModelName(_sModelName)
- ,m_aHidden( makeAny( sal_False ) )
+ :OGridColumn_BASE(m_aMutex)
+ ,OPropertySetAggregationHelper(OGridColumn_BASE::rBHelper)
+ ,m_aModelName(_sModelName)
+ ,m_aHidden( makeAny( sal_False ) )
{
DBG_CTOR(OGridColumn,NULL);
+
// Anlegen des UnoControlModels
- if (m_aModelName.getLength()) // gibt es ein zu aggregierendes Model
+ if ( m_aModelName.getLength() ) // is there a to-be-aggregated model?
{
- increment(m_refCount);
+ increment( m_refCount );
// Muss im eigenen Block,
// da xAgg vor dem delegator setzen wieder freigesetzt sein mu !
{
- m_xAggregate = Reference<XAggregation> (_rxFactory->createInstance(m_aModelName), UNO_QUERY);
- setAggregation(m_xAggregate);
+ m_xAggregate = Reference< XAggregation >( _rxFactory->createInstance( m_aModelName ), UNO_QUERY );
+ setAggregation( m_xAggregate );
}
if (m_xAggregate.is())
- {
- m_xAggregate->setDelegator(static_cast< ::cppu::OWeakObject* >(this));
+ { // don't omit this brackets - they ensure that the following temporary is properly deleted
+ m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) );
}
// Refcount wieder bei NULL
- decrement(m_refCount);
+ decrement( m_refCount );
}
if ( m_xAggregateSet.is() )
{
- Reference<XPropertySetInfo> xPropInfo = m_xAggregateSet->getPropertySetInfo();
- if ( xPropInfo.is() && xPropInfo->hasPropertyByName(PROPERTY_TRISTATE) )
- m_xAggregateSet->setPropertyValue(PROPERTY_TRISTATE, makeAny(sal_True) );
+ Reference< XPropertySetInfo > xPropInfo = m_xAggregateSet->getPropertySetInfo();
+ if ( xPropInfo.is() && xPropInfo->hasPropertyByName( PROPERTY_TRISTATE ) )
+ m_xAggregateSet->setPropertyValue( PROPERTY_TRISTATE, makeAny( sal_True ) );
}
+}
- m_aHidden <<= (sal_Bool)sal_False;
+//------------------------------------------------------------------------------
+OGridColumn::OGridColumn( const OGridColumn* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory )
+ :OGridColumn_BASE( m_aMutex )
+ ,OPropertySetAggregationHelper( OGridColumn_BASE::rBHelper )
+{
+ DBG_CTOR(OGridColumn,NULL);
+
+ m_aWidth = _pOriginal->m_aWidth;
+ m_aAlign = _pOriginal->m_aAlign;
+ m_aHidden = _pOriginal->m_aHidden;
+ m_aModelName = _pOriginal->m_aModelName;
+ m_aLabel = _pOriginal->m_aLabel;
+
+ increment( m_refCount );
+ {
+ {
+ m_xAggregate = createAggregateClone( _pOriginal );
+ setAggregation( m_xAggregate );
+ }
+
+ if ( m_xAggregate.is() )
+ { // don't omit this brackets - they ensure that the following temporary is properly deleted
+ m_xAggregate->setDelegator( static_cast< ::cppu::OWeakObject* >( this ) );
+ }
+ }
+ decrement( m_refCount );
}
//------------------------------------------------------------------------------
@@ -332,9 +359,14 @@ OGridColumn::~OGridColumn()
InterfaceRef xIface;
m_xAggregate->setDelegator(xIface);
}
+
DBG_DTOR(OGridColumn,NULL);
}
+// XCloneable
+//------------------------------------------------------------------------------
+//IMPLEMENT_DEFAULT_CLONING( OGridColumn )
+
// XChild
//------------------------------------------------------------------------------
void SAL_CALL OGridColumn::setParent(const InterfaceRef& Parent) throw(NoSupportException, RuntimeException)
diff --git a/forms/source/component/Columns.hxx b/forms/source/component/Columns.hxx
index 175b0ed2964d..4a2ff121afa1 100644
--- a/forms/source/component/Columns.hxx
+++ b/forms/source/component/Columns.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Columns.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 11:09:51 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,6 +94,9 @@
#ifndef _COMPHELPER_BROADCASTHELPER_HXX_
#include <comphelper/broadcasthelper.hxx>
#endif
+#ifndef FORMS_COMPONENT_CLONEABLE_HXX
+#include "cloneable.hxx"
+#endif
using namespace comphelper;
@@ -107,28 +110,30 @@ namespace frm
//==================================================================
typedef ::cppu::WeakAggComponentImplHelper2< ::com::sun::star::container::XChild,
::com::sun::star::lang::XUnoTunnel > OGridColumn_BASE;
-class OGridColumn : public ::comphelper::OBaseMutex
+class OGridColumn :public ::comphelper::OBaseMutex
,public OGridColumn_BASE
,public OPropertySetAggregationHelper
+ ,public OCloneableAggregation
{
protected:
// [properties]
- ::com::sun::star::uno::Any m_aWidth; // Spaltenbreite
- ::com::sun::star::uno::Any m_aAlign;
- ::com::sun::star::uno::Any m_aHidden; // Spalte ist versteckt ?
+ ::com::sun::star::uno::Any m_aWidth; // column width
+ ::com::sun::star::uno::Any m_aAlign; // column alignment
+ ::com::sun::star::uno::Any m_aHidden; // column hidden?
// [properties]
- InterfaceRef m_xParent;
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate;
- ::rtl::OUString m_aModelName;
+ InterfaceRef m_xParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation>
+ m_xAggregate;
+ ::rtl::OUString m_aModelName;
// [properties]
- ::rtl::OUString m_aLabel; // Name der Spalte
-
+ ::rtl::OUString m_aLabel; // Name der Spalte
// [properties]
public:
OGridColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory, const ::rtl::OUString& _sModelName = ::rtl::OUString());
+ OGridColumn(const OGridColumn* _pOriginal, const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory );
virtual ~OGridColumn();
// UNO Anbindung
@@ -176,6 +181,8 @@ public:
protected:
static void clearAggregateProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps, sal_Bool bAllowDropDown);
static void setOwnProperties(::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property>& seqProps);
+
+ DECLARE_XCLONEABLE();
};
#define DECL_COLUMN(ClassName) \
diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx
index eb0bb18b096d..beb5e1069ee3 100644
--- a/forms/source/component/ComboBox.cxx
+++ b/forms/source/component/ComboBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ComboBox.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: oj $ $Date: 2002-10-07 13:08:07 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -188,6 +188,8 @@ Any SAL_CALL OComboBoxModel::queryAggregation(const Type& _rType) throw (Runtime
}
//------------------------------------------------------------------
+DBG_NAME( OComboBoxModel )
+//------------------------------------------------------------------
OComboBoxModel::OComboBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_COMBOBOX, FRM_CONTROL_COMBOBOX)
// use the old control name for compytibility reasons
@@ -199,6 +201,8 @@ OComboBoxModel::OComboBoxModel(const Reference<XMultiServiceFactory>& _rxFactory
,m_nFormatKey(0)
,m_nFieldType(DataType::OTHER)
{
+ DBG_CTOR( OComboBoxModel, NULL );
+
m_nClassId = FormComponentType::COMBOBOX;
m_sDataFieldConnectivityProperty = PROPERTY_TEXT;
if (OComboBoxModel::nTextHandle == -1)
@@ -206,6 +210,23 @@ OComboBoxModel::OComboBoxModel(const Reference<XMultiServiceFactory>& _rxFactory
}
//------------------------------------------------------------------
+OComboBoxModel::OComboBoxModel( const OComboBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OBoundControlModel( _pOriginal, _rxFactory )
+ ,OErrorBroadcaster( OComponentHelper::rBHelper )
+ ,m_aNullDate(DBTypeConversion::getStandardDate())
+ ,m_nKeyType(NumberFormat::UNDEFINED)
+ ,m_nFormatKey(0)
+ ,m_nFieldType(DataType::OTHER)
+{
+ DBG_CTOR( OComboBoxModel, NULL );
+
+ m_eListSourceType = _pOriginal->m_eListSourceType;
+ m_bEmptyIsNull = _pOriginal->m_bEmptyIsNull;
+ m_aListSource = _pOriginal->m_aListSource;
+ m_aDefaultText = _pOriginal->m_aDefaultText;
+}
+
+//------------------------------------------------------------------
OComboBoxModel::~OComboBoxModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -213,8 +234,14 @@ OComboBoxModel::~OComboBoxModel()
acquire();
dispose();
}
+
+ DBG_DTOR( OComboBoxModel, NULL );
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OComboBoxModel )
+
//------------------------------------------------------------------------------
void OComboBoxModel::disposing()
{
@@ -469,8 +496,10 @@ void SAL_CALL OComboBoxModel::read(const Reference<stario::XObjectInputStream>&
// Nach dem Lesen die Defaultwerte anzeigen
if (m_aControlSource.getLength())
+ {
// (not if we don't have a control source - the "State" property acts like it is persistent, then
_reset();
+ }
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/ComboBox.hxx b/forms/source/component/ComboBox.hxx
index c54905e6ff03..91bcbe487d2d 100644
--- a/forms/source/component/ComboBox.hxx
+++ b/forms/source/component/ComboBox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ComboBox.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-08-28 14:31:10 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -140,8 +140,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- OComboBoxModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OComboBoxModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OComboBoxModel );
virtual void SAL_CALL disposing();
@@ -193,6 +192,8 @@ public:
protected:
void loadData();
+
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx
index 11e221f53985..304ca1a94d3d 100644
--- a/forms/source/component/Currency.cxx
+++ b/forms/source/component/Currency.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Currency.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -142,15 +142,8 @@ Sequence<Type> OCurrencyModel::_getTypes()
}
//------------------------------------------------------------------
-OCurrencyModel::OCurrencyModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_CONTROL_CURRENCYFIELD)
- // use the old control name for compytibility reasons
+void OCurrencyModel::implConstruct()
{
- m_nClassId = FormComponentType::CURRENCYFIELD;
- m_sDataFieldConnectivityProperty = PROPERTY_VALUE;
- if (OCurrencyModel::nValueHandle == -1)
- OCurrencyModel::nValueHandle = getOriginalHandle(PROPERTY_ID_VALUE);
-
if (m_xAggregateSet.is())
{
try
@@ -187,15 +180,46 @@ OCurrencyModel::OCurrencyModel(const Reference<XMultiServiceFactory>& _rxFactory
}
catch(Exception&)
{
+ DBG_ERROR( "OCurrencyModel::implConstruct: caught an exception while initializing the aggregate!" );
}
}
}
//------------------------------------------------------------------
+DBG_NAME( OCurrencyModel )
+//------------------------------------------------------------------
+OCurrencyModel::OCurrencyModel(const Reference<XMultiServiceFactory>& _rxFactory)
+ :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_CURRENCYFIELD, FRM_CONTROL_CURRENCYFIELD)
+ // use the old control name for compytibility reasons
+{
+ DBG_CTOR( OCurrencyModel, NULL );
+
+ m_nClassId = FormComponentType::CURRENCYFIELD;
+ m_sDataFieldConnectivityProperty = PROPERTY_VALUE;
+ if (OCurrencyModel::nValueHandle == -1)
+ OCurrencyModel::nValueHandle = getOriginalHandle(PROPERTY_ID_VALUE);
+
+ implConstruct();
+}
+
+//------------------------------------------------------------------
+OCurrencyModel::OCurrencyModel( const OCurrencyModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( OCurrencyModel, NULL );
+ implConstruct();
+}
+
+//------------------------------------------------------------------
OCurrencyModel::~OCurrencyModel()
{
+ DBG_DTOR( OCurrencyModel, NULL );
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OCurrencyModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL OCurrencyModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/Currency.hxx b/forms/source/component/Currency.hxx
index 7ae2aa3aa26e..d0d12b78c75b 100644
--- a/forms/source/component/Currency.hxx
+++ b/forms/source/component/Currency.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Currency.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 11:24:43 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:28 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,8 +87,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- OCurrencyModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OCurrencyModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OCurrencyModel );
// starform::XBoundComponent
virtual sal_Bool _commit();
@@ -113,6 +112,11 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
+
+ void implConstruct();
};
//==================================================================
diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx
index 189610e4a3e4..ae5c2cbbcbc3 100644
--- a/forms/source/component/Date.cxx
+++ b/forms/source/component/Date.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Date.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -142,11 +142,15 @@ Sequence<Type> ODateModel::_getTypes()
}
//------------------------------------------------------------------
+DBG_NAME( ODateModel )
+//------------------------------------------------------------------
ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_DATEFIELD, FRM_CONTROL_DATEFIELD )
// use the old control name for compytibility reasons
,OLimitedFormats(_rxFactory, FormComponentType::DATEFIELD)
{
+ DBG_CTOR( ODateModel, NULL );
+
m_nClassId = FormComponentType::DATEFIELD;
m_sDataFieldConnectivityProperty = PROPERTY_DATE;
if (ODateModel::nDateHandle == -1)
@@ -155,6 +159,27 @@ ODateModel::ODateModel(const Reference<XMultiServiceFactory>& _rxFactory)
setAggregateSet(m_xAggregateFastSet, getOriginalHandle(PROPERTY_ID_DATEFORMAT));
}
+//------------------------------------------------------------------------------
+ODateModel::ODateModel( const ODateModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+ ,OLimitedFormats( _rxFactory, FormComponentType::DATEFIELD )
+{
+ DBG_CTOR( ODateModel, NULL );
+
+ setAggregateSet( m_xAggregateFastSet, getOriginalHandle( PROPERTY_ID_DATEFORMAT ) );
+}
+
+//------------------------------------------------------------------------------
+ODateModel::~ODateModel( )
+{
+ setAggregateSet(Reference< XFastPropertySet >(), -1);
+ DBG_DTOR( ODateModel, NULL );
+}
+
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( ODateModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL ODateModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/Date.hxx b/forms/source/component/Date.hxx
index 5cdb1a8e8bdd..d3059f55efc9 100644
--- a/forms/source/component/Date.hxx
+++ b/forms/source/component/Date.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Date.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 12:29:28 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- ODateModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
+ DECLARE_DEFAULT_LEAF_XTOR( ODateModel );
// starform::XBoundComponent
virtual sal_Bool _commit();
@@ -126,6 +126,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx
index 76aa6af4a6cb..2754044db9fe 100644
--- a/forms/source/component/Edit.cxx
+++ b/forms/source/component/Edit.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Edit.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: oj $ $Date: 2002-10-18 12:24:00 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -357,13 +357,13 @@ DBG_NAME(OEditModel);
OEditModel::OEditModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OEditBaseModel( _rxFactory, VCL_CONTROLMODEL_EDIT, FRM_CONTROL_EDIT )
// use the old control name for compytibility reasons
- ,m_nMaxLen(0)
- ,m_nKeyType(NumberFormat::UNDEFINED)
- ,m_aNullDate(DBTypeConversion::getStandardDate())
- ,m_nFormatKey(0)
- ,m_nFieldType(DataType::OTHER)
- ,m_bWritingFormattedFake(sal_False)
- ,m_bNumericField(sal_False)
+ ,m_nMaxLen(0)
+ ,m_nKeyType(NumberFormat::UNDEFINED)
+ ,m_aNullDate(DBTypeConversion::getStandardDate())
+ ,m_nFormatKey(0)
+ ,m_nFieldType(DataType::OTHER)
+ ,m_bWritingFormattedFake(sal_False)
+ ,m_bNumericField(sal_False)
{
DBG_CTOR(OEditModel,NULL);
@@ -374,6 +374,26 @@ OEditModel::OEditModel(const Reference<XMultiServiceFactory>& _rxFactory)
}
//------------------------------------------------------------------
+OEditModel::OEditModel( const OEditModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+ ,m_nMaxLen(0)
+ ,m_nKeyType(NumberFormat::UNDEFINED)
+ ,m_aNullDate(DBTypeConversion::getStandardDate())
+ ,m_nFormatKey(0)
+ ,m_nFieldType(DataType::OTHER)
+ ,m_bWritingFormattedFake(sal_False)
+ ,m_bNumericField(sal_False)
+{
+ DBG_CTOR( OEditModel, NULL );
+
+ // Note that most of the properties are not clone from the original object:
+ // Things as the format key, it's type, and such, depend on the field being part of a loaded form
+ // (they're initialized in _loaded). Even if the original object _is_ part of such a form, we ourself
+ // certainly aren't, so these members are defaulted. If we're inserted into a form which is already loaded,
+ // they will be set to new values, anyway ....
+}
+
+//------------------------------------------------------------------
OEditModel::~OEditModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -386,6 +406,9 @@ OEditModel::~OEditModel()
}
//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OEditModel )
+
+//------------------------------------------------------------------------------
void OEditModel::disposing()
{
OEditBaseModel::disposing();
diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx
index 4d38f10e2d0c..8b6d6ac98143 100644
--- a/forms/source/component/Edit.hxx
+++ b/forms/source/component/Edit.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Edit.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 12:45:09 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:29 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -99,8 +99,7 @@ protected:
virtual void _onValueChanged();
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
- OEditModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OEditModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OEditModel );
void enableFormattedWriteFake() { m_bWritingFormattedFake = sal_True; }
void disableFormattedWriteFake() { m_bWritingFormattedFake = sal_False; }
@@ -145,6 +144,8 @@ public:
protected:
virtual sal_Int16 getPersistenceFlags() const;
+
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/EditBase.cxx b/forms/source/component/EditBase.cxx
index daba9fd97ff0..73bb948afd2b 100644
--- a/forms/source/component/EditBase.cxx
+++ b/forms/source/component/EditBase.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: EditBase.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 13:02:27 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -103,17 +103,35 @@ const sal_uInt16 DEFAULT_LONG = 0x0001;
const sal_uInt16 DEFAULT_DOUBLE = 0x0002;
const sal_uInt16 FILTERPROPOSAL = 0x0004;
+DBG_NAME( OEditBaseModel )
//------------------------------------------------------------------
-OEditBaseModel::OEditBaseModel(
- const Reference<XMultiServiceFactory>& _rxFactory,
- const ::rtl::OUString& rUnoControlModelName,
- const ::rtl::OUString& rDefault,
- const sal_Bool _bSetDelegator)
- :OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSetDelegator )
- ,m_bFilterProposal(sal_False)
- ,m_bEmptyIsNull(sal_True)
+OEditBaseModel::OEditBaseModel( const Reference< XMultiServiceFactory >& _rxFactory, const ::rtl::OUString& rUnoControlModelName,
+ const ::rtl::OUString& rDefault, const sal_Bool _bSetDelegator )
+ :OBoundControlModel( _rxFactory, rUnoControlModelName, rDefault, sal_True, _bSetDelegator )
+ ,m_bFilterProposal(sal_False)
+ ,m_bEmptyIsNull(sal_True)
+ ,m_nLastReadVersion(0)
+{
+ DBG_CTOR( OEditBaseModel, NULL );
+}
+
+//------------------------------------------------------------------
+OEditBaseModel::OEditBaseModel( const OEditBaseModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory, const sal_Bool _bSetDelegator )
+ :OBoundControlModel( _pOriginal, _rxFactory, sal_True, _bSetDelegator )
,m_nLastReadVersion(0)
{
+ DBG_CTOR( OEditBaseModel, NULL );
+
+ m_bFilterProposal = _pOriginal->m_bFilterProposal;
+ m_bEmptyIsNull = _pOriginal->m_bEmptyIsNull;
+ m_aDefault = _pOriginal->m_aDefault;
+ m_aDefaultText = _pOriginal->m_aDefaultText;
+}
+
+//------------------------------------------------------------------
+OEditBaseModel::~OEditBaseModel( )
+{
+ DBG_DTOR( OEditBaseModel, NULL );
}
// XPersist
@@ -172,7 +190,7 @@ void OEditBaseModel::write(const Reference<XObjectOutputStream>& _rxOutStream) t
//------------------------------------------------------------------------------
sal_Int16 OEditBaseModel::getPersistenceFlags() const
{
- return PF_HANDLE_COMMON_PROPS;
+ return (sal_Int16)PF_HANDLE_COMMON_PROPS;
}
//------------------------------------------------------------------------------
diff --git a/forms/source/component/EditBase.hxx b/forms/source/component/EditBase.hxx
index 333171934757..cd0bb2cf1409 100644
--- a/forms/source/component/EditBase.hxx
+++ b/forms/source/component/EditBase.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: EditBase.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 11:22:55 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,33 +123,29 @@ class OEditBaseModel : public OBoundControlModel
protected:
// [properties] fuer all Editierfelder
- ::com::sun::star::uno::Any m_aDefault;
- ::rtl::OUString m_aDefaultText; // Defaultwert
- sal_Bool m_bEmptyIsNull : 1; // LeerString ist NULL
+ ::com::sun::star::uno::Any m_aDefault;
+ ::rtl::OUString m_aDefaultText; // default value
+ sal_Bool m_bEmptyIsNull : 1; // empty string will be interepreted as NULL when committing
sal_Bool m_bFilterProposal : 1; // use a list of possible value in filtermode
// [properties]
sal_Int16 getLastReadVersion() const { return m_nLastReadVersion; }
public:
- OEditBaseModel(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
- const ::rtl::OUString& rUnoControlModelName,
- const ::rtl::OUString& rDefault,
- const sal_Bool _bSetDelegator = sal_True);
+ DECLARE_DEFAULT_XTOR( OEditBaseModel );
-// ::com::sun::star::io::XPersistObject
+ // XPersistObject
virtual void SAL_CALL write(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectOutputStream>& _rxOutStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL read(const ::com::sun::star::uno::Reference< ::com::sun::star::io::XObjectInputStream>& _rxInStream) throw ( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
-// ::com::sun::star::beans::XPropertySet
+ // XPropertySet
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
virtual sal_Bool SAL_CALL convertFastPropertyValue(::com::sun::star::uno::Any& rConvertedValue, ::com::sun::star::uno::Any& rOldValue,
sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue )
throw(::com::sun::star::lang::IllegalArgumentException);
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception);
-// ::com::sun::star::beans::XPropertyState
+ // XPropertyState
virtual ::com::sun::star::beans::PropertyState getPropertyStateByHandle(sal_Int32 nHandle);
virtual void setPropertyToDefaultByHandle(sal_Int32 nHandle);
virtual ::com::sun::star::uno::Any getPropertyDefaultByHandle( sal_Int32 nHandle ) const;
diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx
index 5e6d6032cd8b..74269f647292 100644
--- a/forms/source/component/File.cxx
+++ b/forms/source/component/File.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: File.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 13:24:24 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -134,14 +134,27 @@ StringSequence OFileControlModel::getSupportedServiceNames() throw(RuntimeExcep
}
//------------------------------------------------------------------
+DBG_NAME( OFileControlModel )
+//------------------------------------------------------------------
OFileControlModel::OFileControlModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OControlModel(_rxFactory, VCL_CONTROLMODEL_FILECONTROL)
,m_aResetListeners(m_aMutex)
{
+ DBG_CTOR( OFileControlModel, NULL );
m_nClassId = FormComponentType::FILECONTROL;
}
//------------------------------------------------------------------
+OFileControlModel::OFileControlModel( const OFileControlModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OControlModel( _pOriginal, _rxFactory )
+ ,m_aResetListeners( m_aMutex )
+{
+ DBG_CTOR( OFileControlModel, NULL );
+
+ m_sDefaultValue = _pOriginal->m_sDefaultValue;
+}
+
+//------------------------------------------------------------------
OFileControlModel::~OFileControlModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -149,9 +162,13 @@ OFileControlModel::~OFileControlModel()
acquire();
dispose();
}
+ DBG_DTOR( OFileControlModel, NULL );
}
//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OFileControlModel )
+
+//------------------------------------------------------------------------------
Any SAL_CALL OFileControlModel::queryAggregation(const Type& _rType) throw (RuntimeException)
{
Any aReturn = OControlModel::queryAggregation(_rType);
diff --git a/forms/source/component/File.hxx b/forms/source/component/File.hxx
index be28f491022a..ac33e7e66bad 100644
--- a/forms/source/component/File.hxx
+++ b/forms/source/component/File.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: File.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 13:16:48 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,8 +86,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- OFileControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OFileControlModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OFileControlModel );
DECLARE_UNO3_AGG_DEFAULTS(OFileControlModel, OControlModel);
virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
@@ -127,7 +126,9 @@ public:
IMPLEMENT_INFO_SERVICE()
protected:
- void _reset();
+ virtual void _reset();
+
+ DECLARE_XCLONEABLE();
};
//.........................................................................
diff --git a/forms/source/component/FixedText.cxx b/forms/source/component/FixedText.cxx
index b3335da3717f..d32e02c1d2a8 100644
--- a/forms/source/component/FixedText.cxx
+++ b/forms/source/component/FixedText.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FixedText.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2001-04-02 10:28:06 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,21 +97,34 @@ InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServi
return *(new OFixedTextModel(_rxFactory));
}
-//------------------------------------------------------------------------------
-Sequence<Type> OFixedTextModel::_getTypes()
+//------------------------------------------------------------------
+DBG_NAME( OFixedTextModel )
+//------------------------------------------------------------------
+OFixedTextModel::OFixedTextModel( const Reference<XMultiServiceFactory>& _rxFactory )
+ :OControlModel(_rxFactory, VCL_CONTROLMODEL_FIXEDTEXT)
+
{
- static Sequence<Type> aTypes = OControlModel::_getTypes();
- return aTypes;
+ DBG_CTOR( OFixedTextModel, NULL );
+ m_nClassId = FormComponentType::FIXEDTEXT;
}
//------------------------------------------------------------------
-OFixedTextModel::OFixedTextModel(const Reference<XMultiServiceFactory>& _rFactory)
- :OControlModel(_rFactory, VCL_CONTROLMODEL_FIXEDTEXT)
+OFixedTextModel::OFixedTextModel( const OFixedTextModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OControlModel( _pOriginal, _rxFactory )
{
- m_nClassId = FormComponentType::FIXEDTEXT;
+ DBG_CTOR( OFixedTextModel, NULL );
}
+//------------------------------------------------------------------
+OFixedTextModel::~OFixedTextModel( )
+{
+ DBG_DTOR( OFixedTextModel, NULL );
+}
+
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OFixedTextModel )
+
//------------------------------------------------------------------------------
StringSequence SAL_CALL OFixedTextModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
{
diff --git a/forms/source/component/FixedText.hxx b/forms/source/component/FixedText.hxx
index e7cc669966cd..cfec0511bb16 100644
--- a/forms/source/component/FixedText.hxx
+++ b/forms/source/component/FixedText.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FixedText.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-11-23 08:48:15 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,14 +77,8 @@ class OFixedTextModel
:public OControlModel
,public ::comphelper::OAggregationArrayUsageHelper< OFixedTextModel >
{
-protected:
- // UNO Anbindung
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
-
public:
- OFixedTextModel(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rFactory // factory to create the aggregate with
- );
+ DECLARE_DEFAULT_LEAF_XTOR( OFixedTextModel );
// XPropertySetRef
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
@@ -107,6 +101,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//.........................................................................
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index 9064d754b3ef..ad43cdc5fedc 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FormComponent.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: fs $ $Date: 2002-10-02 14:46:57 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:55:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -512,7 +512,6 @@ OControlModel::OControlModel(
const ::rtl::OUString& rDefault, const sal_Bool _bSetDelegator)
:OComponentHelper(m_aMutex)
,OPropertySetAggregationHelper(OComponentHelper::rBHelper)
- ,m_aUnoControlModelTypeName(_rUnoControlModelTypeName)
,m_nTabIndex(FRM_DEFAULT_TABINDEX)
,m_nClassId(FormComponentType::CONTROL)
,m_xServiceFactory(_rxFactory)
@@ -522,8 +521,6 @@ OControlModel::OControlModel(
{
increment(m_refCount);
- // Muss im eigenen Block,
- // da xAgg vor dem delegator setzen wieder freigesetzt sein mu!
{
m_xAggregate = Reference<XAggregation>(_rxFactory->createInstance(_rUnoControlModelTypeName), UNO_QUERY);
setAggregation(m_xAggregate);
@@ -541,6 +538,40 @@ OControlModel::OControlModel(
}
//------------------------------------------------------------------
+OControlModel::OControlModel( const OControlModel* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory, const sal_Bool _bSetDelegator )
+ :OComponentHelper( m_aMutex )
+ ,OPropertySetAggregationHelper( OComponentHelper::rBHelper )
+ ,m_nTabIndex( FRM_DEFAULT_TABINDEX )
+ ,m_nClassId( FormComponentType::CONTROL )
+ ,m_xServiceFactory( _rxFactory )
+{
+ DBG_CTOR( OControlModel, NULL );
+ DBG_ASSERT( _pOriginal, "OControlModel::OControlModel: invalid original!" );
+
+ // copy members
+ m_nTabIndex = _pOriginal->m_nTabIndex;
+ m_nClassId = _pOriginal->m_nClassId;
+
+ // temporarily increment refcount because of temporary references to ourself in the following
+ increment( m_refCount );
+
+ {
+ // transfer the (only, at the very moment!) ref count
+ m_xAggregate = createAggregateClone( _pOriginal );
+
+ // set aggregation (retrieve other direct interfaces of the aggregate)
+ setAggregation( m_xAggregate );
+ }
+
+ // set the delegator, if allowed by our derived class
+ if ( _bSetDelegator )
+ doSetDelegator();
+
+ // decrement ref count
+ decrement( m_refCount );
+}
+
+//------------------------------------------------------------------
OControlModel::~OControlModel()
{
DBG_DTOR(OControlModel, NULL);
@@ -905,25 +936,50 @@ Any SAL_CALL OBoundControlModel::queryAggregation( const Type& _rType ) throw (R
//------------------------------------------------------------------
OBoundControlModel::OBoundControlModel(
- const Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
- const ::rtl::OUString& _rUnoControlModelTypeName,
- const ::rtl::OUString& _rDefault,
- const sal_Bool _bCommitable,
- const sal_Bool _bSetDelegator)
- :OControlModel(_rxFactory, _rUnoControlModelTypeName, _rDefault, _bSetDelegator)
- ,m_aUpdateListeners(m_aMutex)
- ,m_aResetListeners(m_aMutex)
- ,m_bLoaded(sal_False)
- ,m_bRequired(sal_False)
- ,m_bCommitable(_bCommitable)
- ,m_aLabelServiceName(FRM_SUN_COMPONENT_FIXEDTEXT)
- ,m_bResetting(sal_False)
- ,m_bForwardValueChanges(sal_True)
+ const Reference<com::sun::star::lang::XMultiServiceFactory>& _rxFactory,
+ const ::rtl::OUString& _rUnoControlModelTypeName,
+ const ::rtl::OUString& _rDefault,
+ const sal_Bool _bCommitable,
+ const sal_Bool _bSetDelegator)
+ :OControlModel(_rxFactory, _rUnoControlModelTypeName, _rDefault, _bSetDelegator)
+ ,m_aUpdateListeners(m_aMutex)
+ ,m_aResetListeners(m_aMutex)
+ ,m_bLoaded(sal_False)
+ ,m_bRequired(sal_False)
+ ,m_bCommitable(_bCommitable)
+ ,m_aLabelServiceName(FRM_SUN_COMPONENT_FIXEDTEXT)
+ ,m_bResetting(sal_False)
+ ,m_bForwardValueChanges(sal_True)
{
DBG_CTOR(frm_OBoundControlModel, NULL);
}
//------------------------------------------------------------------
+OBoundControlModel::OBoundControlModel(
+ const OBoundControlModel* _pOriginal, const Reference< XMultiServiceFactory>& _rxFactory,
+ const sal_Bool _bCommitable, const sal_Bool _bSetDelegator )
+ :OControlModel( _pOriginal, _rxFactory, _bSetDelegator )
+ ,m_aUpdateListeners( m_aMutex )
+ ,m_aResetListeners( m_aMutex )
+ ,m_bLoaded( sal_False )
+ ,m_bRequired( sal_False )
+ ,m_bCommitable( _bCommitable )
+ ,m_bResetting( sal_False )
+ ,m_bForwardValueChanges( sal_True )
+{
+ DBG_CTOR(frm_OBoundControlModel, NULL);
+
+ m_aLabelServiceName = _pOriginal->m_aLabelServiceName;
+ m_sDataFieldConnectivityProperty = _pOriginal->m_sDataFieldConnectivityProperty;
+ m_aControlSource = _pOriginal->m_aControlSource;
+ // m_xLabelControl, though bneing a property, is not to be cloned, not even the reference will be transfered.
+ // (the former should be clear - a clone of the object we're only referencing does not make sense)
+ // (the second would violate the restriction for label controls that they're part of the
+ // same form component hierarchy - we ourself are no part, yet, so we can't have a label control)
+ m_bCommitable = _pOriginal->m_bCommitable;
+}
+
+//------------------------------------------------------------------
OBoundControlModel::~OBoundControlModel()
{
DBG_DTOR(frm_OBoundControlModel, NULL);
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 8a21e7bc19a6..66e173739f3b 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FormattedField.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: fs $ $Date: 2002-10-09 13:49:57 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -377,33 +377,54 @@ InterfaceRef SAL_CALL OFormattedModel_CreateInstance(const Reference<XMultiServi
}
//------------------------------------------------------------------
-OFormattedModel::OFormattedModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_CONTROL_FORMATTEDFIELD, sal_False )
- // use the old control name for compytibility reasons
- ,OErrorBroadcaster( OComponentHelper::rBHelper )
- ,OPropertyChangeListener(m_aMutex)
- ,m_bOriginalNumeric(sal_False)
- ,m_bNumeric(sal_False)
- ,m_xOriginalFormatter(NULL)
- ,m_nKeyType(NumberFormat::UNDEFINED)
- ,m_aNullDate(DBTypeConversion::getStandardDate())
- ,m_bAggregateListening(sal_False)
- ,m_pPropertyMultiplexer(NULL)
- ,m_nFieldType( DataType::OTHER )
+void OFormattedModel::implConstruct()
{
- DBG_CTOR(OFormattedModel, NULL);
- m_nClassId = FormComponentType::TEXTFIELD;
+ // members
+ m_bOriginalNumeric = sal_False;
+ m_bNumeric = sal_False;
+ m_xOriginalFormatter = NULL;
+ m_nKeyType = NumberFormat::UNDEFINED;
+ m_aNullDate = DBTypeConversion::getStandardDate();
+ m_bAggregateListening = sal_False;
+ m_pPropertyMultiplexer = NULL;
+ m_nFieldType = DataType::OTHER;
+ // default our formats supplier
increment(m_refCount);
setPropertyToDefaultByHandle(PROPERTY_ID_FORMATSSUPPLIER);
decrement(m_refCount);
+ startAggregateListening();
+ doSetDelegator();
+}
+
+//------------------------------------------------------------------
+OFormattedModel::OFormattedModel(const Reference<XMultiServiceFactory>& _rxFactory)
+ :OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_FORMATTEDFIELD, FRM_CONTROL_FORMATTEDFIELD, sal_False )
+ // use the old control name for compytibility reasons
+ ,OErrorBroadcaster( OComponentHelper::rBHelper )
+ ,OPropertyChangeListener( m_aMutex )
+{
+ DBG_CTOR(OFormattedModel, NULL);
+
+ implConstruct();
+
m_sDataFieldConnectivityProperty = PROPERTY_EFFECTIVE_VALUE;
+ m_nClassId = FormComponentType::TEXTFIELD;
+
if (OFormattedModel::nValueHandle == -1)
OFormattedModel::nValueHandle = getOriginalHandle(PROPERTY_ID_EFFECTIVE_VALUE);
+}
- startAggregateListening();
- doSetDelegator();
+//------------------------------------------------------------------
+OFormattedModel::OFormattedModel( const OFormattedModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+ ,OErrorBroadcaster( OComponentHelper::rBHelper )
+ ,OPropertyChangeListener( m_aMutex )
+{
+ DBG_CTOR(OFormattedModel, NULL);
+
+ implConstruct();
}
//------------------------------------------------------------------------------
@@ -415,6 +436,10 @@ OFormattedModel::~OFormattedModel()
DBG_DTOR(OFormattedModel, NULL);
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OFormattedModel )
+
//------------------------------------------------------------------------------
void OFormattedModel::startAggregateListening()
{
diff --git a/forms/source/component/FormattedField.hxx b/forms/source/component/FormattedField.hxx
index 99e0dd42c3fa..b3d937d8dd10 100644
--- a/forms/source/component/FormattedField.hxx
+++ b/forms/source/component/FormattedField.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: FormattedField.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 16:12:33 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -121,8 +121,7 @@ namespace frm
sal_Int32 calcFormatKey() const;
void getFormatDescription(::rtl::OUString& sFormat, LanguageType& eLanguage);
- OFormattedModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OFormattedModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OFormattedModel );
friend InterfaceRef SAL_CALL OFormattedModel_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
friend class OFormattedFieldWrapper;
@@ -197,6 +196,11 @@ namespace frm
protected:
virtual sal_Int16 getPersistenceFlags() const;
// as we have an own version handling for persistence
+
+ protected:
+ DECLARE_XCLONEABLE();
+
+ void implConstruct();
};
//==================================================================
diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx
index 0a1c1f988f5d..c13202c1f95e 100644
--- a/forms/source/component/Grid.cxx
+++ b/forms/source/component/Grid.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Grid.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: fs $ $Date: 2002-10-04 08:11:48 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -202,9 +202,36 @@ OGridControlModel::OGridControlModel(const Reference<XMultiServiceFactory>& _rxF
}
//------------------------------------------------------------------
+OGridControlModel::OGridControlModel( const OGridControlModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
+ :OControlModel( _pOriginal, _rxFactory )
+ ,OInterfaceContainer( _rxFactory, m_aMutex, ::getCppuType( static_cast<Reference<XPropertySet>*>( NULL ) ) )
+ ,OErrorBroadcaster( OComponentHelper::rBHelper )
+ ,m_aSelectListeners( m_aMutex )
+ ,m_aResetListeners( m_aMutex )
+{
+ DBG_CTOR(OGridControlModel,NULL);
+
+ m_aDefaultControl = _pOriginal->m_aDefaultControl;
+ m_nFontEvent = _pOriginal->m_nFontEvent;
+ m_bEnable = _pOriginal->m_bEnable;
+ m_bNavigation = _pOriginal->m_bNavigation;
+ m_nBorder = _pOriginal->m_nBorder;
+ m_bRecordMarker = _pOriginal->m_bRecordMarker;
+ m_bPrintable = _pOriginal->m_bPrintable;
+ m_bAlwaysShowCursor = _pOriginal->m_bAlwaysShowCursor;
+ m_bDisplaySynchron = _pOriginal->m_bDisplaySynchron;
+ m_nFontRelief = _pOriginal->m_nFontRelief;
+ m_nFontEmphasis = _pOriginal->m_nFontEmphasis;
+
+ // clone the columns
+ cloneColumns( _pOriginal );
+
+ // TODO: clone the events?
+}
+
+//------------------------------------------------------------------
OGridControlModel::~OGridControlModel()
{
- DBG_DTOR(OGridControlModel,NULL);
if (m_nFontEvent)
Application::RemoveUserEvent(m_nFontEvent);
@@ -214,6 +241,47 @@ OGridControlModel::~OGridControlModel()
dispose();
}
+ DBG_DTOR(OGridControlModel,NULL);
+}
+
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OGridControlModel )
+
+//------------------------------------------------------------------------------
+void OGridControlModel::cloneColumns( const OGridControlModel* _pOriginalContainer )
+{
+ try
+ {
+ Reference< XCloneable > xColCloneable;
+
+ const OInterfaceArray::const_iterator pColumnStart = m_aItems.begin();
+ const OInterfaceArray::const_iterator pColumnEnd = m_aItems.end();
+ for ( OInterfaceArray::const_iterator pColumn = pColumnStart; pColumn != pColumnEnd; ++pColumn )
+ {
+ // ask the col for a factory for the clone
+ xColCloneable = xColCloneable.query( *pColumn );
+ DBG_ASSERT( xColCloneable.is(), "OGridControlModel::cloneColumns: column is not cloneable!" );
+
+ if ( xColCloneable.is() )
+ {
+ // create a clone of the column
+ Reference< XCloneable > xColClone( xColCloneable->createClone() );
+ DBG_ASSERT( xColClone.is(), "OGridControlModel::cloneColumns: invalid column clone!" );
+
+ if ( xColClone.is() )
+ {
+ // insert this clone into our own container
+ insertByIndex( pColumn - pColumnStart, xColClone->queryInterface( m_aElementType ) );
+ }
+
+ }
+ }
+ }
+ catch( const Exception& )
+ {
+ DBG_ERROR( "OGridControlModel::cloneColumns: caught an exception while cloning the columns!" );
+ }
}
// XServiceInfo
diff --git a/forms/source/component/Grid.hxx b/forms/source/component/Grid.hxx
index da30c47b0e20..43ac98caa4c2 100644
--- a/forms/source/component/Grid.hxx
+++ b/forms/source/component/Grid.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Grid.hxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: fs $ $Date: 2002-10-04 08:11:48 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -165,9 +165,7 @@ protected:
void _reset();
public:
- OGridControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
-
- virtual ~OGridControlModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OGridControlModel );
// UNO Anbindung
DECLARE_UNO3_AGG_DEFAULTS(OGridControlModel, OControlModel);
@@ -239,6 +237,9 @@ public:
IMPLEMENT_INFO_SERVICE()
protected:
+ DECLARE_XCLONEABLE();
+
+protected:
virtual void approveNewElement(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxObject,
ElementDescription* _pElement
@@ -258,6 +259,8 @@ protected:
void gotColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxColumn);
void lostColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxColumn);
+ void cloneColumns( const OGridControlModel* _pOriginalContainer );
+
private:
DECL_LINK( OnFontChanged, void* );
};
diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx
index 5b0391786584..cca2b38ea51d 100644
--- a/forms/source/component/GroupBox.cxx
+++ b/forms/source/component/GroupBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: GroupBox.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2001-04-02 10:28:06 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,12 +101,22 @@ InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<starlang::XM
}
//------------------------------------------------------------------
+DBG_NAME( OGroupBoxModel )
+//------------------------------------------------------------------
OGroupBoxModel::OGroupBoxModel(const Reference<starlang::XMultiServiceFactory>& _rxFactory)
:OControlModel(_rxFactory, VCL_CONTROLMODEL_GROUPBOX, VCL_CONTROL_GROUPBOX)
{
+ DBG_CTOR( OGroupBoxModel, NULL );
m_nClassId = FormComponentType::GROUPBOX;
}
+//------------------------------------------------------------------
+OGroupBoxModel::OGroupBoxModel( const OGroupBoxModel* _pOriginal, const Reference<starlang::XMultiServiceFactory>& _rxFactory )
+ :OControlModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( OGroupBoxModel, NULL );
+}
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL OGroupBoxModel::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)
@@ -122,9 +132,13 @@ StringSequence SAL_CALL OGroupBoxModel::getSupportedServiceNames() throw(::com::
//------------------------------------------------------------------
OGroupBoxModel::~OGroupBoxModel()
{
+ DBG_DTOR( OGroupBoxModel, NULL );
}
//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OGroupBoxModel )
+
+//------------------------------------------------------------------------------
Reference<XPropertySetInfo> SAL_CALL OGroupBoxModel::getPropertySetInfo() throw(RuntimeException)
{
Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
diff --git a/forms/source/component/GroupBox.hxx b/forms/source/component/GroupBox.hxx
index 6399e72fd883..711987771b03 100644
--- a/forms/source/component/GroupBox.hxx
+++ b/forms/source/component/GroupBox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: GroupBox.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-11-23 08:48:15 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -78,8 +78,7 @@ class OGroupBoxModel
,public ::comphelper::OAggregationArrayUsageHelper< OGroupBoxModel >
{
public:
- OGroupBoxModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OGroupBoxModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OGroupBoxModel );
// XServiceInfo
IMPLEMENTATION_NAME(OGroupBoxModel);
@@ -102,6 +101,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx
index 838b5ada2674..ce6fb93e510b 100644
--- a/forms/source/component/Hidden.cxx
+++ b/forms/source/component/Hidden.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Hidden.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: fs $ $Date: 2001-01-04 16:28:08 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,12 +97,32 @@ InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceF
}
//------------------------------------------------------------------
+DBG_NAME( OHiddenModel )
+//------------------------------------------------------------------
OHiddenModel::OHiddenModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OControlModel(_rxFactory, ::rtl::OUString())
{
+ DBG_CTOR( OHiddenModel, NULL );
m_nClassId = FormComponentType::HIDDENCONTROL;
}
+//------------------------------------------------------------------
+OHiddenModel::OHiddenModel( const OHiddenModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OControlModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( OHiddenModel, NULL );
+ m_sHiddenValue = _pOriginal->m_sHiddenValue;
+}
+
+//------------------------------------------------------------------------------
+OHiddenModel::~OHiddenModel( )
+{
+ DBG_CTOR( OHiddenModel, NULL );
+}
+
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OHiddenModel )
+
//------------------------------------------------------------------------------
void OHiddenModel::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{
diff --git a/forms/source/component/Hidden.hxx b/forms/source/component/Hidden.hxx
index cf74916f654f..0cbac6c061fd 100644
--- a/forms/source/component/Hidden.hxx
+++ b/forms/source/component/Hidden.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Hidden.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: oj $ $Date: 2000-11-23 08:48:15 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,7 +80,7 @@ class OHiddenModel
::rtl::OUString m_sHiddenValue;
public:
- OHiddenModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
+ DECLARE_DEFAULT_LEAF_XTOR( OHiddenModel );
// OPropertySetHelper
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle) const;
@@ -111,6 +111,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE( );
};
#endif // _FORMS_HIDDEN_HXX_
diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx
index 83cb862f2acc..984efa3cf74f 100644
--- a/forms/source/component/ImageButton.cxx
+++ b/forms/source/component/ImageButton.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageButton.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:25:32 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,7 +97,7 @@ DBG_NAME(OImageButtonModel)
//------------------------------------------------------------------
InterfaceRef SAL_CALL OImageButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory)
{
- return *(new OImageButtonModel(_rxFactory));
+ return *(new OImageButtonModel(_rxFactory));
}
//------------------------------------------------------------------
@@ -109,6 +109,16 @@ OImageButtonModel::OImageButtonModel(const Reference<XMultiServiceFactory>& _rxF
m_nClassId = FormComponentType::IMAGEBUTTON;
}
+//------------------------------------------------------------------
+OImageButtonModel::OImageButtonModel( const OImageButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory)
+ :OImageModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR(OImageButtonModel, NULL);
+}
+
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OImageButtonModel )
+
//------------------------------------------------------------------------------
OImageButtonModel::~OImageButtonModel()
{
diff --git a/forms/source/component/ImageButton.hxx b/forms/source/component/ImageButton.hxx
index e649d28ead77..b1ba7bc47330 100644
--- a/forms/source/component/ImageButton.hxx
+++ b/forms/source/component/ImageButton.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageButton.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:20:30 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -83,8 +83,7 @@ class OImageButtonModel
,public ::comphelper::OAggregationArrayUsageHelper< OImageButtonModel >
{
public:
- OImageButtonModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OImageButtonModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OImageButtonModel );
// ::com::sun::star::lang::XServiceInfo
IMPLEMENTATION_NAME(OImageButtonModel);
@@ -105,6 +104,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 72cd815298a9..a7c3edddd317 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageControl.cxx,v $
*
- * $Revision: 1.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: fs $ $Date: 2002-11-14 10:11:54 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -198,25 +198,45 @@ Sequence<Type> OImageControlModel::_getTypes()
DBG_NAME(OImageControlModel)
//------------------------------------------------------------------
OImageControlModel::OImageControlModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_CONTROL_IMAGECONTROL, sal_False, sal_False)
- // use the old control name for compytibility reasons
- ,OPropertyChangeListener(m_aMutex)
- ,m_pImageProducer(new ImageProducer)
- ,m_bReadOnly(sal_False)
- ,m_pAggregatePropertyMultiplexer(NULL)
-{
- DBG_CTOR(OImageControlModel,NULL);
+ :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_IMAGECONTROL, FRM_CONTROL_IMAGECONTROL, sal_False, sal_False)
+ // use the old control name for compytibility reasons
+ ,OPropertyChangeListener( m_aMutex )
+ ,m_pImageProducer( new ImageProducer )
+ ,m_bReadOnly( sal_False )
+ ,m_pAggregatePropertyMultiplexer( NULL )
+{
+ DBG_CTOR( OImageControlModel, NULL );
m_nClassId = FormComponentType::IMAGECONTROL;
- m_xImageProducer = m_pImageProducer;
+ implConstruct();
+}
+
+//------------------------------------------------------------------
+OImageControlModel::OImageControlModel( const OImageControlModel* _pOriginal, const Reference< XMultiServiceFactory >& _rxFactory )
+ :OBoundControlModel( _pOriginal, _rxFactory, sal_False, sal_False )
+ // use the old control name for compytibility reasons
+ ,OPropertyChangeListener( m_aMutex )
+ ,m_pImageProducer( NULL )
+ ,m_pAggregatePropertyMultiplexer( NULL )
+{
+ DBG_CTOR( OImageControlModel, NULL );
+ implConstruct();
+ m_bReadOnly = _pOriginal->m_bReadOnly;
+}
+//------------------------------------------------------------------
+void OImageControlModel::implConstruct()
+{
+ m_pImageProducer = new ImageProducer;
+ m_xImageProducer = m_pImageProducer;
m_sDataFieldConnectivityProperty = PROPERTY_IMAGE_URL;
+
increment(m_refCount);
- if (m_xAggregateSet.is())
+ if ( m_xAggregateSet.is() )
{
- m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer(this, m_xAggregateSet, sal_False);
+ m_pAggregatePropertyMultiplexer = new OPropertyChangeMultiplexer( this, m_xAggregateSet, sal_False );
m_pAggregatePropertyMultiplexer->acquire();
- m_pAggregatePropertyMultiplexer->addProperty(PROPERTY_IMAGE_URL);
+ m_pAggregatePropertyMultiplexer->addProperty( PROPERTY_IMAGE_URL );
}
decrement(m_refCount);
@@ -244,6 +264,10 @@ OImageControlModel::~OImageControlModel()
DBG_DTOR(OImageControlModel,NULL);
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OImageControlModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence OImageControlModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/ImageControl.hxx b/forms/source/component/ImageControl.hxx
index 2554f4359eca..9698cc757a27 100644
--- a/forms/source/component/ImageControl.hxx
+++ b/forms/source/component/ImageControl.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ImageControl.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:34:25 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -96,7 +96,7 @@ class OImageControlModel
{
::com::sun::star::uno::Reference< ::com::sun::star::awt::XImageProducer> m_xImageProducer;
ImageProducer* m_pImageProducer;
- sal_Bool m_bReadOnly;
+ sal_Bool m_bReadOnly;
OPropertyChangeMultiplexer* m_pAggregatePropertyMultiplexer;
@@ -113,8 +113,7 @@ protected:
inline ImageProducer* GetImageProducer() { return m_pImageProducer; }
public:
- OImageControlModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OImageControlModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OImageControlModel );
virtual void SAL_CALL getFastPropertyValue(::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const;
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue) throw ( ::com::sun::star::uno::Exception);
@@ -158,6 +157,11 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
+
+ void implConstruct();
};
//==================================================================
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 9119bc28efd8..43cc35d27752 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ListBox.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: oj $ $Date: 2002-10-07 13:08:07 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -210,6 +210,19 @@ OListBoxModel::OListBoxModel(const Reference<XMultiServiceFactory>& _rxFactory)
}
//------------------------------------------------------------------
+OListBoxModel::OListBoxModel( const OListBoxModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OBoundControlModel( _pOriginal, _rxFactory )
+ ,OErrorBroadcaster( OComponentHelper::rBHelper )
+ ,m_aRefreshListeners( m_aMutex )
+ ,m_bBoundComponent(sal_False)
+ ,m_nNULLPos(-1)
+{
+ DBG_CTOR(OListBoxModel,NULL);
+ m_eListSourceType = _pOriginal->m_eListSourceType;
+ m_aBoundColumn = _pOriginal->m_aBoundColumn;
+}
+
+//------------------------------------------------------------------
OListBoxModel::~OListBoxModel()
{
if (!OComponentHelper::rBHelper.bDisposed)
@@ -221,6 +234,10 @@ OListBoxModel::~OListBoxModel()
DBG_DTOR(OListBoxModel,NULL);
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OListBoxModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL OListBoxModel::getSupportedServiceNames() throw(RuntimeException)
diff --git a/forms/source/component/ListBox.hxx b/forms/source/component/ListBox.hxx
index e7475903a9dc..b803dc6b12f4 100644
--- a/forms/source/component/ListBox.hxx
+++ b/forms/source/component/ListBox.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ListBox.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: fs $ $Date: 2001-08-28 14:31:10 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -148,8 +148,7 @@ protected:
virtual void _onValueChanged();
public:
- OListBoxModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OListBoxModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OListBoxModel );
// XServiceInfo
IMPLEMENTATION_NAME(OListBoxModel);
@@ -205,6 +204,8 @@ public:
protected:
void loadData();
+
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx
index 39c855102012..2b9eeba9a4d9 100644
--- a/forms/source/component/Numeric.cxx
+++ b/forms/source/component/Numeric.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Numeric.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -134,10 +134,14 @@ Sequence<Type> ONumericModel::_getTypes()
}
//------------------------------------------------------------------
+DBG_NAME( ONumericModel )
+//------------------------------------------------------------------
ONumericModel::ONumericModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_NUMERICFIELD, FRM_CONTROL_NUMERICFIELD)
// use the old control name for compytibility reasons
{
+ DBG_CTOR( ONumericModel, NULL );
+
m_nClassId = FormComponentType::NUMERICFIELD;
m_sDataFieldConnectivityProperty = PROPERTY_VALUE;
if (ONumericModel::nValueHandle == -1)
@@ -145,10 +149,22 @@ ONumericModel::ONumericModel(const Reference<XMultiServiceFactory>& _rxFactory)
}
//------------------------------------------------------------------
+ONumericModel::ONumericModel( const ONumericModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( ONumericModel, NULL );
+}
+
+//------------------------------------------------------------------
ONumericModel::~ONumericModel()
{
+ DBG_DTOR( ONumericModel, NULL );
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( ONumericModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence ONumericModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/Numeric.hxx b/forms/source/component/Numeric.hxx
index 9ac4715a368f..30ddb95c0831 100644
--- a/forms/source/component/Numeric.hxx
+++ b/forms/source/component/Numeric.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Numeric.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:42:09 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,8 +86,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- ONumericModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~ONumericModel();
+ DECLARE_DEFAULT_LEAF_XTOR( ONumericModel );
// starform::XBoundComponent
virtual sal_Bool _commit();
@@ -112,6 +111,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx
index c5219e0e3647..c843b9fae26c 100644
--- a/forms/source/component/Pattern.cxx
+++ b/forms/source/component/Pattern.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Pattern.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,10 +133,14 @@ Sequence<Type> OPatternModel::_getTypes()
}
//------------------------------------------------------------------
+DBG_NAME( OPatternModel )
+//------------------------------------------------------------------
OPatternModel::OPatternModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_PATTERNFIELD, FRM_CONTROL_PATTERNFIELD)
// use the old control name for compytibility reasons
{
+ DBG_CTOR( OPatternModel, NULL );
+
m_nClassId = FormComponentType::PATTERNFIELD;
m_sDataFieldConnectivityProperty = PROPERTY_TEXT;
if (OPatternModel::nTextHandle == -1)
@@ -144,10 +148,22 @@ OPatternModel::OPatternModel(const Reference<XMultiServiceFactory>& _rxFactory)
}
//------------------------------------------------------------------
+OPatternModel::OPatternModel( const OPatternModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+{
+ DBG_CTOR( OPatternModel, NULL );
+}
+
+//------------------------------------------------------------------
OPatternModel::~OPatternModel()
{
+ DBG_DTOR( OPatternModel, NULL );
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OPatternModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL OPatternModel::getSupportedServiceNames() throw()
diff --git a/forms/source/component/Pattern.hxx b/forms/source/component/Pattern.hxx
index d235c7511937..eb60fdaa88e0 100644
--- a/forms/source/component/Pattern.hxx
+++ b/forms/source/component/Pattern.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Pattern.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:45:33 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -87,8 +87,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- OPatternModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- virtual ~OPatternModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OPatternModel );
// starform::XBoundComponent
virtual sal_Bool _commit();
@@ -113,6 +112,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index c7e8b0bbc142..8b19a6c75265 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RadioButton.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:35 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -144,18 +144,47 @@ InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiSer
}
//------------------------------------------------------------------
+DBG_NAME( ORadioButtonModel )
+//------------------------------------------------------------------
ORadioButtonModel::ORadioButtonModel(const Reference<XMultiServiceFactory>& _rxFactory)
- :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_CONTROL_RADIOBUTTON, sal_False)
- // use the old control name for compytibility reasons
- ,OPropertyChangeListener(m_aMutex)
- ,m_bInReset(sal_False)
+ :OBoundControlModel(_rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_CONTROL_RADIOBUTTON, sal_False)
+ // use the old control name for compytibility reasons
+ ,OPropertyChangeListener(m_aMutex)
+ ,m_bInReset(sal_False)
{
+ DBG_CTOR( ORadioButtonModel, NULL );
+
m_nClassId = FormComponentType::RADIOBUTTON;
m_nDefaultChecked = RB_NOCHECK;
m_aLabelServiceName = FRM_SUN_COMPONENT_GROUPBOX;
m_sDataFieldConnectivityProperty = PROPERTY_STATE;
+ implConstruct();
+}
+
+//------------------------------------------------------------------
+ORadioButtonModel::ORadioButtonModel( const ORadioButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OBoundControlModel( _pOriginal, _rxFactory, sal_False)
+ ,OPropertyChangeListener( m_aMutex )
+ ,m_bInReset( sal_False )
+{
+ DBG_CTOR( ORadioButtonModel, NULL );
+
+ m_nDefaultChecked = _pOriginal->m_nDefaultChecked;
+ m_sReferenceValue = _pOriginal->m_sReferenceValue;
+
+ implConstruct();
+}
+//------------------------------------------------------------------------------
+ORadioButtonModel::~ORadioButtonModel()
+{
+ DBG_DTOR( ORadioButtonModel, NULL );
+}
+
+//------------------------------------------------------------------------------
+void ORadioButtonModel::implConstruct()
+{
increment(m_refCount);
if (m_xAggregateSet.is())
{
@@ -165,6 +194,10 @@ ORadioButtonModel::ORadioButtonModel(const Reference<XMultiServiceFactory>& _rxF
decrement(m_refCount);
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( ORadioButtonModel )
+
// XServiceInfo
//------------------------------------------------------------------------------
StringSequence SAL_CALL ORadioButtonModel::getSupportedServiceNames() throw(RuntimeException)
diff --git a/forms/source/component/RadioButton.hxx b/forms/source/component/RadioButton.hxx
index 7349f1be30c9..8a7964d0859d 100644
--- a/forms/source/component/RadioButton.hxx
+++ b/forms/source/component/RadioButton.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: RadioButton.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: fs $ $Date: 2001-02-21 11:01:15 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -95,7 +95,7 @@ protected:
virtual ::com::sun::star::uno::Any _getControlValue() const;
public:
- ORadioButtonModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
+ DECLARE_DEFAULT_LEAF_XTOR( ORadioButtonModel );
// XServiceInfo
IMPLEMENTATION_NAME(ORadioButtonModel);
@@ -139,6 +139,9 @@ protected:
protected:
void SetSiblingPropsTo(const ::rtl::OUString& rPropName, const ::com::sun::star::uno::Any& rValue);
+
+ void implConstruct();
+ DECLARE_XCLONEABLE( );
};
//==================================================================
diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx
index 953ba580d396..968e1f3647a7 100644
--- a/forms/source/component/Time.cxx
+++ b/forms/source/component/Time.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Time.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -165,11 +165,15 @@ Sequence<Type> OTimeModel::_getTypes()
}
//------------------------------------------------------------------
+DBG_NAME( OTimeModel )
+//------------------------------------------------------------------
OTimeModel::OTimeModel(const Reference<XMultiServiceFactory>& _rxFactory)
:OEditBaseModel(_rxFactory, VCL_CONTROLMODEL_TIMEFIELD, FRM_CONTROL_TIMEFIELD )
// use the old control name for compytibility reasons
,OLimitedFormats(_rxFactory, FormComponentType::TIMEFIELD)
{
+ DBG_CTOR( OTimeModel, NULL );
+
m_nClassId = FormComponentType::TIMEFIELD;
m_sDataFieldConnectivityProperty = PROPERTY_TIME;
if (OTimeModel::nTimeHandle == -1)
@@ -179,11 +183,26 @@ OTimeModel::OTimeModel(const Reference<XMultiServiceFactory>& _rxFactory)
}
//------------------------------------------------------------------------------
-OTimeModel::~OTimeModel()
+OTimeModel::OTimeModel( const OTimeModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory )
+ :OEditBaseModel( _pOriginal, _rxFactory )
+ ,OLimitedFormats( _rxFactory, FormComponentType::TIMEFIELD )
+{
+ DBG_CTOR( OTimeModel, NULL );
+
+ setAggregateSet( m_xAggregateFastSet, getOriginalHandle( PROPERTY_ID_TIMEFORMAT ) );
+}
+
+//------------------------------------------------------------------------------
+OTimeModel::~OTimeModel( )
{
setAggregateSet(Reference< XFastPropertySet >(), -1);
+ DBG_DTOR( OTimeModel, NULL );
}
+// XCloneable
+//------------------------------------------------------------------------------
+IMPLEMENT_DEFAULT_CLONING( OTimeModel )
+
//------------------------------------------------------------------------------
::rtl::OUString SAL_CALL OTimeModel::getServiceName() throw ( ::com::sun::star::uno::RuntimeException)
{
diff --git a/forms/source/component/Time.hxx b/forms/source/component/Time.hxx
index 24813f8b48e3..6dcf9394a477 100644
--- a/forms/source/component/Time.hxx
+++ b/forms/source/component/Time.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Time.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 17:54:21 $
+ * last change: $Author: fs $ $Date: 2002-12-02 09:56:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,8 +91,7 @@ protected:
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes();
public:
- OTimeModel(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
- ~OTimeModel();
+ DECLARE_DEFAULT_LEAF_XTOR( OTimeModel );
// starform::XBoundComponent
virtual sal_Bool _commit();
@@ -127,6 +126,9 @@ public:
::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& /* [out] */ _rAggregateProps
) const;
IMPLEMENT_INFO_SERVICE()
+
+protected:
+ DECLARE_XCLONEABLE();
};
//==================================================================