diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-16 15:23:09 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-05-25 00:17:05 +0200 |
commit | b620a39936ad2c1fd4067c9e82635c54ce73600b (patch) | |
tree | abcbec5d23faa9bedd7f347dc014755441180401 /sw/inc | |
parent | f5af47f432185881ce82956d8ed520948feab296 (diff) |
Convert SV_DECL_PTRARR_DEL(SwNumRuleTbl) to std::vector
Could not use boost::ptr_vector here because the code manually
moves objects around.
Change-Id: I708270a967ee6663ab1f1ba8d7998c63fa698b8f
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/docary.hxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sw/inc/docary.hxx b/sw/inc/docary.hxx index ef267c7f46e3..ecc6f39614bd 100644 --- a/sw/inc/docary.hxx +++ b/sw/inc/docary.hxx @@ -30,6 +30,7 @@ #include <com/sun/star/i18n/ForbiddenCharacters.hpp> #include <vector> +#include <algorithm> class SwFieldType; class SwFrmFmt; @@ -73,9 +74,12 @@ SV_DECL_PTRARR_DEL( SwTOXTypes, SwTOXTypePtr, 0 ) typedef SwSectionFmt* SwSectionFmtPtr; SV_DECL_PTRARR_DEL(SwSectionFmts,SwSectionFmtPtr,0) - -typedef SwNumRule* SwNumRulePtr; -SV_DECL_PTRARR_DEL_VISIBILITY( SwNumRuleTbl, SwNumRulePtr, 0, SW_DLLPUBLIC ) +class SW_DLLPUBLIC SwNumRuleTbl : public std::vector<SwNumRule*> { +public: + // the destructor will free all objects still in the vector + ~SwNumRuleTbl(); + sal_uInt16 GetPos(const SwNumRule* pRule) const; +}; typedef SwRedline* SwRedlinePtr; SV_DECL_PTRARR_SORT_DEL( _SwRedlineTbl, SwRedlinePtr, 0 ) |