sd/inc/drawdoc.hxx | 6 ++++-- sd/source/core/drawdoc4.cxx | 11 ++++------- 2 files changed, 8 insertions(+), 9 deletions(-)
New commits: commit 370a30b6acc5b99b6046440f6b5f4f3f5f9f4b1a Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Mon Jun 11 15:53:29 2018 +0200 loplugin:useuniqueptr in SdDrawDocument Change-Id: Id67b08d8d8a08d7e19ef8534b7bb9d689a571e06 Reviewed-on: https://gerrit.libreoffice.org/56105 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 625c2289c3b4..e576aa749eaa 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -143,8 +143,10 @@ private: std::unique_ptr<SdOutliner> mpInternalOutliner; ///< internal outliner for creation of text objects std::unique_ptr<Timer> mpWorkStartupTimer; - Idle* mpOnlineSpellingIdle; - sd::ShapeList* mpOnlineSpellingList; + std::unique_ptr<Idle> + mpOnlineSpellingIdle; + std::unique_ptr<sd::ShapeList> + mpOnlineSpellingList; std::unique_ptr<SvxSearchItem> mpOnlineSearchItem; std::vector<std::unique_ptr<sd::FrameView>> diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index 21561130de0a..b938697eba50 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -736,11 +736,8 @@ void SdDrawDocument::StopOnlineSpelling() mpOnlineSpellingIdle->Stop(); } - delete mpOnlineSpellingIdle; - mpOnlineSpellingIdle = nullptr; - - delete mpOnlineSpellingList; - mpOnlineSpellingList = nullptr; + mpOnlineSpellingIdle.reset(); + mpOnlineSpellingList.reset(); } // Start OnlineSpelling in the background @@ -763,7 +760,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling) pOutl->SetDefaultLanguage( meLanguage ); - mpOnlineSpellingList = new ShapeList; + mpOnlineSpellingList.reset(new ShapeList); sal_uInt16 nPage; for ( nPage = 0; nPage < GetPageCount(); nPage++ ) @@ -779,7 +776,7 @@ void SdDrawDocument::StartOnlineSpelling(bool bForceSpelling) } mpOnlineSpellingList->seekShape(0); - mpOnlineSpellingIdle = new Idle("OnlineSpelling"); + mpOnlineSpellingIdle.reset(new Idle("OnlineSpelling")); mpOnlineSpellingIdle->SetInvokeHandler( LINK(this, SdDrawDocument, OnlineSpellingHdl) ); mpOnlineSpellingIdle->SetPriority(TaskPriority::LOWEST); mpOnlineSpellingIdle->Start(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits