summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-27 14:06:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-28 08:33:54 +0200
commit9954df6905804fb2bd72072a7e44145508b86a8d (patch)
treeb1d5a40088ba60ede24c4c8c07b8dc5e4da90fdc
parent0d41681eef154f8208e9764f0a459ae79d033164 (diff)
loplugin:useuniqueptr in ScAutoFmtPreview
Change-Id: I748382e73a2e2b80292e8c396cb61ca805c03549 Reviewed-on: https://gerrit.libreoffice.org/56562 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sc/source/ui/inc/autofmt.hxx2
-rw-r--r--sc/source/ui/miscdlgs/autofmt.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/inc/autofmt.hxx b/sc/source/ui/inc/autofmt.hxx
index b5eb205b4b67..358df72ff6c9 100644
--- a/sc/source/ui/inc/autofmt.hxx
+++ b/sc/source/ui/inc/autofmt.hxx
@@ -73,7 +73,7 @@ private:
const OUString aStrMid;
const OUString aStrSouth;
const OUString aStrSum;
- SvNumberFormatter* pNumFmt;
+ std::unique_ptr<SvNumberFormatter> pNumFmt;
SAL_DLLPRIVATE void Init();
SAL_DLLPRIVATE void DoPaint(vcl::RenderContext& rRenderContext);
diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx
index a1eab0e5b4f2..bf96690b54f6 100644
--- a/sc/source/ui/miscdlgs/autofmt.cxx
+++ b/sc/source/ui/miscdlgs/autofmt.cxx
@@ -90,7 +90,7 @@ ScAutoFmtPreview::~ScAutoFmtPreview()
void ScAutoFmtPreview::dispose()
{
- delete pNumFmt;
+ pNumFmt.reset();
vcl::Window::dispose();
}