summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-01 16:22:29 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-06 07:01:34 +0000
commit0323253a7c67316cb96e4a64792ab4fe74aac1ca (patch)
tree81787c4ae44ff778aa41e12574cd60a624c9277b /include
parent4d666f5092d7c4f2ece9702dda4d874e44cdc6f7 (diff)
remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and then release() in the destructor. found mostly by git grep -n -B5 -e '->release()' Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f Reviewed-on: https://gerrit.libreoffice.org/25806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/comphelper/accessiblewrapper.hxx3
-rw-r--r--include/framework/interaction.hxx3
-rw-r--r--include/sfx2/brokenpackageint.hxx9
-rw-r--r--include/ucbhelper/proxydecider.hxx3
4 files changed, 13 insertions, 5 deletions
diff --git a/include/comphelper/accessiblewrapper.hxx b/include/comphelper/accessiblewrapper.hxx
index 3b808724f933..f1efb09c8ca0 100644
--- a/include/comphelper/accessiblewrapper.hxx
+++ b/include/comphelper/accessiblewrapper.hxx
@@ -40,6 +40,7 @@
#include <comphelper/accessibleeventnotifier.hxx>
#include <comphelper/stl_types.hxx>
#include <comphelper/comphelperdllapi.h>
+#include <rtl/ref.hxx>
namespace comphelper
@@ -156,7 +157,7 @@ namespace comphelper
css::uno::Reference< css::accessibility::XAccessible >
m_xParentAccessible;
- OWrappedAccessibleChildrenManager* m_pChildMapper; // for mapping children from our inner context to our callers
+ rtl::Reference<OWrappedAccessibleChildrenManager> m_xChildMapper; // for mapping children from our inner context to our callers
protected:
/** ctor
diff --git a/include/framework/interaction.hxx b/include/framework/interaction.hxx
index 6858a044df81..7f9389fadaa6 100644
--- a/include/framework/interaction.hxx
+++ b/include/framework/interaction.hxx
@@ -32,6 +32,7 @@
#include <rtl/ref.hxx>
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <framework/fwedllapi.h>
@@ -61,7 +62,7 @@ namespace framework{
class RequestFilterSelect_Impl;
class FWE_DLLPUBLIC RequestFilterSelect
{
- rtl::Reference<RequestFilterSelect_Impl> pImpl;
+ rtl::Reference<RequestFilterSelect_Impl> mxImpl;
public:
RequestFilterSelect( const OUString& sURL );
diff --git a/include/sfx2/brokenpackageint.hxx b/include/sfx2/brokenpackageint.hxx
index 68cb33022608..64f624696bb3 100644
--- a/include/sfx2/brokenpackageint.hxx
+++ b/include/sfx2/brokenpackageint.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_SFX2_BROKENPACKAGEINT_HXX
#include <sal/config.h>
+#include <rtl/ref.hxx>
#include <sfx2/dllapi.h>
#include <com/sun/star/document/BrokenPackageRequest.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
@@ -29,10 +30,12 @@
class RequestPackageReparation_Impl;
class SFX2_DLLPUBLIC RequestPackageReparation
{
- RequestPackageReparation_Impl* pImp;
+ rtl::Reference<RequestPackageReparation_Impl> mxImpl;
public:
RequestPackageReparation( const OUString& aName );
~RequestPackageReparation();
+ RequestPackageReparation( const RequestPackageReparation&) = delete;
+ RequestPackageReparation& operator=( const RequestPackageReparation&) = delete;
bool isApproved();
css::uno::Reference < css::task::XInteractionRequest > GetRequest();
};
@@ -40,10 +43,12 @@ public:
class NotifyBrokenPackage_Impl;
class SFX2_DLLPUBLIC NotifyBrokenPackage
{
- NotifyBrokenPackage_Impl* pImp;
+ rtl::Reference<NotifyBrokenPackage_Impl> mxImpl;
public:
NotifyBrokenPackage( const OUString& aName );
~NotifyBrokenPackage();
+ NotifyBrokenPackage( const NotifyBrokenPackage&) = delete;
+ NotifyBrokenPackage& operator=( const NotifyBrokenPackage&) = delete;
css::uno::Reference < css::task::XInteractionRequest > GetRequest();
};
diff --git a/include/ucbhelper/proxydecider.hxx b/include/ucbhelper/proxydecider.hxx
index aa19d483fcc9..0ee4400a1392 100644
--- a/include/ucbhelper/proxydecider.hxx
+++ b/include/ucbhelper/proxydecider.hxx
@@ -21,6 +21,7 @@
#define INCLUDED_UCBHELPER_PROXYDECIDER_HXX
#include <rtl/ustring.hxx>
+#include <rtl/ref.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <ucbhelper/ucbhelperdllapi.h>
@@ -127,7 +128,7 @@ public:
sal_Int32 nPort ) const;
private:
- proxydecider_impl::InternetProxyDecider_Impl * m_pImpl;
+ rtl::Reference<proxydecider_impl::InternetProxyDecider_Impl> m_xImpl;
};
} // namespace ucbhelper