summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-05-31 10:57:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-04 08:40:27 +0200
commit4f2d47bb9a0a66ed37b5364fbdf4cfe902864c5a (patch)
treec6976086fe0f21027ffcbd74e73a6b7f3e7bf409 /svx
parent3a83f9726044dac1e1f211ab1c5a33d8fe4cbc0b (diff)
loplugin:useuniqueptr in RectCtl
Change-Id: I8d0e4decdd607479e9cc9491d6dae769622a6c26 Reviewed-on: https://gerrit.libreoffice.org/55230 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 16f6eed39600..a5a93dde36c6 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -650,8 +650,7 @@ void RectCtl::SetControlSettings(RectPoint eRpt, sal_uInt16 nBorder)
RectCtl::~RectCtl()
{
- delete pBitmap;
-
+ pBitmap.reset();
pAccContext.clear();
}
@@ -682,12 +681,12 @@ void RectCtl::Resize_Impl()
void RectCtl::InitRectBitmap()
{
- delete pBitmap;
+ pBitmap.reset();
const StyleSettings& rStyles = Application::GetSettings().GetStyleSettings();
svtools::ColorConfig aColorConfig;
- pBitmap = new BitmapEx(RID_SVXCTRL_RECTBTNS);
+ pBitmap.reset(new BitmapEx(RID_SVXCTRL_RECTBTNS));
// set bitmap-colors
Color aColorAry1[7];
@@ -729,8 +728,7 @@ void RectCtl::InitRectBitmap()
void RectCtl::StyleUpdated()
{
- delete pBitmap;
- pBitmap = nullptr; // forces new creating of bitmap
+ pBitmap.reset(); // forces new creating of bitmap
CustomWidgetController::StyleUpdated();
}