diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2012-06-02 14:31:30 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-08 22:52:32 +0200 |
commit | 276814402e499805354cb55cfcf2a0015a01fc8e (patch) | |
tree | 03f12b4151a9b33937e90534cb10d686894a8252 | |
parent | 52c8cec6daeb24a95e09e6435304cfbdc9fb0dac (diff) |
Forgot to add destructors for my PTRARR_DEL conversions
Change-Id: I6312c7372f0787e308320c79e80504b195df6272
-rw-r--r-- | svtools/source/edit/textdat2.hxx | 9 | ||||
-rw-r--r-- | svtools/source/edit/textdoc.hxx | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/svtools/source/edit/textdat2.hxx b/svtools/source/edit/textdat2.hxx index cdbff9059685..7806a9a78131 100644 --- a/svtools/source/edit/textdat2.hxx +++ b/svtools/source/edit/textdat2.hxx @@ -177,7 +177,14 @@ public: inline sal_Bool operator != ( const TextLine& rLine ) const; }; -typedef std::vector<TextLine*> TextLines; +class TextLines : public std::vector<TextLine*> { +public: + ~TextLines() + { + for( iterator it = begin(); it != end(); ++it ) + delete *it; + } +}; inline sal_Bool TextLine::operator == ( const TextLine& rLine ) const { diff --git a/svtools/source/edit/textdoc.hxx b/svtools/source/edit/textdoc.hxx index d8d2255ed676..17607a9932b3 100644 --- a/svtools/source/edit/textdoc.hxx +++ b/svtools/source/edit/textdoc.hxx @@ -36,7 +36,14 @@ #include <tools/string.hxx> #include <vector> -typedef std::vector<TextCharAttrib*> TextCharAttribs; +class TextCharAttribs : public std::vector<TextCharAttrib*> { +public: + ~TextCharAttribs() + { + for( iterator it = begin(); it != end(); ++it ) + delete *it; + } +}; class TextCharAttribList : private TextCharAttribs { |