Kaydet (Commit) a29a94d7 authored tarafından Arnold Dumas's avatar Arnold Dumas Kaydeden (comit) Noel Grandin

tdf#89329: use unique_ptr for pImpl in fmmodel

Change-Id: I631c72caafc31eeff46db6f98d1d09f25f5a8245
Reviewed-on: https://gerrit.libreoffice.org/28281Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 850964c2
......@@ -22,6 +22,7 @@
#include <svx/svdmodel.hxx>
#include <svx/svxdllapi.h>
#include <memory>
class SfxObjectShell;
class SfxItemPool;
......@@ -36,7 +37,7 @@ class SVX_DLLPUBLIC FmFormModel :
public SdrModel
{
private:
FmFormModelImplData* m_pImpl;
std::unique_ptr<FmFormModelImplData> m_pImpl;
SfxObjectShell* m_pObjShell;
bool m_bOpenInDesignMode : 1;
......
......@@ -59,7 +59,7 @@ FmFormModel::FmFormModel(SfxItemPool* pPool, SfxObjectShell* pPers)
, m_bOpenInDesignMode(false)
, m_bAutoControlFocus(false)
{
m_pImpl = new FmFormModelImplData;
m_pImpl.reset( new FmFormModelImplData );
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
}
......@@ -71,7 +71,7 @@ FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShe
, m_bOpenInDesignMode(false)
, m_bAutoControlFocus(false)
{
m_pImpl = new FmFormModelImplData;
m_pImpl.reset( new FmFormModelImplData );
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
}
......@@ -84,7 +84,7 @@ FmFormModel::FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShe
, m_bOpenInDesignMode(false)
, m_bAutoControlFocus(false)
{
m_pImpl = new FmFormModelImplData;
m_pImpl.reset( new FmFormModelImplData );
m_pImpl->pUndoEnv = new FmXUndoEnvironment(*this);
m_pImpl->pUndoEnv->acquire();
}
......@@ -99,8 +99,6 @@ FmFormModel::~FmFormModel()
SetMaxUndoActionCount(1);
m_pImpl->pUndoEnv->release();
delete m_pImpl;
}
SdrPage* FmFormModel::AllocPage(bool bMasterPage)
......
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