loplugin:useuniqueptr in SdDrawDocument

Change-Id: Id67b08d8d8a08d7e19ef8534b7bb9d689a571e06
Reviewed-on: https://gerrit.libreoffice.org/56105
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 625c228..e576aa7 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 2156113..b938697 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();