[Libreoffice-commits] core.git: 2 commits - include/svx include/toolkit svx/inc svx/source toolkit/source
Noel Grandin
noel.grandin at collabora.co.uk
Thu Apr 12 06:47:19 UTC 2018
include/svx/sdr/properties/defaultproperties.hxx | 2
include/svx/sdr/properties/properties.hxx | 2
include/toolkit/controls/animatedimages.hxx | 2
include/toolkit/controls/controlmodelcontainerbase.hxx | 2
include/toolkit/controls/dialogcontrol.hxx | 6 +-
include/toolkit/controls/formattedcontrol.hxx | 2
include/toolkit/controls/roadmapcontrol.hxx | 2
include/toolkit/controls/tabpagecontainer.hxx | 2
include/toolkit/controls/tkscrollbar.hxx | 2
include/toolkit/controls/unocontrolcontainermodel.hxx | 2
include/toolkit/controls/unocontrolmodel.hxx | 3 -
include/toolkit/controls/unocontrols.hxx | 36 ++++++++---------
svx/inc/sdr/properties/attributeproperties.hxx | 2
svx/inc/sdr/properties/captionproperties.hxx | 2
svx/inc/sdr/properties/circleproperties.hxx | 2
svx/inc/sdr/properties/connectorproperties.hxx | 2
svx/inc/sdr/properties/customshapeproperties.hxx | 2
svx/inc/sdr/properties/e3dcompoundproperties.hxx | 2
svx/inc/sdr/properties/e3dextrudeproperties.hxx | 2
svx/inc/sdr/properties/e3dlatheproperties.hxx | 2
svx/inc/sdr/properties/e3dproperties.hxx | 2
svx/inc/sdr/properties/e3dsceneproperties.hxx | 2
svx/inc/sdr/properties/e3dsphereproperties.hxx | 2
svx/inc/sdr/properties/emptyproperties.hxx | 2
svx/inc/sdr/properties/graphicproperties.hxx | 2
svx/inc/sdr/properties/groupproperties.hxx | 2
svx/inc/sdr/properties/measureproperties.hxx | 2
svx/inc/sdr/properties/oleproperties.hxx | 2
svx/inc/sdr/properties/pageproperties.hxx | 2
svx/inc/sdr/properties/rectangleproperties.hxx | 2
svx/inc/sdr/properties/textproperties.hxx | 2
svx/source/sdr/properties/attributeproperties.cxx | 4 -
svx/source/sdr/properties/captionproperties.cxx | 4 -
svx/source/sdr/properties/circleproperties.cxx | 4 -
svx/source/sdr/properties/connectorproperties.cxx | 4 -
svx/source/sdr/properties/customshapeproperties.cxx | 4 -
svx/source/sdr/properties/defaultproperties.cxx | 4 -
svx/source/sdr/properties/e3dcompoundproperties.cxx | 4 -
svx/source/sdr/properties/e3dextrudeproperties.cxx | 4 -
svx/source/sdr/properties/e3dlatheproperties.cxx | 4 -
svx/source/sdr/properties/e3dproperties.cxx | 4 -
svx/source/sdr/properties/e3dsceneproperties.cxx | 4 -
svx/source/sdr/properties/e3dsphereproperties.cxx | 4 -
svx/source/sdr/properties/emptyproperties.cxx | 4 -
svx/source/sdr/properties/graphicproperties.cxx | 4 -
svx/source/sdr/properties/groupproperties.cxx | 4 -
svx/source/sdr/properties/measureproperties.cxx | 4 -
svx/source/sdr/properties/oleproperties.cxx | 4 -
svx/source/sdr/properties/pageproperties.cxx | 4 -
svx/source/sdr/properties/rectangleproperties.cxx | 4 -
svx/source/sdr/properties/textproperties.cxx | 4 -
svx/source/svdraw/svdobj.cxx | 2
svx/source/table/cell.cxx | 6 +-
svx/source/table/svdotable.cxx | 6 +-
toolkit/source/controls/animatedimages.cxx | 2
toolkit/source/controls/controlmodelcontainerbase.cxx | 2
toolkit/source/controls/dialogcontrol.cxx | 13 ++----
toolkit/source/controls/grid/gridcontrol.cxx | 2
toolkit/source/controls/grid/gridcontrol.hxx | 2
toolkit/source/controls/spinningprogress.cxx | 4 -
toolkit/source/controls/tkspinbutton.cxx | 2
toolkit/source/controls/tree/treecontrol.cxx | 2
toolkit/source/controls/tree/treecontrol.hxx | 2
toolkit/source/controls/unocontrolmodel.cxx | 5 --
64 files changed, 114 insertions(+), 117 deletions(-)
New commits:
commit d5ed07d2a249e61937dd42a4b2efb7e7fbef02d6
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Apr 11 13:30:23 2018 +0200
make ControlModelContainerBase::Clone return by rtl::Reference
Change-Id: Ie5d80688293dea42bea8b38fb1699e93980dd668
Reviewed-on: https://gerrit.libreoffice.org/52747
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/toolkit/controls/animatedimages.hxx b/include/toolkit/controls/animatedimages.hxx
index 28b323398039..c4820ce86f69 100644
--- a/include/toolkit/controls/animatedimages.hxx
+++ b/include/toolkit/controls/animatedimages.hxx
@@ -42,7 +42,7 @@ namespace toolkit
AnimatedImagesControlModel( css::uno::Reference< css::uno::XComponentContext > const & i_factory );
AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource );
- virtual UnoControlModel* Clone() const override;
+ virtual rtl::Reference<UnoControlModel> Clone() const override;
// XPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
diff --git a/include/toolkit/controls/controlmodelcontainerbase.hxx b/include/toolkit/controls/controlmodelcontainerbase.hxx
index aba3ff1362a0..eb8068e40f8e 100644
--- a/include/toolkit/controls/controlmodelcontainerbase.hxx
+++ b/include/toolkit/controls/controlmodelcontainerbase.hxx
@@ -108,7 +108,7 @@ public:
ControlModelContainerBase( const ControlModelContainerBase& rModel );
virtual ~ControlModelContainerBase() override;
- UnoControlModel* Clone() const override;
+ rtl::Reference<UnoControlModel> Clone() const override;
// css::container::XContainer
void SAL_CALL addContainerListener( const css::uno::Reference< css::container::XContainerListener >& xListener ) override;
diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx
index e1bc04f1e63f..970226416253 100644
--- a/include/toolkit/controls/dialogcontrol.hxx
+++ b/include/toolkit/controls/dialogcontrol.hxx
@@ -170,7 +170,7 @@ public:
UnoMultiPageModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~UnoMultiPageModel() override;
- UnoControlModel* Clone() const override;
+ rtl::Reference<UnoControlModel> Clone() const override;
DECLIMPL_SERVICEINFO_DERIVED( UnoMultiPageModel, ControlModelContainerBase, "com.sun.star.awt.UnoMultiPageModel" )
@@ -244,7 +244,7 @@ public:
UnoPageModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~UnoPageModel() override;
- UnoControlModel* Clone() const override;
+ rtl::Reference<UnoControlModel> Clone() const override;
DECLIMPL_SERVICEINFO_DERIVED( UnoPageModel, ControlModelContainerBase, "com.sun.star.awt.UnoPageModel" )
@@ -277,7 +277,7 @@ public:
UnoFrameModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
virtual ~UnoFrameModel() override;
- UnoControlModel* Clone() const override;
+ rtl::Reference<UnoControlModel> Clone() const override;
DECLIMPL_SERVICEINFO_DERIVED( UnoFrameModel, ControlModelContainerBase, "com.sun.star.awt.UnoFrameModel" )
diff --git a/include/toolkit/controls/formattedcontrol.hxx b/include/toolkit/controls/formattedcontrol.hxx
index f600702b3027..8bacfa35b6bf 100644
--- a/include/toolkit/controls/formattedcontrol.hxx
+++ b/include/toolkit/controls/formattedcontrol.hxx
@@ -44,7 +44,7 @@ namespace toolkit
{
}
- UnoControlModel* Clone() const override { return new UnoControlFormattedFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlFormattedFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
diff --git a/include/toolkit/controls/roadmapcontrol.hxx b/include/toolkit/controls/roadmapcontrol.hxx
index 47feb933ddd6..c5a51a709476 100644
--- a/include/toolkit/controls/roadmapcontrol.hxx
+++ b/include/toolkit/controls/roadmapcontrol.hxx
@@ -96,7 +96,7 @@ namespace toolkit
UnoControlRoadmapModel_Base( rModel ),
UnoControlRoadmapModel_IBase( rModel ),
maContainerListeners( *this ) {}
- UnoControlModel* Clone() const override { return new UnoControlRoadmapModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlRoadmapModel( *this ); }
// XTypeProvider
diff --git a/include/toolkit/controls/tabpagecontainer.hxx b/include/toolkit/controls/tabpagecontainer.hxx
index 8174acb203b6..baba7498c71f 100644
--- a/include/toolkit/controls/tabpagecontainer.hxx
+++ b/include/toolkit/controls/tabpagecontainer.hxx
@@ -54,7 +54,7 @@ public:
UnoControlTabPageContainerModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory );
UnoControlTabPageContainerModel( const UnoControlTabPageContainerModel& rModel ) : UnoControlTabPageContainerModel_Base( rModel ),maContainerListeners( *this ) {}
- UnoControlModel* Clone() const override { return new UnoControlTabPageContainerModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlTabPageContainerModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
diff --git a/include/toolkit/controls/tkscrollbar.hxx b/include/toolkit/controls/tkscrollbar.hxx
index a0bbd0e2ddd3..3682a4e57551 100644
--- a/include/toolkit/controls/tkscrollbar.hxx
+++ b/include/toolkit/controls/tkscrollbar.hxx
@@ -44,7 +44,7 @@ namespace toolkit
UnoControlScrollBarModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory );
UnoControlScrollBarModel( const UnoControlScrollBarModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlScrollBarModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlScrollBarModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
diff --git a/include/toolkit/controls/unocontrolcontainermodel.hxx b/include/toolkit/controls/unocontrolcontainermodel.hxx
index 08ff38dac388..b541f275976e 100644
--- a/include/toolkit/controls/unocontrolcontainermodel.hxx
+++ b/include/toolkit/controls/unocontrolcontainermodel.hxx
@@ -38,7 +38,7 @@ public:
UnoControlContainerModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory );
UnoControlContainerModel( const UnoControlContainerModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlContainerModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlContainerModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
diff --git a/include/toolkit/controls/unocontrolmodel.hxx b/include/toolkit/controls/unocontrolmodel.hxx
index aa5edc5cb65e..b736e6db49f1 100644
--- a/include/toolkit/controls/unocontrolmodel.hxx
+++ b/include/toolkit/controls/unocontrolmodel.hxx
@@ -38,6 +38,7 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase7.hxx>
#include <comphelper/uno3.hxx>
+#include <rtl/ref.hxx>
#include <vector>
#include <map>
@@ -115,7 +116,7 @@ public:
UnoControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlModel( const UnoControlModel& rModel );
- virtual UnoControlModel* Clone() const = 0;
+ virtual rtl::Reference<UnoControlModel> Clone() const = 0;
// css::uno::XInterface
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override { return OWeakAggObject::queryInterface(rType); }
diff --git a/include/toolkit/controls/unocontrols.hxx b/include/toolkit/controls/unocontrols.hxx
index e758cf6e01a8..e794147f9f2d 100644
--- a/include/toolkit/controls/unocontrols.hxx
+++ b/include/toolkit/controls/unocontrols.hxx
@@ -86,7 +86,7 @@ public:
UnoControlEditModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlEditModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlEditModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -192,7 +192,7 @@ public:
UnoControlFileControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlFileControlModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlFileControlModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -262,7 +262,7 @@ public:
UnoControlButtonModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlButtonModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlButtonModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
@@ -344,7 +344,7 @@ public:
UnoControlImageControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
- UnoControlModel* Clone() const override { return new UnoControlImageControlModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlImageControlModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
@@ -407,7 +407,7 @@ public:
UnoControlRadioButtonModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlRadioButtonModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlRadioButtonModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -488,7 +488,7 @@ public:
UnoControlCheckBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlCheckBoxModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlCheckBoxModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -571,7 +571,7 @@ public:
UnoControlFixedHyperlinkModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlFixedHyperlinkModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlFixedHyperlinkModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -645,7 +645,7 @@ public:
UnoControlFixedTextModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlFixedTextModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlFixedTextModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -712,7 +712,7 @@ public:
UnoControlGroupBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlGroupBoxModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlGroupBoxModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -767,7 +767,7 @@ public:
UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
virtual ~UnoControlListBoxModel() override;
- UnoControlModel* Clone() const override { return new UnoControlListBoxModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlListBoxModel( *this ); }
virtual void ImplNormalizePropertySequence(
const sal_Int32 _nCount, /// the number of entries in the arrays
@@ -939,7 +939,7 @@ public:
UnoControlComboBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlComboBoxModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlComboBoxModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1073,7 +1073,7 @@ public:
UnoControlDateFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlDateFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlDateFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1152,7 +1152,7 @@ public:
UnoControlTimeFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlTimeFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlTimeFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1229,7 +1229,7 @@ public:
UnoControlNumericFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlNumericFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlNumericFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1308,7 +1308,7 @@ public:
UnoControlCurrencyFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlCurrencyFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlCurrencyFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1387,7 +1387,7 @@ public:
UnoControlPatternFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlPatternFieldModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlPatternFieldModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() override;
@@ -1450,7 +1450,7 @@ public:
UnoControlProgressBarModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlProgressBarModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlProgressBarModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
@@ -1509,7 +1509,7 @@ public:
UnoControlFixedLineModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {}
- UnoControlModel* Clone() const override { return new UnoControlFixedLineModel( *this ); }
+ rtl::Reference<UnoControlModel> Clone() const override { return new UnoControlFixedLineModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
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
commit b0a2ab4c68fa11b0a713583946718a60fda19c0c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Apr 11 13:10:57 2018 +0200
make BaseProperties::Clone return std::unique_ptr
Change-Id: Iab4fb31c975bc19ccd895df9de79c0ad055027c0
Reviewed-on: https://gerrit.libreoffice.org/52746
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx
index b3395386f833..beff46818c30 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -70,7 +70,7 @@ namespace sdr
void dumpAsXml(struct _xmlTextWriter * pWriter) const;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// get itemset
virtual const SfxItemSet& GetObjectItemSet() const override;
diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx
index 3bfca7630efe..5f9a63484d43 100644
--- a/include/svx/sdr/properties/properties.hxx
+++ b/include/svx/sdr/properties/properties.hxx
@@ -115,7 +115,7 @@ namespace sdr
// Clone() operator, normally just calls the local copy constructor,
// see above.
- virtual BaseProperties& Clone(SdrObject& rObj) const = 0;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const = 0;
// Get the local ItemSet. This directly returns the local ItemSet of the object. No
// merging of ItemSets is done for e.g. Group objects.
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx
index d12374f31ee1..138d7a20b900 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -64,7 +64,7 @@ namespace sdr
AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj);
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// Get the local ItemSet. This directly returns the local ItemSet of the object. No
// merging of ItemSets is done for e.g. Group objects.
diff --git a/svx/inc/sdr/properties/captionproperties.hxx b/svx/inc/sdr/properties/captionproperties.hxx
index 2fb7b8d1e6c2..67fd1dd77a3b 100644
--- a/svx/inc/sdr/properties/captionproperties.hxx
+++ b/svx/inc/sdr/properties/captionproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~CaptionProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/circleproperties.hxx b/svx/inc/sdr/properties/circleproperties.hxx
index 5de1ac6c6e9e..a4a0cfdd7267 100644
--- a/svx/inc/sdr/properties/circleproperties.hxx
+++ b/svx/inc/sdr/properties/circleproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~CircleProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/connectorproperties.hxx b/svx/inc/sdr/properties/connectorproperties.hxx
index 5ed60a3ad420..3ef330c31c57 100644
--- a/svx/inc/sdr/properties/connectorproperties.hxx
+++ b/svx/inc/sdr/properties/connectorproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~ConnectorProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/customshapeproperties.hxx b/svx/inc/sdr/properties/customshapeproperties.hxx
index 4abe7a50861a..3bd0085931c9 100644
--- a/svx/inc/sdr/properties/customshapeproperties.hxx
+++ b/svx/inc/sdr/properties/customshapeproperties.hxx
@@ -75,7 +75,7 @@ namespace sdr
virtual ~CustomShapeProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// This is the notifier from SfxListener
virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
diff --git a/svx/inc/sdr/properties/e3dcompoundproperties.hxx b/svx/inc/sdr/properties/e3dcompoundproperties.hxx
index 271bbc4a0a3e..44adf9d97a80 100644
--- a/svx/inc/sdr/properties/e3dcompoundproperties.hxx
+++ b/svx/inc/sdr/properties/e3dcompoundproperties.hxx
@@ -45,7 +45,7 @@ namespace sdr
virtual ~E3dCompoundProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// Get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may
// be overridden e.g for group objects to return a merged ItemSet of the object.
diff --git a/svx/inc/sdr/properties/e3dextrudeproperties.hxx b/svx/inc/sdr/properties/e3dextrudeproperties.hxx
index c8156ac3695f..bbc9bf06b015 100644
--- a/svx/inc/sdr/properties/e3dextrudeproperties.hxx
+++ b/svx/inc/sdr/properties/e3dextrudeproperties.hxx
@@ -44,7 +44,7 @@ namespace sdr
virtual ~E3dExtrudeProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
};
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/inc/sdr/properties/e3dlatheproperties.hxx b/svx/inc/sdr/properties/e3dlatheproperties.hxx
index 5c7cc4ff1780..1de98de9a75e 100644
--- a/svx/inc/sdr/properties/e3dlatheproperties.hxx
+++ b/svx/inc/sdr/properties/e3dlatheproperties.hxx
@@ -44,7 +44,7 @@ namespace sdr
virtual ~E3dLatheProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
};
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/inc/sdr/properties/e3dproperties.hxx b/svx/inc/sdr/properties/e3dproperties.hxx
index 0e6352079756..8b90440a9c5a 100644
--- a/svx/inc/sdr/properties/e3dproperties.hxx
+++ b/svx/inc/sdr/properties/e3dproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~E3dProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx
index 00d377766e01..e0cded4b1be3 100644
--- a/svx/inc/sdr/properties/e3dsceneproperties.hxx
+++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx
@@ -44,7 +44,7 @@ namespace sdr
virtual ~E3dSceneProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// get merged ItemSet. Normally, this maps directly to GetObjectItemSet(), but may
// be overridden e.g for group objects to return a merged ItemSet of the object.
diff --git a/svx/inc/sdr/properties/e3dsphereproperties.hxx b/svx/inc/sdr/properties/e3dsphereproperties.hxx
index c7e5068d08cd..4af384325e44 100644
--- a/svx/inc/sdr/properties/e3dsphereproperties.hxx
+++ b/svx/inc/sdr/properties/e3dsphereproperties.hxx
@@ -44,7 +44,7 @@ namespace sdr
virtual ~E3dSphereProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
};
} // end of namespace properties
} // end of namespace sdr
diff --git a/svx/inc/sdr/properties/emptyproperties.hxx b/svx/inc/sdr/properties/emptyproperties.hxx
index 8163eacfc4f0..821cde2a96b6 100644
--- a/svx/inc/sdr/properties/emptyproperties.hxx
+++ b/svx/inc/sdr/properties/emptyproperties.hxx
@@ -57,7 +57,7 @@ namespace sdr
explicit EmptyProperties(SdrObject& rObj);
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// get itemset
virtual const SfxItemSet& GetObjectItemSet() const override;
diff --git a/svx/inc/sdr/properties/graphicproperties.hxx b/svx/inc/sdr/properties/graphicproperties.hxx
index 860bc264ee7f..7f81ebd3d5dc 100644
--- a/svx/inc/sdr/properties/graphicproperties.hxx
+++ b/svx/inc/sdr/properties/graphicproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~GraphicProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx
index 9b6b28a73dc3..1c524f61eb1e 100644
--- a/svx/inc/sdr/properties/groupproperties.hxx
+++ b/svx/inc/sdr/properties/groupproperties.hxx
@@ -56,7 +56,7 @@ namespace sdr
virtual ~GroupProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// get itemset
virtual const SfxItemSet& GetObjectItemSet() const override;
diff --git a/svx/inc/sdr/properties/measureproperties.hxx b/svx/inc/sdr/properties/measureproperties.hxx
index 06cc0fd328f5..e133828e8265 100644
--- a/svx/inc/sdr/properties/measureproperties.hxx
+++ b/svx/inc/sdr/properties/measureproperties.hxx
@@ -47,7 +47,7 @@ namespace sdr
virtual ~MeasureProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/oleproperties.hxx b/svx/inc/sdr/properties/oleproperties.hxx
index 047af50289bc..3c932e3a6fe4 100644
--- a/svx/inc/sdr/properties/oleproperties.hxx
+++ b/svx/inc/sdr/properties/oleproperties.hxx
@@ -41,7 +41,7 @@ namespace sdr
virtual ~OleProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// force default attributes for a specific object type, called from
// DefaultProperties::GetObjectItemSet() if a new ItemSet is created
diff --git a/svx/inc/sdr/properties/pageproperties.hxx b/svx/inc/sdr/properties/pageproperties.hxx
index febdae9a2194..81c389f907cc 100644
--- a/svx/inc/sdr/properties/pageproperties.hxx
+++ b/svx/inc/sdr/properties/pageproperties.hxx
@@ -50,7 +50,7 @@ namespace sdr
virtual ~PageProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// get itemset. Override here to allow creating the empty itemset
// without asserting
diff --git a/svx/inc/sdr/properties/rectangleproperties.hxx b/svx/inc/sdr/properties/rectangleproperties.hxx
index 376b494eac93..5512ffb5b196 100644
--- a/svx/inc/sdr/properties/rectangleproperties.hxx
+++ b/svx/inc/sdr/properties/rectangleproperties.hxx
@@ -44,7 +44,7 @@ namespace sdr
virtual ~RectangleProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/inc/sdr/properties/textproperties.hxx b/svx/inc/sdr/properties/textproperties.hxx
index df6715cd51f0..5e6482a4faf0 100644
--- a/svx/inc/sdr/properties/textproperties.hxx
+++ b/svx/inc/sdr/properties/textproperties.hxx
@@ -58,7 +58,7 @@ namespace sdr
virtual ~TextProperties() override;
// Clone() operator, normally just calls the local copy constructor
- virtual BaseProperties& Clone(SdrObject& rObj) const override;
+ virtual std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
// set a new StyleSheet and broadcast
virtual void SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr) override;
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index a30b818fd706..eab25a1526f8 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -227,9 +227,9 @@ namespace sdr
ImpRemoveStyleSheet();
}
- BaseProperties& AttributeProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> AttributeProperties::Clone(SdrObject& rObj) const
{
- return *(new AttributeProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new AttributeProperties(*this, rObj));
}
const SfxItemSet& AttributeProperties::GetObjectItemSet() const
diff --git a/svx/source/sdr/properties/captionproperties.cxx b/svx/source/sdr/properties/captionproperties.cxx
index d092374003b0..5e7d2d3304f6 100644
--- a/svx/source/sdr/properties/captionproperties.cxx
+++ b/svx/source/sdr/properties/captionproperties.cxx
@@ -59,9 +59,9 @@ namespace sdr
{
}
- BaseProperties& CaptionProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> CaptionProperties::Clone(SdrObject& rObj) const
{
- return *(new CaptionProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new CaptionProperties(*this, rObj));
}
void CaptionProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/circleproperties.cxx b/svx/source/sdr/properties/circleproperties.cxx
index d8eca6fc5ea2..e0469fb3e2c9 100644
--- a/svx/source/sdr/properties/circleproperties.cxx
+++ b/svx/source/sdr/properties/circleproperties.cxx
@@ -63,9 +63,9 @@ namespace sdr
{
}
- BaseProperties& CircleProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> CircleProperties::Clone(SdrObject& rObj) const
{
- return *(new CircleProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new CircleProperties(*this, rObj));
}
void CircleProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/connectorproperties.cxx b/svx/source/sdr/properties/connectorproperties.cxx
index c8f825a5f013..e8847dcc9ab6 100644
--- a/svx/source/sdr/properties/connectorproperties.cxx
+++ b/svx/source/sdr/properties/connectorproperties.cxx
@@ -60,9 +60,9 @@ namespace sdr
{
}
- BaseProperties& ConnectorProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> ConnectorProperties::Clone(SdrObject& rObj) const
{
- return *(new ConnectorProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new ConnectorProperties(*this, rObj));
}
void ConnectorProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index 95ab71fbddef..4a1d5dd0df09 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -195,9 +195,9 @@ namespace sdr
{
}
- BaseProperties& CustomShapeProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> CustomShapeProperties::Clone(SdrObject& rObj) const
{
- return *(new CustomShapeProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new CustomShapeProperties(*this, rObj));
}
void CustomShapeProperties::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx
index 5a798b5b4e1c..3aa307bc3018 100644
--- a/svx/source/sdr/properties/defaultproperties.cxx
+++ b/svx/source/sdr/properties/defaultproperties.cxx
@@ -88,9 +88,9 @@ namespace sdr
}
}
- BaseProperties& DefaultProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> DefaultProperties::Clone(SdrObject& rObj) const
{
- return *(new DefaultProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new DefaultProperties(*this, rObj));
}
DefaultProperties::~DefaultProperties() {}
diff --git a/svx/source/sdr/properties/e3dcompoundproperties.cxx b/svx/source/sdr/properties/e3dcompoundproperties.cxx
index 7da70b568254..c19377f8e2d4 100644
--- a/svx/source/sdr/properties/e3dcompoundproperties.cxx
+++ b/svx/source/sdr/properties/e3dcompoundproperties.cxx
@@ -41,9 +41,9 @@ namespace sdr
{
}
- BaseProperties& E3dCompoundProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dCompoundProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dCompoundProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dCompoundProperties(*this, rObj));
}
const SfxItemSet& E3dCompoundProperties::GetMergedItemSet() const
diff --git a/svx/source/sdr/properties/e3dextrudeproperties.cxx b/svx/source/sdr/properties/e3dextrudeproperties.cxx
index c511471a4f1c..9755e2d623a1 100644
--- a/svx/source/sdr/properties/e3dextrudeproperties.cxx
+++ b/svx/source/sdr/properties/e3dextrudeproperties.cxx
@@ -40,9 +40,9 @@ namespace sdr
{
}
- BaseProperties& E3dExtrudeProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dExtrudeProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dExtrudeProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dExtrudeProperties(*this, rObj));
}
void E3dExtrudeProperties::PostItemChange(const sal_uInt16 nWhich)
diff --git a/svx/source/sdr/properties/e3dlatheproperties.cxx b/svx/source/sdr/properties/e3dlatheproperties.cxx
index b8847d061eab..a12270f07dd6 100644
--- a/svx/source/sdr/properties/e3dlatheproperties.cxx
+++ b/svx/source/sdr/properties/e3dlatheproperties.cxx
@@ -40,9 +40,9 @@ namespace sdr
{
}
- BaseProperties& E3dLatheProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dLatheProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dLatheProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dLatheProperties(*this, rObj));
}
void E3dLatheProperties::PostItemChange(const sal_uInt16 nWhich)
diff --git a/svx/source/sdr/properties/e3dproperties.cxx b/svx/source/sdr/properties/e3dproperties.cxx
index e22c10d2ed5f..8666191f0c54 100644
--- a/svx/source/sdr/properties/e3dproperties.cxx
+++ b/svx/source/sdr/properties/e3dproperties.cxx
@@ -58,9 +58,9 @@ namespace sdr
{
}
- BaseProperties& E3dProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dProperties(*this, rObj));
}
void E3dProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index a5f59940d51e..52f1207ebd44 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -44,9 +44,9 @@ namespace sdr
{
}
- BaseProperties& E3dSceneProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dSceneProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dSceneProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dSceneProperties(*this, rObj));
}
const SfxItemSet& E3dSceneProperties::GetMergedItemSet() const
diff --git a/svx/source/sdr/properties/e3dsphereproperties.cxx b/svx/source/sdr/properties/e3dsphereproperties.cxx
index 6190b4bcbaa0..0fefba58697c 100644
--- a/svx/source/sdr/properties/e3dsphereproperties.cxx
+++ b/svx/source/sdr/properties/e3dsphereproperties.cxx
@@ -40,9 +40,9 @@ namespace sdr
{
}
- BaseProperties& E3dSphereProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> E3dSphereProperties::Clone(SdrObject& rObj) const
{
- return *(new E3dSphereProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new E3dSphereProperties(*this, rObj));
}
void E3dSphereProperties::PostItemChange(const sal_uInt16 nWhich)
diff --git a/svx/source/sdr/properties/emptyproperties.cxx b/svx/source/sdr/properties/emptyproperties.cxx
index 458cf3b98f64..9cde4ca1e2d6 100644
--- a/svx/source/sdr/properties/emptyproperties.cxx
+++ b/svx/source/sdr/properties/emptyproperties.cxx
@@ -46,9 +46,9 @@ namespace sdr
{
}
- BaseProperties& EmptyProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> EmptyProperties::Clone(SdrObject& rObj) const
{
- return *(new EmptyProperties(rObj));
+ return std::unique_ptr<BaseProperties>(new EmptyProperties(rObj));
}
const SfxItemSet& EmptyProperties::GetObjectItemSet() const
diff --git a/svx/source/sdr/properties/graphicproperties.cxx b/svx/source/sdr/properties/graphicproperties.cxx
index 8ea829f85c5b..6c624a4108d3 100644
--- a/svx/source/sdr/properties/graphicproperties.cxx
+++ b/svx/source/sdr/properties/graphicproperties.cxx
@@ -64,9 +64,9 @@ namespace sdr
{
}
- BaseProperties& GraphicProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> GraphicProperties::Clone(SdrObject& rObj) const
{
- return *(new GraphicProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new GraphicProperties(*this, rObj));
}
void GraphicProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx
index a79f7cc9059a..857eea1fed73 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -57,9 +57,9 @@ namespace sdr
{
}
- BaseProperties& GroupProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> GroupProperties::Clone(SdrObject& rObj) const
{
- return *(new GroupProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new GroupProperties(*this, rObj));
}
const SfxItemSet& GroupProperties::GetObjectItemSet() const
diff --git a/svx/source/sdr/properties/measureproperties.cxx b/svx/source/sdr/properties/measureproperties.cxx
index f000080a27d9..ddf0159437b9 100644
--- a/svx/source/sdr/properties/measureproperties.cxx
+++ b/svx/source/sdr/properties/measureproperties.cxx
@@ -67,9 +67,9 @@ namespace sdr
{
}
- BaseProperties& MeasureProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> MeasureProperties::Clone(SdrObject& rObj) const
{
- return *(new MeasureProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new MeasureProperties(*this, rObj));
}
void MeasureProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/oleproperties.cxx b/svx/source/sdr/properties/oleproperties.cxx
index 634ca771b441..f740e9cc259b 100644
--- a/svx/source/sdr/properties/oleproperties.cxx
+++ b/svx/source/sdr/properties/oleproperties.cxx
@@ -42,9 +42,9 @@ namespace sdr
{
}
- BaseProperties& OleProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> OleProperties::Clone(SdrObject& rObj) const
{
- return *(new OleProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new OleProperties(*this, rObj));
}
void OleProperties::ForceDefaultAttributes()
diff --git a/svx/source/sdr/properties/pageproperties.cxx b/svx/source/sdr/properties/pageproperties.cxx
index a3a567698cee..51e11fa4c419 100644
--- a/svx/source/sdr/properties/pageproperties.cxx
+++ b/svx/source/sdr/properties/pageproperties.cxx
@@ -52,9 +52,9 @@ namespace sdr
{
}
- BaseProperties& PageProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> PageProperties::Clone(SdrObject& rObj) const
{
- return *(new PageProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new PageProperties(*this, rObj));
}
// get itemset. Override here to allow creating the empty itemset
diff --git a/svx/source/sdr/properties/rectangleproperties.cxx b/svx/source/sdr/properties/rectangleproperties.cxx
index c1d9c381737f..fa6d8b39091e 100644
--- a/svx/source/sdr/properties/rectangleproperties.cxx
+++ b/svx/source/sdr/properties/rectangleproperties.cxx
@@ -39,9 +39,9 @@ namespace sdr
{
}
- BaseProperties& RectangleProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> RectangleProperties::Clone(SdrObject& rObj) const
{
- return *(new RectangleProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new RectangleProperties(*this, rObj));
}
void RectangleProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index f6e1aba0b791..aac5e1b59a2d 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -74,9 +74,9 @@ namespace sdr
{
}
- BaseProperties& TextProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> TextProperties::Clone(SdrObject& rObj) const
{
- return *(new TextProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new TextProperties(*this, rObj));
}
void TextProperties::ItemSetChanged(const SfxItemSet& rSet)
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 9c65c42447bb..5ec98ef00b9c 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -950,7 +950,7 @@ SdrObject& SdrObject::operator=(const SdrObject& rObj)
// The Clone() method uses the local copy constructor from the individual
// sdr::properties::BaseProperties class. Since the target class maybe for another
// draw object, an SdrObject needs to be provided, as in the normal constructor.
- mpProperties.reset( &rObj.GetProperties().Clone(*this) );
+ mpProperties = rObj.GetProperties().Clone(*this);
pPage = rObj.pPage;
aOutRect=rObj.aOutRect;
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 0f733d0c6e5d..5d8484944758 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -162,7 +162,7 @@ namespace sdr
CellProperties(const CellProperties& rProps, SdrObject& rObj, sdr::table::Cell* pCell);
// Clone() operator, normally just calls the local copy constructor
- BaseProperties& Clone(SdrObject& rObj) const override;
+ std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
void ForceDefaultAttributes() override;
@@ -212,10 +212,10 @@ namespace sdr
{
}
- BaseProperties& CellProperties::Clone(SdrObject& rObj) const
+ std::unique_ptr<BaseProperties> CellProperties::Clone(SdrObject& rObj) const
{
OSL_FAIL("CellProperties::Clone(), does not work yet!");
- return *(new CellProperties(*this, rObj,nullptr));
+ return std::unique_ptr<BaseProperties>(new CellProperties(*this, rObj,nullptr));
}
void CellProperties::ForceDefaultAttributes()
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index f8b23626b281..344faa784c11 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -96,7 +96,7 @@ public:
TableProperties(const TableProperties& rProps, SdrObject& rObj );
// Clone() operator, normally just calls the local copy constructor
- BaseProperties& Clone(SdrObject& rObj) const override;
+ std::unique_ptr<BaseProperties> Clone(SdrObject& rObj) const override;
virtual void ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem = nullptr) override;
};
@@ -111,9 +111,9 @@ TableProperties::TableProperties(const TableProperties& rProps, SdrObject& rObj)
{
}
-BaseProperties& TableProperties::Clone(SdrObject& rObj) const
+std::unique_ptr<BaseProperties> TableProperties::Clone(SdrObject& rObj) const
{
- return *(new TableProperties(*this, rObj));
+ return std::unique_ptr<BaseProperties>(new TableProperties(*this, rObj));
}
void TableProperties::ItemChange(const sal_uInt16 nWhich, const SfxPoolItem* pNewItem)
More information about the Libreoffice-commits
mailing list