summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-20 15:02:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-23 07:56:34 +0200
commit6f1123d3ddd6108f486964182f92854db9a13a7e (patch)
tree37997f8b08a33bef98a771997fb6712a97761459 /svtools
parentbbd8c94967a4d227be46c1e777efd5b4bcf95429 (diff)
use rtl::Reference in Ruler
instead of manual acquire/release Change-Id: I7815a0a3c01fce57b4798ac1dbf501e20444c61d
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/control/ruler.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 25fa30af1422..0981bc1b331e 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -283,7 +283,6 @@ void Ruler::ImplInit( WinBits nWinBits )
aDefSize.Width() = nDefHeight;
SetOutputSizePixel( aDefSize );
SetType(WINDOW_RULER);
- pAccContext = nullptr;
}
Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) :
@@ -334,11 +333,7 @@ void Ruler::dispose()
mpSaveData = nullptr;
delete mpDragData;
mpDragData = nullptr;
- if( pAccContext )
- {
- pAccContext->release();
- pAccContext = nullptr;
- }
+ mxAccContext.clear();
Window::dispose();
}
@@ -2827,10 +2822,9 @@ uno::Reference< XAccessible > Ruler::CreateAccessible()
{
aStr = SvtResId(STR_SVT_ACC_RULER_VERT_NAME);
}
- pAccContext = new SvtRulerAccessible( xAccParent, *this, aStr );
- pAccContext->acquire();
- this->SetAccessible(pAccContext);
- return pAccContext;
+ mxAccContext = new SvtRulerAccessible( xAccParent, *this, aStr );
+ this->SetAccessible(mxAccContext.get());
+ return mxAccContext.get();
}
else
return uno::Reference< XAccessible >();