summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-23 10:55:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-23 10:56:06 +0200
commitabc42b3ea4e79581f4567420f2ed4320f5f2eb9e (patch)
treee45f9e7f9e4f368015aa47f4e7056aa9319582ab /svx
parent116fa3a3d2e0b9652b3848bb49a5c1c2ecc570ae (diff)
use rtl::Reference in SvxPixelCtl
instead of storing both a raw pointer and an uno::Reference Change-Id: Ie9de5664452545a2a529f753e314aa4678c166fb
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 2fafd853b05f..42bde26b4155 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -743,9 +743,9 @@ css::uno::Reference< css::accessibility::XAccessible > SvxPixelCtl::CreateAccess
{
if(!m_xAccess.is())
{
- m_xAccess = m_pAccess = new SvxPixelCtlAccessible(*this);
+ m_xAccess = new SvxPixelCtlAccessible(*this);
}
- return m_xAccess;
+ return m_xAccess.get();
}
//Logic Pixel
@@ -813,7 +813,6 @@ SvxPixelCtl::SvxPixelCtl(vcl::Window* pParent, sal_uInt16 nNumber)
nSquares = nLines * nLines;
pPixel = new sal_uInt16[ nSquares ];
memset(pPixel, 0, nSquares * sizeof(sal_uInt16));
- m_pAccess=nullptr;
}
void SvxPixelCtl::Resize()
@@ -865,9 +864,9 @@ void SvxPixelCtl::MouseButtonDown( const MouseEvent& rMEvt )
long nIndex = ShowPosition(rMEvt.GetPosPixel());
- if(m_pAccess)
+ if(m_xAccess.is())
{
- m_pAccess->NotifyChild(nIndex,true, true);
+ m_xAccess->NotifyChild(nIndex,true, true);
}
}
@@ -1015,11 +1014,11 @@ void SvxPixelCtl::KeyInput( const KeyEvent& rKEvt )
case KEY_DOWN:
if (bFocusPosChanged)
{
- m_pAccess->NotifyChild(nIndex,false,false);
+ m_xAccess->NotifyChild(nIndex,false,false);
}
break;
case KEY_SPACE:
- m_pAccess->NotifyChild(nIndex,false,true);
+ m_xAccess->NotifyChild(nIndex,false,true);
break;
default:
break;
@@ -1037,9 +1036,9 @@ void SvxPixelCtl::GetFocus()
{
Invalidate(implCalFocusRect(aFocusPosition));
- if(m_pAccess)
+ if(m_xAccess.is())
{
- m_pAccess->NotifyChild(GetFocusPosIndex(),true,false);
+ m_xAccess->NotifyChild(GetFocusPosIndex(),true,false);
}
Control::GetFocus();
@@ -1049,9 +1048,9 @@ void SvxPixelCtl::GetFocus()
void SvxPixelCtl::LoseFocus()
{
HideFocus();
- if (m_pAccess)
+ if (m_xAccess.is())
{
- m_pAccess->LoseFocus();
+ m_xAccess->LoseFocus();
}
Control::LoseFocus();
}