diff options
author | Noel Grandin <noel@peralex.com> | 2021-11-06 20:58:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-07 07:29:38 +0100 |
commit | 7a61256f9e68201ef7b331ca3e1b4c3302104631 (patch) | |
tree | 42c6908cdbe521be795224fb912ca4229ba4b706 /include | |
parent | b3325ef8cdfc2c82eec34e747106f75a9fccb7e4 (diff) |
return XShape from SdrObject::getUnoShape
instead of XInterface, to make it obvious what the reality of the
requirement is
Change-Id: Icdd4113f2a0ece930305f4d8ba010b81d24f43c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124802
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svdoashp.hxx | 2 | ||||
-rw-r--r-- | include/svx/svdobj.hxx | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index bb0d3446292e..2411931e4a39 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -80,7 +80,7 @@ private: protected: virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; - virtual void impl_setUnoShape(const css::uno::Reference<css::uno::XInterface>& rxUnoShape) override; + virtual void impl_setUnoShape(const css::uno::Reference<css::drawing::XShape>& rxUnoShape) override; public: virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties() override; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index a5aa10aa7c66..fe050c0d0157 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -88,6 +88,7 @@ namespace sdr::properties { class BaseProperties; } namespace sdr::contact { class ViewContact; } namespace svx { class PropertyChangeNotifier; } +namespace com::sun::star::drawing { class XShape; } struct SVXCORE_DLLPUBLIC SdrObjectFreeOp; @@ -768,7 +769,7 @@ public: void DeleteUserData(sal_uInt16 nNum); // access to the UNO representation of the shape - virtual css::uno::Reference< css::uno::XInterface > getUnoShape(); + virtual css::uno::Reference< css::drawing::XShape > getUnoShape(); static SdrObject* getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt ); @@ -861,9 +862,9 @@ public: // done by impl_setUnoShape(). // Calling this function is only allowed for the UNO representation // itself! - void setUnoShape( const css::uno::Reference<css::uno::XInterface>& _rxUnoShape); + void setUnoShape( const css::uno::Reference<css::drawing::XShape>& _rxUnoShape); - const css::uno::WeakReference< css::uno::XInterface >& getWeakUnoShape() const { return maWeakUnoShape; } + const css::uno::WeakReference< css::drawing::XShape >& getWeakUnoShape() const { return maWeakUnoShape; } void setSuitableOutlinerBg(Outliner& rOutliner) const; // If fillstyle is drawing::FillStyle_BITMAP, returns the graphic. @@ -944,7 +945,7 @@ protected: /// /// The implementation _must_ call the same method of its parent /// class (preferably as the first step)! - virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& _rxUnoShape ); + virtual void impl_setUnoShape( const css::uno::Reference< css::drawing::XShape >& _rxUnoShape ); const SfxItemSet* getBackgroundFillSet() const; @@ -970,7 +971,7 @@ private: // do not use directly, always use getSvxShape() if you have to! SvxShape* mpSvxShape; - css::uno::WeakReference< css::uno::XInterface > + css::uno::WeakReference< css::drawing::XShape > maWeakUnoShape; // HACK: Do not automatically insert newly created object into a page. // The user needs to do it manually later. |