diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-21 10:45:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-25 09:12:31 +0200 |
commit | f287292d91012519782f0b7a698449b5eeb624b9 (patch) | |
tree | 68ec994033f1e6a20e516b236f026af7272aa32d /cui | |
parent | aac20c5b8f4a19051c0ca894eb8951150b37a8a9 (diff) |
loplugin:useuniqueptr in OfaViewTabPage
Change-Id: I0a9f7fd5738a06ac60762b3242721df1634b4264
Reviewed-on: https://gerrit.libreoffice.org/56326
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 12 | ||||
-rw-r--r-- | cui/source/options/optgdlg.hxx | 8 |
2 files changed, 8 insertions, 12 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 5ce324c2d4e3..e4255ee55bf6 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -705,12 +705,9 @@ OfaViewTabPage::~OfaViewTabPage() void OfaViewTabPage::dispose() { - delete mpDrawinglayerOpt; - mpDrawinglayerOpt = nullptr; - delete pCanvasSettings; - pCanvasSettings = nullptr; - delete pAppearanceCfg; - pAppearanceCfg = nullptr; + mpDrawinglayerOpt.reset(); + pCanvasSettings.reset(); + pAppearanceCfg.reset(); m_pIconSizeLB.clear(); m_pSidebarIconSizeLB.clear(); m_pNotebookbarIconSizeLB.clear(); @@ -1290,8 +1287,7 @@ OfaLanguagesTabPage::~OfaLanguagesTabPage() void OfaLanguagesTabPage::dispose() { - delete pLangConfig; - pLangConfig = nullptr; + pLangConfig.reset(); m_pUserInterfaceLB.clear(); m_pLocaleSettingFT.clear(); m_pLocaleSettingLB.clear(); diff --git a/cui/source/options/optgdlg.hxx b/cui/source/options/optgdlg.hxx index d986860b6f48..775a8cf5f63f 100644 --- a/cui/source/options/optgdlg.hxx +++ b/cui/source/options/optgdlg.hxx @@ -112,9 +112,9 @@ private: sal_Int32 nNotebookbarSizeLB_InitialSelection; sal_Int32 nStyleLB_InitialSelection; - SvtTabAppearanceCfg* pAppearanceCfg; - CanvasSettings* pCanvasSettings; - SvtOptionsDrawinglayer* mpDrawinglayerOpt; + std::unique_ptr<SvtTabAppearanceCfg> pAppearanceCfg; + std::unique_ptr<CanvasSettings> pCanvasSettings; + std::unique_ptr<SvtOptionsDrawinglayer> mpDrawinglayerOpt; std::unique_ptr<svt::OpenGLCfg> mpOpenGLConfig; std::vector<vcl::IconThemeInfo> mInstalledIconThemes; @@ -160,7 +160,7 @@ class OfaLanguagesTabPage : public SfxTabPage bool m_bOldAsian; bool m_bOldCtl; - LanguageConfig_Impl* pLangConfig; + std::unique_ptr<LanguageConfig_Impl> pLangConfig; OUString m_sUserLocaleValue; OUString m_sSystemDefaultString; |