diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-01 22:40:55 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-08 22:52:29 +0200 |
commit | d6a32eee46ed38b61540287bb53eaf310869d601 (patch) | |
tree | 32d3ec3448d7efb36e33e1a5c0242c8cc0f2f77b /sfx2 | |
parent | e2a2d14d3932267e2f73d47b7990bf1cef599a92 (diff) |
Convert SV_DECL_PTRARR_DEL(ExpandedEntries) to std::vector
Change-Id: Ib10e0417674c5e4a4c5c88f962898e20dee5dd6f
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 3c471d782bc7..a474893d3188 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -427,8 +427,16 @@ void SfxTemplateDialogWrapper::SetParagraphFamily() } //========================================================================= -SV_DECL_PTRARR_DEL(ExpandedEntries, StringPtr,16) -SV_IMPL_PTRARR(ExpandedEntries, StringPtr) +class ExpandedEntries : public std::vector<StringPtr> +{ +public: + ~ExpandedEntries() + { + for(const_iterator it = begin(); it != end(); ++it) + delete *it; + } + +}; /* [Description] @@ -474,13 +482,12 @@ public: void StyleTreeListBox_Impl::MakeExpanded_Impl(ExpandedEntries& rEntries) const { SvLBoxEntry *pEntry; - sal_uInt16 nCount=0; for(pEntry=(SvLBoxEntry*)FirstVisible();pEntry;pEntry=(SvLBoxEntry*)NextVisible(pEntry)) { if(IsExpanded(pEntry)) { StringPtr pString=new String(GetEntryText(pEntry)); - rEntries.Insert(pString,nCount++); + rEntries.push_back(pString); } } } @@ -730,7 +737,7 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) inline sal_Bool IsExpanded_Impl( const ExpandedEntries& rEntries, const String &rStr) { - sal_uInt16 nCount=rEntries.Count(); + sal_uInt16 nCount=rEntries.size(); for(sal_uInt16 n=0;n<nCount;n++) if(*rEntries[n]==rStr) return sal_True; |