diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-19 14:33:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-20 10:21:07 +0100 |
commit | 7d7d4cf217e82db8839dbc49dcab1ab72c203b4e (patch) | |
tree | 02bf7659d9bb3fce41a54407ea890313ad9d6a30 /sw/inc | |
parent | 6aecd49aa6de7c7f65c3c240ee3b7db36497df4d (diff) |
loplugin:refcounting in sw
Change-Id: I56f2f5aa4d9105e93f28701b8352d1fb97829ead
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111215
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/SwSmartTagMgr.hxx | 3 | ||||
-rw-r--r-- | sw/inc/unodraw.hxx | 3 | ||||
-rw-r--r-- | sw/inc/unotbl.hxx | 2 | ||||
-rw-r--r-- | sw/inc/unotxdoc.hxx | 6 |
4 files changed, 6 insertions, 8 deletions
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx index e6d60c530f84..f1c254f93e45 100644 --- a/sw/inc/SwSmartTagMgr.hxx +++ b/sw/inc/SwSmartTagMgr.hxx @@ -21,12 +21,13 @@ #define INCLUDED_SW_INC_SWSMARTTAGMGR_HXX #include <svx/SmartTagMgr.hxx> +#include <rtl/ref.hxx> // Wrapper for the svx SmartTagMgr class SwSmartTagMgr final : public SmartTagMgr { private: - static SwSmartTagMgr* spTheSwSmartTagMgr; + static rtl::Reference<SwSmartTagMgr> spTheSwSmartTagMgr; SwSmartTagMgr(const OUString& rModuleName); virtual ~SwSmartTagMgr() override; diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index 22ddffda5881..e9e69318cdea 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -80,8 +80,7 @@ SwXDrawPageBaseClass; class SwXDrawPage final : public SwXDrawPageBaseClass { SwDoc* m_pDoc; - css::uno::Reference< css::uno::XAggregation > m_xPageAgg; - SwFmDrawPage* m_pDrawPage; + rtl::Reference<SwFmDrawPage> m_pDrawPage; public: SwXDrawPage(SwDoc* pDoc); virtual ~SwXDrawPage() override; diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 7ec4121a9ad8..e7d9a224e259 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -141,7 +141,7 @@ public: virtual sal_Bool SAL_CALL hasElements( ) override; SwTableBox* GetTableBox() const { return m_pBox; } - static SwXCell* CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable = nullptr ); + static rtl::Reference<SwXCell> CreateXCell(SwFrameFormat* pTableFormat, SwTableBox* pBox, SwTable *pTable = nullptr ); SwTableBox* FindBox(SwTable* pTable, SwTableBox* pBox); SwFrameFormat* GetFrameFormat() const { return m_pTableFormat; } double GetForcedNumericalValue() const; diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 48f49a2694b7..df6309d7125e 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -146,11 +146,9 @@ private: SwDocShell* m_pDocShell; bool m_bObjectValid; - SwXDrawPage* m_pDrawPage; - css::uno::Reference< css::drawing::XDrawPage > mxXDrawPage; + rtl::Reference<SwXDrawPage> m_xDrawPage; - css::uno::Reference< css::text::XText > m_xBodyText; - SwXBodyText* m_pBodyText; + rtl::Reference<SwXBodyText> m_xBodyText; css::uno::Reference< css::uno::XAggregation > m_xNumFormatAgg; css::uno::Reference< css::container::XIndexAccess > mxXNumberingRules; |