diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-08 12:58:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-14 11:10:22 +0200 |
commit | 0f53efefe14285101ee95a2f8a202b30f7089ea9 (patch) | |
tree | e2c75203c2647246a97d8f4414756586838ee030 | |
parent | a245e5c60fac58889738a9705225c6378b35eef4 (diff) |
loplugin:useuniqueptr in SaveDBDocPage
Change-Id: I750e6de1cce5355281336343b1ec03596113e311
Reviewed-on: https://gerrit.libreoffice.org/54170
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | dbaccess/source/ext/macromigration/macromigrationpages.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ext/macromigration/macromigrationpages.hxx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx index 09fd1f69b495..d4b84e5982e6 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx @@ -79,8 +79,8 @@ namespace dbmm get(m_pStartMigration, "startmigrate"); get(m_pBrowseSaveAsLocation, "browse"); get(m_pSaveAsLocation, "location"); - m_pLocationController = new svx::DatabaseLocationInputController( - _rParentDialog.getComponentContext(), *m_pSaveAsLocation, *m_pBrowseSaveAsLocation); + m_pLocationController.reset( new svx::DatabaseLocationInputController( + _rParentDialog.getComponentContext(), *m_pSaveAsLocation, *m_pBrowseSaveAsLocation) ); m_pSaveAsLocation->SetModifyHdl( LINK( this, SaveDBDocPage, OnLocationModified ) ); m_pSaveAsLocation->SetDropDownLineCount( 20 ); @@ -95,7 +95,7 @@ namespace dbmm void SaveDBDocPage::dispose() { - delete m_pLocationController; + m_pLocationController.reset(); m_pSaveAsLocation.clear(); m_pBrowseSaveAsLocation.clear(); m_pStartMigration.clear(); diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.hxx b/dbaccess/source/ext/macromigration/macromigrationpages.hxx index 6bba4ef64a27..8c28cfd3076d 100644 --- a/dbaccess/source/ext/macromigration/macromigrationpages.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationpages.hxx @@ -83,7 +83,7 @@ namespace dbmm VclPtr< ::svt::OFileURLControl> m_pSaveAsLocation; VclPtr<PushButton> m_pBrowseSaveAsLocation; VclPtr<FixedText> m_pStartMigration; - svx::DatabaseLocationInputController* m_pLocationController; + std::unique_ptr<svx::DatabaseLocationInputController> m_pLocationController; // IWizardPageController overridables virtual void initializePage() override; |