diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 15:54:59 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 14:46:24 +0200 |
commit | 6349cee07b9b11098a4174f8d2c4363b38b2b990 (patch) | |
tree | bfea0a44d379f8a7f272ebb0f91d03547d9cb985 | |
parent | 8014f3722a854b505e536fb13ec4e86e1f5fba7b (diff) |
loplugin:useuniqueptr in HtmlExport
Change-Id: Ib146bdfd04f428d922e23ec6b5054d53326ca5f3
Reviewed-on: https://gerrit.libreoffice.org/56106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sd/source/filter/html/htmlex.cxx | 5 | ||||
-rw-r--r-- | sd/source/filter/html/htmlex.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 36c326a7157c..53677a73c4be 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -846,13 +846,12 @@ void HtmlExport::SetDocColors( SdPage* pPage ) void HtmlExport::InitProgress( sal_uInt16 nProgrCount ) { - mpProgress = new SfxProgress( mpDocSh, SdResId(STR_CREATE_PAGES), nProgrCount ); + mpProgress.reset(new SfxProgress( mpDocSh, SdResId(STR_CREATE_PAGES), nProgrCount )); } void HtmlExport::ResetProgress() { - delete mpProgress; - mpProgress = nullptr; + mpProgress.reset(); } void HtmlExport::ExportKiosk() diff --git a/sd/source/filter/html/htmlex.hxx b/sd/source/filter/html/htmlex.hxx index 33066490bf6b..e83621ae8c69 100644 --- a/sd/source/filter/html/htmlex.hxx +++ b/sd/source/filter/html/htmlex.hxx @@ -87,7 +87,7 @@ class HtmlExport final HtmlErrorContext meEC; HtmlPublishMode meMode; - SfxProgress* mpProgress; + std::unique_ptr<SfxProgress> mpProgress; bool mbImpress; sal_uInt16 mnSdPageCount; sal_uInt16 mnPagesWritten; |