diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-22 18:03:16 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-24 07:43:49 +0000 |
commit | 7077c7aae78c63d48fa8ddd5b02eadb53db5d7c5 (patch) | |
tree | 0c7186ded5e6dc22972ec4fd5d61ccc15202283f | |
parent | e0788463c3ec790ee002fc1610a9206f2ac7c10d (diff) |
tdf#89329: use unique_ptr for pImpl in tabdlg
Change-Id: Idf5d0d1f8b2dd68b1fe1a43e1fb1bf46837b58ec
Reviewed-on: https://gerrit.libreoffice.org/25321
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | include/sfx2/tabdlg.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/tabdlg.cxx | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index bf3a8773b3f0..1b3b63c5e4d6 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -80,7 +80,7 @@ friend class SfxTabDialogController; SfxItemSet* m_pSet; SfxItemSet* m_pOutSet; - TabDlg_Impl* m_pImpl; + std::unique_ptr< TabDlg_Impl > m_pImpl; sal_uInt16* m_pRanges; sal_uInt16 m_nAppPageId; bool m_bItemsReset; @@ -209,7 +209,7 @@ private: const SfxItemSet* pSet; OUString aUserString; bool bHasExchangeSupport; - TabPageImpl* pImpl; + std::unique_ptr< TabPageImpl > pImpl; protected: SfxTabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription, const SfxItemSet *rAttrSet); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 9515435e75f7..3d88b4937d7f 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -174,8 +174,7 @@ SfxTabPage::~SfxTabPage() void SfxTabPage::dispose() { - delete pImpl; - pImpl = nullptr; + pImpl.reset(); TabPage::dispose(); } @@ -370,8 +369,7 @@ void SfxTabDialog::dispose() pDataObject = nullptr; } - delete m_pImpl; - m_pImpl = nullptr; + m_pImpl.reset(); delete m_pSet; m_pSet = nullptr; delete m_pOutSet; @@ -415,7 +413,7 @@ void SfxTabDialog::Init_Impl(bool bFmtFlag) assert(m_pBox); m_pUIBuilder->get(m_pTabCtrl, "tabcontrol"); - m_pImpl = new TabDlg_Impl(m_pTabCtrl->GetPageCount()); + m_pImpl.reset( new TabDlg_Impl(m_pTabCtrl->GetPageCount()) ); m_pActionArea = get_action_area(); assert(m_pActionArea); |