summaryrefslogtreecommitdiffstats
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-06 11:42:41 +0200
committerNoel Grandin <noel@peralex.com>2015-10-07 08:27:25 +0200
commit2b57de8bb0064be828265bf08805b1bc345e62bf (patch)
tree3d00a7b49de50ba04e60c73d51d9ed46c257270d /chart2
parenteliminate typedef only being used once (diff)
downloadcore-2b57de8bb0064be828265bf08805b1bc345e62bf.tar.gz
core-2b57de8bb0064be828265bf08805b1bc345e62bf.zip
remove another custom refcounting base class
Change-Id: Icd8a8d79da0ada68e9ee869c3c2a7b93db5b2733
Diffstat (limited to 'chart2')
-rw-r--r--chart2/Library_chartcontroller.mk1
-rw-r--r--chart2/source/controller/inc/ChartController.hxx12
-rw-r--r--chart2/source/controller/main/ChartController.cxx18
3 files changed, 2 insertions, 29 deletions
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 9f8b65f8045f..080eef3caa83 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\
drawinglayer \
editeng \
sal \
+ salhelper \
i18nlangtag \
sfx \
sot \
diff --git a/chart2/source/controller/inc/ChartController.hxx b/chart2/source/controller/inc/ChartController.hxx
index cdb23aa9133c..59a374100fb6 100644
--- a/chart2/source/controller/inc/ChartController.hxx
+++ b/chart2/source/controller/inc/ChartController.hxx
@@ -447,17 +447,7 @@ private:
private:
class TheModelRef;
friend class ChartController::TheModelRef;
- class RefCountable
- {
- public:
- RefCountable();
- virtual ~RefCountable();
- void acquire();
- void release();
- private:
- sal_Int32 m_nRefCount;
- };
- class TheModel : public RefCountable
+ class TheModel : public salhelper::SimpleReferenceObject
{
public:
explicit TheModel( const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 045837e7ccfd..8b1654393023 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -131,24 +131,6 @@ ChartController::~ChartController()
stopDoubleClickWaiting();
}
-ChartController::RefCountable::RefCountable() : m_nRefCount(0)
-{
-}
-
-ChartController::RefCountable::~RefCountable()
-{
-}
-void ChartController::RefCountable::acquire()
-{
- m_nRefCount++;
-}
-void ChartController::RefCountable::release()
-{
- m_nRefCount--;
- if(!m_nRefCount)
- delete this;
-}
-
ChartController::TheModel::TheModel( const uno::Reference< frame::XModel > & xModel ) :
m_xModel( xModel ),
m_xCloseable( NULL ),