summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-10 16:02:48 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-10 17:20:19 +0100
commit1db6e8b7760de1abd49d62df230d89480ffd2161 (patch)
treeccb333ec77da8438204da6076705c966b16ff225 /svx
parent2d36e7f5186ba5215f2b228b98c24520bd4f2882 (diff)
no need to use shared_ptr in PropertyChangeNotifier
these things are never shared Change-Id: I21c3b7cf2abf6e47a8839ac60e7bf27b7282ed76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/unodraw/shapepropertynotifier.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx
index 9151190c0cda..6b2262e044f1 100644
--- a/svx/source/unodraw/shapepropertynotifier.cxx
+++ b/svx/source/unodraw/shapepropertynotifier.cxx
@@ -76,14 +76,14 @@ namespace svx
{
}
- void PropertyChangeNotifier::registerProvider(const ShapeProperty _eProperty, const std::shared_ptr<IPropertyValueProvider>& _rProvider)
+ void PropertyChangeNotifier::registerProvider(const ShapeProperty _eProperty, std::unique_ptr<IPropertyValueProvider> _rProvider)
{
ENSURE_OR_THROW( !!_rProvider, "NULL factory not allowed." );
OSL_ENSURE( m_aProviders.find( _eProperty ) == m_aProviders.end(),
"PropertyChangeNotifier::registerProvider: factory for this ID already present!" );
- m_aProviders[ _eProperty ] = _rProvider;
+ m_aProviders.emplace( _eProperty, std::move(_rProvider));
}
void PropertyChangeNotifier::notifyPropertyChange( const ShapeProperty _eProperty ) const
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 4081e4d8128f..cb0aa12afd9a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -325,9 +325,9 @@ svx::PropertyChangeNotifier& SvxShape::getShapePropertyChangeNotifier()
void SvxShape::impl_construct()
{
mpImpl->maPropertyNotifier.registerProvider( svx::ShapeProperty::Position,
- std::make_shared<ShapePositionProvider>( *mpImpl ) );
+ std::make_unique<ShapePositionProvider>( *mpImpl ) );
mpImpl->maPropertyNotifier.registerProvider( svx::ShapeProperty::Size,
- std::make_shared<ShapeSizeProvider>( *mpImpl ) );
+ std::make_unique<ShapeSizeProvider>( *mpImpl ) );
if ( HasSdrObject() )
{