diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-11 15:04:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-20 08:34:10 +0200 |
commit | 317e053344e618b3b92457c8d6103a77eaa9d3ec (patch) | |
tree | 4bb66d0525e9ce2a9f5a97deb00222786988ce01 /cui | |
parent | 433fd79e00ee8fb935482f13ca5b270939aefa99 (diff) |
loplugin:useuniqueptr in SvxCharacterMap
Change-Id: I85e254fc59b4b0954bbed3876935f56e6480f525
Reviewed-on: https://gerrit.libreoffice.org/56097
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/cuicharmap.cxx | 5 | ||||
-rw-r--r-- | cui/source/inc/cuicharmap.hxx | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index d236d812d603..e5b68de80117 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -657,8 +657,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBoxText&, void) // setup unicode subset listbar with font specific subsets, // hide unicode subset listbar for symbol fonts // TODO: get info from the Font once it provides it - delete pSubsetMap; - pSubsetMap = nullptr; + pSubsetMap.reset(); m_xSubsetLB->clear(); bool bNeedSubset = (aFont.GetCharSet() != RTL_TEXTENCODING_SYMBOL); @@ -666,7 +665,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, FontSelectHdl, weld::ComboBoxText&, void) { FontCharMapRef xFontCharMap( new FontCharMap() ); m_xShowSet->GetFontCharMap( xFontCharMap ); - pSubsetMap = new SubsetMap( xFontCharMap ); + pSubsetMap.reset(new SubsetMap( xFontCharMap )); // update subset listbox for new font's unicode subsets bool bFirst = true; diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index 9e926f20484b..cd47e7edaf0a 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -76,7 +76,7 @@ private: VclPtr<VirtualDevice> m_xVirDev; vcl::Font aFont; - const SubsetMap* pSubsetMap; + std::unique_ptr<const SubsetMap> pSubsetMap; bool isSearchMode; bool m_bHasInsert; std::deque<OUString> maRecentCharList; |