diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-19 16:35:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-25 12:48:47 +0200 |
commit | c6b8587eef3ead53418312c43012f4322789a33a (patch) | |
tree | 2b697f5eef431b00430318615fde3e4c4f877de8 /include | |
parent | 88e26267844ac96f39d341ef05bd1536f210af74 (diff) |
loplugin:useuniqueptr in SvxRTFParser
Change-Id: Ib759d5bcc7ce7cd9ea8ad752e5363375fa24e8f0
Reviewed-on: https://gerrit.libreoffice.org/60957
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/editeng/svxrtf.hxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/editeng/svxrtf.hxx b/include/editeng/svxrtf.hxx index 89f1cdc4bfae..73634f515e97 100644 --- a/include/editeng/svxrtf.hxx +++ b/include/editeng/svxrtf.hxx @@ -90,10 +90,6 @@ public: typedef std::map<short, std::unique_ptr<vcl::Font>> SvxRTFFontTbl; typedef std::map<sal_uInt16, std::unique_ptr<SvxRTFStyleType>> SvxRTFStyleTbl; -// SvxRTFItemStack can't be "std::stack< SvxRTFItemStackType* >" type, because -// the methods are using operator[] in sw/source/filter/rtf/rtftbl.cxx file -typedef std::deque< SvxRTFItemStackType* > SvxRTFItemStack; - // own helper classes for the RTF Parser struct SvxRTFStyleType { @@ -180,7 +176,7 @@ class EDITENG_DLLPUBLIC SvxRTFParser : public SvRTFParser std::deque< Color* > aColorTbl; SvxRTFFontTbl m_FontTable; SvxRTFStyleTbl m_StyleTable; - SvxRTFItemStack aAttrStack; + std::deque< std::unique_ptr<SvxRTFItemStackType> > aAttrStack; SvxRTFItemStackList m_AttrSetList; RTFPlainAttrMapIds aPlainMap; @@ -364,7 +360,7 @@ inline const Color& SvxRTFParser::GetColor( size_t nId ) const inline SfxItemSet& SvxRTFParser::GetAttrSet() { SvxRTFItemStackType* pTmp; - if( bNewGroup || nullptr == ( pTmp = aAttrStack.empty() ? nullptr : aAttrStack.back()) ) + if( bNewGroup || nullptr == ( pTmp = aAttrStack.empty() ? nullptr : aAttrStack.back().get()) ) pTmp = GetAttrSet_(); return pTmp->aAttrSet; } |