Kaydet (Commit) 4f2d47bb authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in RectCtl

Change-Id: I8d0e4decdd607479e9cc9491d6dae769622a6c26
Reviewed-on: https://gerrit.libreoffice.org/55230Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 3a83f972
......@@ -165,7 +165,7 @@ protected:
Point aPtLB, aPtMB, aPtRB;
Point aPtNew;
RectPoint eRP, eDefRP;
BitmapEx* pBitmap;
std::unique_ptr<BitmapEx> pBitmap;
CTL_STATE m_nState;
bool mbCompleteDisable : 1;
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment