diff options
author | Arnold Dumas <arnold@dumas.at> | 2016-08-02 23:20:47 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-04 05:40:34 +0000 |
commit | 6d9cf658eda57c29c2848a7b6eaf5a8285e14972 (patch) | |
tree | f98d4472f310ce1b2d974a52a9d954a73f25052d /cui | |
parent | 0bd4154b176af84e036c4f0869e635e9fcefed1c (diff) |
tdf#89329: use unique_ptr for mpImpl in macroass
Change-Id: I6d3263cf35db3bef6963b2443cb8538343ca9a3a
Reviewed-on: https://gerrit.libreoffice.org/27812
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/macroass.hxx | 3 | ||||
-rw-r--r-- | cui/source/tabpages/macroass.cxx | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/cui/source/inc/macroass.hxx b/cui/source/inc/macroass.hxx index 1ec314f035f7..66986e44fa0f 100644 --- a/cui/source/inc/macroass.hxx +++ b/cui/source/inc/macroass.hxx @@ -26,6 +26,7 @@ #include <svl/macitem.hxx> #include <vcl/lstbox.hxx> #include <com/sun/star/frame/XFrame.hpp> +#include <memory> class SfxMacroTabPage_; class SvTabListBox; @@ -45,7 +46,7 @@ class SfxMacroTabPage : public SfxTabPage DECL_DLLPRIVATE_LINK_TYPED( TimeOut_Impl, Idle*, void ); protected: - SfxMacroTabPage_Impl* mpImpl; + std::unique_ptr<SfxMacroTabPage_Impl> mpImpl; void InitAndSetHandler(); void FillEvents(); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index e607a4886c90..973b6b110ae3 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -139,7 +139,7 @@ void SfxMacroTabPage::EnableButtons() SfxMacroTabPage::SfxMacroTabPage(vcl::Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rAttrSet ) : SfxTabPage(pParent, "EventAssignPage", "cui/ui/eventassignpage.ui", &rAttrSet) { - mpImpl = new SfxMacroTabPage_Impl; + mpImpl.reset(new SfxMacroTabPage_Impl); mpImpl->sStrEvent = get<FixedText>("eventft")->GetText(); mpImpl->sAssignedMacro = get<FixedText>("assignft")->GetText(); get(mpImpl->pEventLB , "assignments"); @@ -166,7 +166,7 @@ SfxMacroTabPage::~SfxMacroTabPage() void SfxMacroTabPage::dispose() { - DELETEZ( mpImpl ); + mpImpl.reset(); SfxTabPage::dispose(); } |