summaryrefslogtreecommitdiff
path: root/xmloff/source/style/impastp1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/style/impastp1.cxx')
-rw-r--r--xmloff/source/style/impastp1.cxx21
1 files changed, 12 insertions, 9 deletions
diff --git a/xmloff/source/style/impastp1.cxx b/xmloff/source/style/impastp1.cxx
index 839ae145d4bf..8cfdcb3d994a 100644
--- a/xmloff/source/style/impastp1.cxx
+++ b/xmloff/source/style/impastp1.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,7 +31,7 @@
#include <tools/debug.hxx>
#include "impastpl.hxx"
-using namespace rtl;
+using ::rtl::OUString;
//#############################################################################
//
@@ -60,12 +61,13 @@ XMLFamilyData_Impl::~XMLFamilyData_Impl()
{
if( mpParentList ) delete mpParentList;
if( mpNameList ) delete mpNameList;
- DBG_ASSERT( !pCache || !pCache->Count(),
- "auto style pool cache is not empty!" );
+ DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" );
if( pCache )
{
- while( pCache->Count() )
- delete pCache->Remove( 0UL );
+ for ( size_t i = 0, n = pCache->size(); i < n; ++i )
+ delete (*pCache)[ i ];
+ pCache->clear();
+ delete pCache;
}
}
@@ -74,12 +76,12 @@ void XMLFamilyData_Impl::ClearEntries()
if( mpParentList )
delete mpParentList;
mpParentList = new SvXMLAutoStylePoolParentsP_Impl( 5, 5 );
- DBG_ASSERT( !pCache || !pCache->Count(),
- "auto style pool cache is not empty!" );
+ DBG_ASSERT( !pCache || !pCache->size(), "auto style pool cache is not empty!" );
if( pCache )
{
- while( pCache->Count() )
- delete pCache->Remove( 0UL );
+ for ( size_t i = 0, n = pCache->size(); i < n; ++i )
+ delete (*pCache)[ i ];
+ pCache->clear();
}
}
@@ -130,3 +132,4 @@ IMPL_CONTAINER_SORT( SvXMLAutoStylePoolNamesP_Impl,
OUString,
SvXMLAutoStylePoolNamesPCmp_Impl )
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */