summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svx/float3d.hxx8
-rw-r--r--svx/source/engine3d/float3d.cxx18
2 files changed, 13 insertions, 13 deletions
diff --git a/include/svx/float3d.hxx b/include/svx/float3d.hxx
index b79255a67b5d..7529fddec56a 100644
--- a/include/svx/float3d.hxx
+++ b/include/svx/float3d.hxx
@@ -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;
diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx
index 615957ada6a4..4d840574eeee 100644
--- a/svx/source/engine3d/float3d.cxx
+++ b/svx/source/engine3d/float3d.cxx
@@ -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