summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-10 20:47:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-11 05:52:11 +0100
commita2cee820e5e204058a721c59f2c5df8d8a2a3ca8 (patch)
tree95b4f6fb0fa166698d3272400dac6e3cee8b7daf
parent01b3187e0713243c8f71d58197da17ee87c4dbb5 (diff)
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.grandin@collabora.co.uk>
-rw-r--r--include/svx/shapepropertynotifier.hxx37
-rw-r--r--svx/source/unodraw/shapepropertynotifier.cxx4
2 files changed, 14 insertions, 27 deletions
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." );