diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-25 15:15:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-26 08:58:46 +0200 |
commit | 791683498651a6edb017df7d211d1a014afa0899 (patch) | |
tree | f54d10bce6e2926c15338982db09a5b60d64a180 /lotuswordpro | |
parent | 6cc5c6dea2b03a14e051728aa513fb206929ea86 (diff) |
loplugin:useuniqueptr in XFIndex
but actually this object should be held by rtl::Reference
Change-Id: Iabf068bd909201af5df6f987c6dcdb64679fefbd
Reviewed-on: https://gerrit.libreoffice.org/60970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/inc/xfilter/xfindex.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xfindex.cxx | 6 |
2 files changed, 2 insertions, 7 deletions
diff --git a/lotuswordpro/inc/xfilter/xfindex.hxx b/lotuswordpro/inc/xfilter/xfindex.hxx index 4fb0aa127e41..ace8353be3f6 100644 --- a/lotuswordpro/inc/xfilter/xfindex.hxx +++ b/lotuswordpro/inc/xfilter/xfindex.hxx @@ -65,6 +65,7 @@ #include <xfilter/xfcontent.hxx> #include <xfilter/xfcontentcontainer.hxx> #include <xfilter/xftabstop.hxx> +#include <rtl/ref.hxx> class XFIndex; class XFIndexTemplate; @@ -168,7 +169,7 @@ private: bool m_bProtect; bool m_bSeparator; - std::vector<XFIndexTemplate *> m_aTemplates; // template entry + style + std::vector<rtl::Reference<XFIndexTemplate>> m_aTemplates; // template entry + style #define MAX_TOC_LEVEL 10 std::vector<OUString> m_aTOCSource[MAX_TOC_LEVEL+1]; diff --git a/lotuswordpro/source/filter/xfilter/xfindex.cxx b/lotuswordpro/source/filter/xfilter/xfindex.cxx index 74411f1d5a6c..8ef69ef6b70f 100644 --- a/lotuswordpro/source/filter/xfilter/xfindex.cxx +++ b/lotuswordpro/source/filter/xfilter/xfindex.cxx @@ -68,12 +68,6 @@ XFIndex::XFIndex() XFIndex::~XFIndex() { - while(m_aTemplates.size()>0) - { - XFIndexTemplate * pTemplate = m_aTemplates.back(); - m_aTemplates.pop_back(); - delete pTemplate; - } } void XFIndex::AddTemplate(const OUString& level, const OUString& style, XFIndexTemplate* templ) |