include/svx/shapepropertynotifier.hxx | 37 ++++++++------------------- svx/source/unodraw/shapepropertynotifier.cxx | 4 +- 2 files changed, 14 insertions(+), 27 deletions(-)
New commits: commit a2cee820e5e204058a721c59f2c5df8d8a2a3ca8 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Feb 10 20:47:03 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Feb 11 05:52:11 2022 +0100 merge IPropertyValueProvider into PropertyValueProvider nothing directly extends IPropertyValueProvider Change-Id: Ib393bd31bde7f68d8b21dc3bdeeb30b538de1488 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129797 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/include/svx/shapepropertynotifier.hxx b/include/svx/shapepropertynotifier.hxx index e736545b5ad8..a14fd1e597a3 100644 --- a/include/svx/shapepropertynotifier.hxx +++ b/include/svx/shapepropertynotifier.hxx @@ -54,32 +54,14 @@ namespace svx LAST = TextDocAnchor }; - //= IPropertyValueProvider - - /** a provider for a property value - */ - class SVXCORE_DLLPUBLIC IPropertyValueProvider - { - public: - /** returns the name of the property which this provider is responsible for - */ - virtual const OUString & getPropertyName() const = 0; - - /** returns the current value of the property which the provider is responsible for - */ - virtual void getCurrentValue( css::uno::Any& _out_rValue ) const = 0; - - virtual ~IPropertyValueProvider(); - }; - //= PropertyValueProvider - /** default implementation of an IPropertyValueProvider + /** Default provider for a property value This default implementation queries the object which it is constructed with for the XPropertySet interface, and calls the getPropertyValue method. */ - class SVXCORE_DLLPUBLIC PropertyValueProvider :public IPropertyValueProvider + class SVXCORE_DLLPUBLIC PropertyValueProvider { public: PropertyValueProvider( ::cppu::OWeakObject& _rContext, const char* _pAsciiPropertyName ) @@ -87,9 +69,14 @@ namespace svx ,m_sPropertyName( OUString::createFromAscii( _pAsciiPropertyName ) ) { } + virtual ~PropertyValueProvider(); - virtual const OUString & getPropertyName() const override; - virtual void getCurrentValue( css::uno::Any& _out_rValue ) const override; + /** returns the name of the property which this provider is responsible for + */ + const OUString & getPropertyName() const; + /** returns the current value of the property which the provider is responsible for + */ + virtual void getCurrentValue( css::uno::Any& _out_rValue ) const; protected: ::cppu::OWeakObject& getContext() const { return m_rContext; } @@ -122,9 +109,9 @@ namespace svx void addPropertyChangeListener( const OUString& _rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener ); void removePropertyChangeListener( const OUString& _rPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& _rxListener ); - /** registers an IPropertyValueProvider + /** registers an PropertyValueProvider */ - void registerProvider( const ShapePropertyProviderId _eProperty, std::unique_ptr<IPropertyValueProvider> _rProvider ); + void registerProvider( const ShapePropertyProviderId _eProperty, std::unique_ptr<PropertyValueProvider> _rProvider ); /** notifies changes in the given property to all registered listeners @@ -142,7 +129,7 @@ namespace svx PropertyChangeNotifier& operator=(const PropertyChangeNotifier&) = delete; ::cppu::OWeakObject& m_rContext; - o3tl::enumarray<ShapePropertyProviderId, std::unique_ptr<IPropertyValueProvider>> m_aProviders; + o3tl::enumarray<ShapePropertyProviderId, std::unique_ptr<PropertyValueProvider>> m_aProviders; comphelper::OMultiTypeInterfaceContainerHelperVar3<css::beans::XPropertyChangeListener, OUString> m_aPropertyChangeListeners; }; diff --git a/svx/source/unodraw/shapepropertynotifier.cxx b/svx/source/unodraw/shapepropertynotifier.cxx index 7d1ca70c50ec..ef68a767c9c0 100644 --- a/svx/source/unodraw/shapepropertynotifier.cxx +++ b/svx/source/unodraw/shapepropertynotifier.cxx @@ -47,7 +47,7 @@ namespace svx using ::com::sun::star::lang::EventObject; using ::com::sun::star::beans::XPropertySet; - IPropertyValueProvider::~IPropertyValueProvider() + PropertyValueProvider::~PropertyValueProvider() { } @@ -76,7 +76,7 @@ namespace svx { } - void PropertyChangeNotifier::registerProvider(const ShapePropertyProviderId _eProperty, std::unique_ptr<IPropertyValueProvider> _rProvider) + void PropertyChangeNotifier::registerProvider(const ShapePropertyProviderId _eProperty, std::unique_ptr<PropertyValueProvider> _rProvider) { assert( _rProvider && "NULL factory not allowed." );