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

loplugin:useuniqueptr in Svx3DWin

Change-Id: I529a486b7b60306293089b776202810f84ab0126
Reviewed-on: https://gerrit.libreoffice.org/55516Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst b2c9f004
......@@ -170,14 +170,14 @@ private:
ViewType3D eViewType;
// Model, Page, View etc. for favourites
FmFormModel* pModel;
std::unique_ptr<FmFormModel> pModel;
VclPtr<VirtualDevice> pVDev;
SfxBindings* pBindings;
Svx3DCtrlItem* pControllerItem;
std::unique_ptr<Svx3DCtrlItem> pControllerItem;
SvxConvertTo3DItem* pConvertTo3DItem;
SvxConvertTo3DItem* pConvertTo3DLatheItem;
std::unique_ptr<SvxConvertTo3DItem> pConvertTo3DItem;
std::unique_ptr<SvxConvertTo3DItem> pConvertTo3DLatheItem;
std::unique_ptr<Svx3DWinImpl> mpImpl;
MapUnit ePoolUnit;
......
......@@ -212,9 +212,9 @@ Svx3DWin::Svx3DWin(SfxBindings* pInBindings, SfxChildWindow *pCW, vcl::Window* p
m_pMtrDistance->SetUnit( eFUnit );
m_pMtrFocalLength->SetUnit( eFUnit );
pControllerItem = new Svx3DCtrlItem(SID_3D_STATE, pBindings);
pConvertTo3DItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings);
pConvertTo3DLatheItem = new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings);
pControllerItem.reset( new Svx3DCtrlItem(SID_3D_STATE, pBindings) );
pConvertTo3DItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D, pBindings) );
pConvertTo3DLatheItem.reset( new SvxConvertTo3DItem(SID_CONVERT_TO_3D_LATHE_FAST, pBindings) );
m_pBtnAssign->SetClickHdl( LINK( this, Svx3DWin, ClickAssignHdl ) );
m_pBtnUpdate->SetClickHdl( LINK( this, Svx3DWin, ClickUpdateHdl ) );
......@@ -330,11 +330,11 @@ Svx3DWin::~Svx3DWin()
void Svx3DWin::dispose()
{
pVDev.disposeAndClear();
delete pModel;
pModel.reset();
DELETEZ( pControllerItem );
DELETEZ( pConvertTo3DItem );
DELETEZ( pConvertTo3DLatheItem );
pControllerItem.reset();
pConvertTo3DItem.reset();
pConvertTo3DLatheItem.reset();
mpImpl.reset();
......@@ -2786,9 +2786,9 @@ void Svx3DWin::LBSelectColor( SvxColorListBox* pLb, const Color& rColor )
void Svx3DWin::UpdatePreview()
{
if(nullptr == pModel)
if(!pModel)
{
pModel = new FmFormModel();
pModel.reset(new FmFormModel());
}
// Get Itemset
......
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