diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-18 13:46:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-29 08:21:14 +0200 |
commit | 2e80fe39a438ab702ad8f3e2456159328cb16365 (patch) | |
tree | 0ed3538e457de9ce203caf09b434e880087599f7 /dbaccess | |
parent | 03841dc12ff3ee65ca632039418c65bbfd5ccaea (diff) |
loplugin:useuniqueptr in dbaui::SbaSbAttrDlg
Change-Id: Ia24f948370b30ccc3870e36c19312e9eebb309b3
Reviewed-on: https://gerrit.libreoffice.org/54851
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/dlgattr.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dlgattr.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index f64c42e3e8ba..d2c3031b72ee 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -38,7 +38,7 @@ SbaSbAttrDlg::SbaSbAttrDlg(vcl::Window* pParent, const SfxItemSet* pCellAttrs, : SfxTabDialog(pParent, "FieldDialog", "dbaccess/ui/fielddialog.ui", pCellAttrs) , m_nNumberFormatId(0) { - pNumberInfoItem = new SvxNumberInfoItem( pFormatter, 0 ); + pNumberInfoItem.reset( new SvxNumberInfoItem( pFormatter, 0 ) ); if (bHasFormat) m_nNumberFormatId = AddTabPage("format", RID_SVXPAGE_NUMBERFORMAT); @@ -54,7 +54,7 @@ SbaSbAttrDlg::~SbaSbAttrDlg() void SbaSbAttrDlg::dispose() { - delete pNumberInfoItem; + pNumberInfoItem.reset(); SfxTabDialog::dispose(); } diff --git a/dbaccess/source/ui/inc/dlgattr.hxx b/dbaccess/source/ui/inc/dlgattr.hxx index d5b5c20b4102..1a10d63ace86 100644 --- a/dbaccess/source/ui/inc/dlgattr.hxx +++ b/dbaccess/source/ui/inc/dlgattr.hxx @@ -29,7 +29,7 @@ namespace dbaui class SbaSbAttrDlg : public SfxTabDialog { - SvxNumberInfoItem* pNumberInfoItem; + std::unique_ptr<SvxNumberInfoItem> pNumberInfoItem; sal_uInt32 m_nNumberFormatId; public: |