summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLTextListAutoStylePool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/XMLTextListAutoStylePool.cxx')
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index c99f9111a6..18d5c262ef 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -34,7 +34,7 @@
#include <com/sun/star/container/XIndexReplace.hpp>
#include <rtl/ustrbuf.hxx>
#include <xmloff/xmlnume.hxx>
-#include "XMLTextListAutoStylePool.hxx"
+#include "xmloff/XMLTextListAutoStylePool.hxx"
#include <xmloff/xmlexp.hxx>
using ::rtl::OUString;
@@ -185,7 +185,15 @@ XMLTextListAutoStylePool::XMLTextListAutoStylePool( SvXMLExport& rExp ) :
XMLTextListAutoStylePool::~XMLTextListAutoStylePool()
{
+ // The XMLTextListAutoStylePoolEntry_Impl object in the pool need delete explicitly in dtor.
+ ULONG nCount = pPool->Count();
+ while ( nCount-- )
+ delete pPool->Remove(nCount);
delete pPool;
+
+ nCount = pNames->Count();
+ while ( nCount-- )
+ delete pNames->Remove(nCount);
delete pNames;
}