From 7d1b01070c330d45212cd69ea692b2263c23c2a6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 2 Jun 2016 14:53:50 +0200 Subject: remove some manual ref counting in svx and xmloff Change-Id: Ica0b6ff8ff7fa9e65cd758160d6e3ea7110ebb46 Reviewed-on: https://gerrit.libreoffice.org/25824 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/svx/AccessibleControlShape.hxx | 2 +- include/svx/dlgctrl.hxx | 2 +- include/svx/fmshell.hxx | 4 ++-- include/svx/fmtools.hxx | 5 +++-- include/svx/fmview.hxx | 4 ++-- include/svx/graphctl.hxx | 2 +- include/svx/gridctrl.hxx | 2 +- include/svx/svdmodel.hxx | 4 ++-- include/svx/svdotable.hxx | 2 +- include/svx/unoshtxt.hxx | 5 +++-- 10 files changed, 17 insertions(+), 15 deletions(-) (limited to 'include/svx') diff --git a/include/svx/AccessibleControlShape.hxx b/include/svx/AccessibleControlShape.hxx index c419d22c1282..d2c2ec05c6b5 100644 --- a/include/svx/AccessibleControlShape.hxx +++ b/include/svx/AccessibleControlShape.hxx @@ -183,7 +183,7 @@ private: css::uno::Reference< css::lang::XComponent > m_xControlContextComponent; // cached interface of our aggregate - ::comphelper::OWrappedAccessibleChildrenManager* + rtl::Reference<::comphelper::OWrappedAccessibleChildrenManager> m_pChildManager; bool m_bListeningForName : 1; // are we currently listening for changes of the "Name" property? diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx index 45d600c84bf2..2e6aa4c72aed 100644 --- a/include/svx/dlgctrl.hxx +++ b/include/svx/dlgctrl.hxx @@ -78,7 +78,7 @@ private: SVX_DLLPRIVATE void Resize_Impl(); protected: - SvxRectCtlAccessibleContext* pAccContext; + rtl::Reference pAccContext; sal_uInt16 nBorderWidth; sal_uInt16 nRadius; Size aSize; diff --git a/include/svx/fmshell.hxx b/include/svx/fmshell.hxx index 8f4d656397fc..38b8c341fcfe 100644 --- a/include/svx/fmshell.hxx +++ b/include/svx/fmshell.hxx @@ -71,7 +71,7 @@ class SVX_DLLPUBLIC FmFormShell : public SfxShell friend class FmFormView; friend class FmXFormShell; - FmXFormShell* m_pImpl; + rtl::Reference m_pImpl; FmFormView* m_pFormView; FmFormModel* m_pFormModel; @@ -113,7 +113,7 @@ public: FmFormView* GetFormView() const { return m_pFormView; } FmFormModel* GetFormModel() const { return m_pFormModel; } FmFormPage* GetCurPage() const; - FmXFormShell* GetImpl() const {return m_pImpl;}; + FmXFormShell* GetImpl() const {return m_pImpl.get();}; bool PrepareClose(bool bUI = true); diff --git a/include/svx/fmtools.hxx b/include/svx/fmtools.hxx index bd7696a4049c..e122243d4ac2 100644 --- a/include/svx/fmtools.hxx +++ b/include/svx/fmtools.hxx @@ -62,6 +62,7 @@ #include #include +#include #include #include #include @@ -156,11 +157,11 @@ class SAL_WARN_UNUSED FmXDisposeListener { friend class FmXDisposeMultiplexer; - FmXDisposeMultiplexer* m_pAdapter; + rtl::Reference m_pAdapter; ::osl::Mutex& m_rMutex; public: - FmXDisposeListener(::osl::Mutex& _rMutex) : m_pAdapter(nullptr), m_rMutex(_rMutex) { } + FmXDisposeListener(::osl::Mutex& _rMutex) : m_rMutex(_rMutex) { } virtual ~FmXDisposeListener(); virtual void disposing(const css::lang::EventObject& _rEvent, sal_Int16 _nId) throw( css::uno::RuntimeException ) = 0; diff --git a/include/svx/fmview.hxx b/include/svx/fmview.hxx index dff8ce80cb68..ed6e2644e9a0 100644 --- a/include/svx/fmview.hxx +++ b/include/svx/fmview.hxx @@ -55,7 +55,7 @@ namespace com { namespace sun { namespace star { namespace form { class SVX_DLLPUBLIC FmFormView : public E3dView { - FmXFormView* pImpl; + rtl::Reference pImpl; FmFormShell* pFormShell; void Init(); @@ -130,7 +130,7 @@ public: SVX_DLLPRIVATE void ChangeDesignMode(bool bDesign); - SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl; } + SVX_DLLPRIVATE FmXFormView* GetImpl() const { return pImpl.get(); } SVX_DLLPRIVATE FmFormShell* GetFormShell() const { return pFormShell; } struct FormShellAccess { friend class FmFormShell; private: FormShellAccess() { } }; diff --git a/include/svx/graphctl.hxx b/include/svx/graphctl.hxx index cf44b1cf63ac..3416a351a0b8 100644 --- a/include/svx/graphctl.hxx +++ b/include/svx/graphctl.hxx @@ -55,7 +55,7 @@ class SVX_DLLPUBLIC GraphCtrl : public Control DECL_LINK_TYPED( UpdateHdl, Idle*, void ); - SvxGraphCtrlAccessibleContext* mpAccContext; + rtl::Reference mpAccContext; protected: diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index d23b7d0c5578..2f3c409a546a 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -237,7 +237,7 @@ private: // if we modify the row for the new record, we automatically insert a "new new row". // But if somebody else inserts a new record into the data source, we have to do the same. // For that reason we have to listen to some properties of our data source. - ::comphelper::OPropertyChangeMultiplexer* m_pDataSourcePropMultiplexer; + rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_pDataSourcePropMultiplexer; FmXGridSourcePropListener* m_pDataSourcePropListener; css::uno::Reference< css::sdb::XRowsChangeListener> m_xRowSetListener; // get notification when rows were changed diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index d90671311e76..65889f4569eb 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -220,7 +220,7 @@ private: public: sal_uInt16 nStarDrawPreviewMasterPageNum; - SvxForbiddenCharactersTable* mpForbiddenCharactersTable; + rtl::Reference mpForbiddenCharactersTable; SdrSwapGraphicsMode nSwapGraphicsMode; SdrOutlinerCache* mpOutlinerCache; @@ -567,7 +567,7 @@ public: void setLock( bool bLock ); void SetForbiddenCharsTable( const rtl::Reference& xForbiddenChars ); - rtl::Reference GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;} + const rtl::Reference& GetForbiddenCharsTable() const { return mpForbiddenCharactersTable;} void SetCharCompressType( sal_uInt16 nType ); sal_uInt16 GetCharCompressType() const { return mnCharCompressType; } diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 5747e2bf3dde..e561f6d8e600 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -303,7 +303,7 @@ private: Rectangle maLogicRect; private: - SdrTableObjImpl* mpImpl; + rtl::Reference mpImpl; }; diff --git a/include/svx/unoshtxt.hxx b/include/svx/unoshtxt.hxx index 50d8cf8e80ed..f9163141b9f9 100644 --- a/include/svx/unoshtxt.hxx +++ b/include/svx/unoshtxt.hxx @@ -52,7 +52,8 @@ public: The window is necessary, since our views can display on multiple windows */ SvxTextEditSource( SdrObject& rObj, SdrText* pText, SdrView& rView, const vcl::Window& rViewWindow ); - + SvxTextEditSource(const SvxTextEditSource&) = delete; + SvxTextEditSource& operator=(const SvxTextEditSource&) = delete; virtual ~SvxTextEditSource(); virtual SvxEditSource* Clone() const override; @@ -83,7 +84,7 @@ public: private: SVX_DLLPRIVATE SvxTextEditSource( SvxTextEditSourceImpl* pImpl ); - SvxTextEditSourceImpl* mpImpl; + rtl::Reference mpImpl; }; #endif -- cgit