[Libreoffice-commits] core.git: sd/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Jun 20 12:46:47 UTC 2018
sd/source/filter/html/htmlex.cxx | 5 ++---
sd/source/filter/html/htmlex.hxx | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit 6349cee07b9b11098a4174f8d2c4363b38b2b990
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Mon Jun 11 15:54:59 2018 +0200
loplugin:useuniqueptr in HtmlExport
Change-Id: Ib146bdfd04f428d922e23ec6b5054d53326ca5f3
Reviewed-on: https://gerrit.libreoffice.org/56106
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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;
More information about the Libreoffice-commits
mailing list