Kaydet (Commit) 5386d544 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SvxHFPage

Change-Id: I9db95c6e18002ac0b111b36d5f236550ac0af098
Reviewed-on: https://gerrit.libreoffice.org/55225Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 1649f489
......@@ -29,6 +29,7 @@
#include <svx/pagectrl.hxx>
#include <svx/svxdllapi.h>
#include <memory>
namespace svx
{
......@@ -80,7 +81,7 @@ protected:
VclPtr<PushButton> m_pBackgroundBtn;
sal_uInt16 nId;
SfxItemSet* pBBSet;
std::unique_ptr<SfxItemSet> pBBSet;
bool mbDisableQueryBox : 1;
bool mbEnableDrawingLayerFillStyles : 1;
......
......@@ -206,7 +206,7 @@ SvxHFPage::~SvxHFPage()
void SvxHFPage::dispose()
{
delete pBBSet;
pBBSet.reset();
m_pPageLbl.clear();
m_pTurnOnBox.clear();
m_pCntSharedBox.clear();
......@@ -595,13 +595,13 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void)
if(mbEnableDrawingLayerFillStyles)
{
pBBSet = new SfxItemSet(
pBBSet.reset(new SfxItemSet(
*GetItemSet().GetPool(),
{{XATTR_FILL_FIRST, XATTR_FILL_LAST}, // DrawingLayer FillStyle definitions
{SID_COLOR_TABLE, SID_PATTERN_LIST}, // XPropertyLists for Color, Gradient, Hatch and Graphic fills
{nOuter, nOuter},
{nInner, nInner},
{nShadow, nShadow}});
{nShadow, nShadow}}));
// copy items for XPropertyList entries from the DrawModel so that
// the Area TabPage can access them
......@@ -632,12 +632,12 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, Button*, void)
{
const sal_uInt16 nBrush(GetWhich(SID_ATTR_BRUSH));
pBBSet = new SfxItemSet(
pBBSet.reset( new SfxItemSet(
*GetItemSet().GetPool(),
{{nBrush, nBrush},
{nOuter, nOuter},
{nInner, nInner},
{nShadow, nShadow}});
{nShadow, nShadow}}) );
}
const SfxPoolItem* pItem;
......
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