diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-11 13:30:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-04-12 08:46:17 +0200 |
commit | d5ed07d2a249e61937dd42a4b2efb7e7fbef02d6 (patch) | |
tree | bdba1a2775fc89ef333c39f0e52f4af147d41d7f /toolkit | |
parent | b0a2ab4c68fa11b0a713583946718a60fda19c0c (diff) |
make ControlModelContainerBase::Clone return by rtl::Reference
Change-Id: Ie5d80688293dea42bea8b38fb1699e93980dd668
Reviewed-on: https://gerrit.libreoffice.org/52747
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/animatedimages.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/dialogcontrol.cxx | 13 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/grid/gridcontrol.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/spinningprogress.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/tkspinbutton.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/tree/treecontrol.hxx | 2 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrolmodel.cxx | 5 |
10 files changed, 16 insertions, 20 deletions
diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx index 3e29b67cb01e..a9cee3921d5a 100644 --- a/toolkit/source/controls/animatedimages.cxx +++ b/toolkit/source/controls/animatedimages.cxx @@ -265,7 +265,7 @@ namespace toolkit { } - UnoControlModel* AnimatedImagesControlModel::Clone() const + rtl::Reference<UnoControlModel> AnimatedImagesControlModel::Clone() const { return new AnimatedImagesControlModel( *this ); } diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 767501c91b4d..cc50dbd31858 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -300,7 +300,7 @@ void ControlModelContainerBase::Clone_Impl(ControlModelContainerBase& _rClone) c CloneControlModel( _rClone.maModels ) ); } -UnoControlModel* ControlModelContainerBase::Clone() const +rtl::Reference<UnoControlModel> ControlModelContainerBase::Clone() const { // clone the container itself ControlModelContainerBase* pClone = new ControlModelContainerBase( *this ); diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx index f7a7ed229bc1..2cac7986a506 100644 --- a/toolkit/source/controls/dialogcontrol.cxx +++ b/toolkit/source/controls/dialogcontrol.cxx @@ -145,7 +145,7 @@ public: explicit UnoControlDialogModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext ); UnoControlDialogModel( const UnoControlDialogModel& rModel ); - UnoControlModel* Clone() const override; + rtl::Reference<UnoControlModel> Clone() const override; // css::beans::XMultiPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; @@ -216,7 +216,7 @@ UnoControlDialogModel::UnoControlDialogModel( const UnoControlDialogModel& rMode setFastPropertyValue_NoBroadcast( BASEPROPERTY_USERFORMCONTAINEES, makeAny( xNameCont ) ); } -UnoControlModel* UnoControlDialogModel::Clone() const +rtl::Reference<UnoControlModel> UnoControlDialogModel::Clone() const { // clone the container itself UnoControlDialogModel* pClone = new UnoControlDialogModel( *this ); @@ -860,8 +860,7 @@ UnoMultiPageModel::~UnoMultiPageModel() { } -UnoControlModel* -UnoMultiPageModel::Clone() const +rtl::Reference<UnoControlModel> UnoMultiPageModel::Clone() const { // clone the container itself UnoMultiPageModel* pClone = new UnoMultiPageModel( *this ); @@ -973,8 +972,7 @@ UnoPageModel::~UnoPageModel() { } -UnoControlModel* -UnoPageModel::Clone() const +rtl::Reference<UnoControlModel> UnoPageModel::Clone() const { // clone the container itself UnoPageModel* pClone = new UnoPageModel( *this ); @@ -1127,8 +1125,7 @@ UnoFrameModel::~UnoFrameModel() { } -UnoControlModel* -UnoFrameModel::Clone() const +rtl::Reference<UnoControlModel> UnoFrameModel::Clone() const { // clone the container itself UnoFrameModel* pClone = new UnoFrameModel( *this ); diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 02a619b5b857..3807e570b89e 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -157,7 +157,7 @@ UnoGridModel::UnoGridModel( const UnoGridModel& rModel ) } -UnoControlModel* UnoGridModel::Clone() const +rtl::Reference<UnoControlModel> UnoGridModel::Clone() const { return new UnoGridModel( *this ); } diff --git a/toolkit/source/controls/grid/gridcontrol.hxx b/toolkit/source/controls/grid/gridcontrol.hxx index a4f8a1f5b026..ed8508e25afc 100644 --- a/toolkit/source/controls/grid/gridcontrol.hxx +++ b/toolkit/source/controls/grid/gridcontrol.hxx @@ -50,7 +50,7 @@ public: explicit UnoGridModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory ); UnoGridModel( const UnoGridModel& rModel ); - UnoControlModel* Clone() const override; + rtl::Reference<UnoControlModel> Clone() const override; // css::lang::XComponent void SAL_CALL dispose( ) override; diff --git a/toolkit/source/controls/spinningprogress.cxx b/toolkit/source/controls/spinningprogress.cxx index 4d9ec002eabd..096de0c98bfd 100644 --- a/toolkit/source/controls/spinningprogress.cxx +++ b/toolkit/source/controls/spinningprogress.cxx @@ -34,7 +34,7 @@ class SpinningProgressControlModel : public SpinningProgressControlModel_Base public: explicit SpinningProgressControlModel( css::uno::Reference< css::uno::XComponentContext > const & i_factory ); - virtual UnoControlModel* Clone() const override; + virtual rtl::Reference<UnoControlModel> Clone() const override; // XPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; @@ -83,7 +83,7 @@ protected: } - UnoControlModel* SpinningProgressControlModel::Clone() const + rtl::Reference<UnoControlModel> SpinningProgressControlModel::Clone() const { return new SpinningProgressControlModel( *this ); } diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx index 000e8698e443..46e72e406648 100644 --- a/toolkit/source/controls/tkspinbutton.cxx +++ b/toolkit/source/controls/tkspinbutton.cxx @@ -48,7 +48,7 @@ protected: public: explicit UnoSpinButtonModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory ); - UnoControlModel* Clone() const override { return new UnoSpinButtonModel( *this ); } + rtl::Reference<UnoControlModel> Clone() const override { return new UnoSpinButtonModel( *this ); } // XMultiPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx index 816b177e7536..044894ea191d 100644 --- a/toolkit/source/controls/tree/treecontrol.cxx +++ b/toolkit/source/controls/tree/treecontrol.cxx @@ -69,7 +69,7 @@ UnoTreeModel::UnoTreeModel( const css::uno::Reference< css::uno::XComponentConte ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); } -UnoControlModel* UnoTreeModel::Clone() const +rtl::Reference<UnoControlModel> UnoTreeModel::Clone() const { return new UnoTreeModel( *this ); } diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx index 77ebf7f93746..b72511077574 100644 --- a/toolkit/source/controls/tree/treecontrol.hxx +++ b/toolkit/source/controls/tree/treecontrol.hxx @@ -39,7 +39,7 @@ protected: public: explicit UnoTreeModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory ); - UnoControlModel* Clone() const override; + rtl::Reference<UnoControlModel> Clone() const override; // css::beans::XMultiPropertySet css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override; diff --git a/toolkit/source/controls/unocontrolmodel.cxx b/toolkit/source/controls/unocontrolmodel.cxx index 2c53f1563921..2e7b75ddd0e1 100644 --- a/toolkit/source/controls/unocontrolmodel.cxx +++ b/toolkit/source/controls/unocontrolmodel.cxx @@ -436,9 +436,8 @@ IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoControlModel, UnoControlModel_Base, ::cppu: uno::Reference< util::XCloneable > UnoControlModel::createClone() { - UnoControlModel* pClone = Clone(); - uno::Reference< util::XCloneable > xClone( static_cast<cppu::OWeakObject*>(pClone), uno::UNO_QUERY ); - return xClone; + rtl::Reference<UnoControlModel> pClone = Clone(); + return pClone.get(); } // css::lang::XComponent |