summaryrefslogtreecommitdiff
path: root/svx/source/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-07 14:45:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-10 08:51:52 +0200
commit67af00a76a3bb86790447e2b223b03c5dddacc4a (patch)
tree0000760e720b469c581bab1c82974e51b3e9f52d /svx/source/accessibility
parentdc6f945f9ff7459a18e4d67af4899c57d58bf030 (diff)
new loplugin:inlinefields
look for fields which can be declared inline in the parent class. start with some likely candidates in svx Change-Id: I56cdca273272b72bb728ed2e3f5e1e976f8c7c32 Reviewed-on: https://gerrit.libreoffice.org/36262 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/accessibility')
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx8
-rw-r--r--svx/source/accessibility/svxrectctaccessiblecontext.cxx8
2 files changed, 6 insertions, 10 deletions
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index c93a67537432..31f509a11852 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -530,7 +530,7 @@ SvxPixelCtlAccessibleChild::SvxPixelCtlAccessibleChild(
mrParentWindow( rWindow ),
mxParent(rxParent),
m_bPixelColorOrBG(bPixelColorOrBG),
- mpBoundingBox( new tools::Rectangle( rBoundingBox ) ),
+ maBoundingBox( rBoundingBox ),
mnIndexInParent( nIndexInParent ),
mnClientId( 0 )
{
@@ -771,8 +771,6 @@ void SAL_CALL SvxPixelCtlAccessibleChild::disposing()
}
mxParent.clear();
-
- delete mpBoundingBox;
}
}
@@ -794,10 +792,10 @@ tools::Rectangle SvxPixelCtlAccessibleChild::GetBoundingBoxOnScreen()
tools::Rectangle const & SvxPixelCtlAccessibleChild::GetBoundingBox()
{
- // no guard necessary, because no one changes mpBoundingBox after creating it
+ // no guard necessary, because no one changes maBoundingBox after creating it
ThrowExceptionIfNotAlive();
- return *mpBoundingBox;
+ return maBoundingBox;
}
OUString SvxPixelCtlAccessibleChild::GetName()
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 2f474038dacc..0b091932c1d1 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -660,7 +660,7 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext(
msDescription( rDescription ),
msName( rName ),
mxParent(rxParent),
- mpBoundingBox( new tools::Rectangle( rBoundingBox ) ),
+ maBoundingBox( rBoundingBox ),
mrParentWindow( rParentWindow ),
mnClientId( 0 ),
mnIndexInParent( nIndexInParent ),
@@ -986,8 +986,6 @@ void SAL_CALL SvxRectCtlChildAccessibleContext::disposing()
}
mxParent.clear();
-
- delete mpBoundingBox;
}
}
@@ -1009,10 +1007,10 @@ tools::Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBoxOnScreen()
tools::Rectangle const & SvxRectCtlChildAccessibleContext::GetBoundingBox()
{
- // no guard necessary, because no one changes mpBoundingBox after creating it
+ // no guard necessary, because no one changes maBoundingBox after creating it
ThrowExceptionIfNotAlive();
- return *mpBoundingBox;
+ return maBoundingBox;
}
void SvxRectCtlChildAccessibleContext::setStateChecked( bool bChecked )