diff options
author | Noel Grandin <noel@peralex.com> | 2016-06-01 16:22:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-06 07:01:34 +0000 |
commit | 0323253a7c67316cb96e4a64792ab4fe74aac1ca (patch) | |
tree | 81787c4ae44ff778aa41e12574cd60a624c9277b /sc/inc | |
parent | 4d666f5092d7c4f2ece9702dda4d874e44cdc6f7 (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 'sc/inc')
-rw-r--r-- | sc/inc/datauno.hxx | 7 | ||||
-rw-r--r-- | sc/inc/dptabsrc.hxx | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sc/inc/datauno.hxx b/sc/inc/datauno.hxx index cbaebc7514a9..69a0bc6ea934 100644 --- a/sc/inc/datauno.hxx +++ b/sc/inc/datauno.hxx @@ -44,6 +44,7 @@ #include <com/sun/star/container/XNamed.hpp> #include <com/sun/star/util/XRefreshable.hpp> #include <cppuhelper/implbase.hxx> +#include <rtl/ref.hxx> #include <svl/itemprop.hxx> #include <svl/lstner.hxx> @@ -222,7 +223,7 @@ public: class ScRangeSubTotalDescriptor : public ScSubTotalDescriptorBase { private: - ScDatabaseRangeObj* pParent; + rtl::Reference<ScDatabaseRangeObj> mxParent; public: ScRangeSubTotalDescriptor(ScDatabaseRangeObj* pPar); @@ -435,7 +436,7 @@ public: class ScRangeFilterDescriptor : public ScFilterDescriptorBase { private: - ScDatabaseRangeObj* pParent; + rtl::Reference<ScDatabaseRangeObj> mxParent; public: ScRangeFilterDescriptor(ScDocShell* pDocSh, ScDatabaseRangeObj* pPar); @@ -451,7 +452,7 @@ public: class ScDataPilotFilterDescriptor : public ScFilterDescriptorBase { private: - ScDataPilotDescriptorBase* pParent; + rtl::Reference<ScDataPilotDescriptorBase> mxParent; public: ScDataPilotFilterDescriptor(ScDocShell* pDocSh, ScDataPilotDescriptorBase* pPar); diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 035ba282ef9d..e3ea1d3479e8 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -307,7 +307,7 @@ class ScDPDimension : public cppu::WeakImplHelper< { ScDPSource* pSource; long nDim; // dimension index (== column ID) - ScDPHierarchies* pHierarchies; + rtl::Reference<ScDPHierarchies> mxHierarchies; long nUsedHier; sal_uInt16 nFunction; // enum GeneralFunction OUString aName; // if empty, take from source @@ -459,7 +459,7 @@ private: ScDPSource* pSource; long nDim; long nHier; - ScDPLevels* pLevels; + rtl::Reference<ScDPLevels> mxLevels; public: ScDPHierarchy( ScDPSource* pSrc, long nD, long nH ); @@ -539,7 +539,7 @@ private: long nDim; long nHier; long nLev; - ScDPMembers* pMembers; + rtl::Reference<ScDPMembers> mxMembers; css::uno::Sequence<css::sheet::GeneralFunction> aSubTotals; css::sheet::DataPilotFieldSortInfo aSortInfo; // stored user settings css::sheet::DataPilotFieldAutoShowInfo aAutoShowInfo; // stored user settings |