summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-04-18 15:25:33 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-18 15:30:05 +0200
commite53047ade900f18ad6c6c241ddfdef715c2172fd (patch)
tree9d1ae24fc0c0cab446b93434a13ac2f7bb88357e /xmloff
parentf36861d4a367672e1ec6fc44e9367996c7cc6405 (diff)
loop with erase(begin()) looks sort of inefficient
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx2
-rw-r--r--xmloff/source/text/XMLTextColumnsContext.cxx7
2 files changed, 4 insertions, 5 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 255aa94c5010..77a5b5be744e 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -72,7 +72,7 @@ struct SvXMLNumFmtEntry
aName(rN), nKey(nK), bRemoveAfterUse(bR) {}
};
-class SvXMLNumFmtEntryArr : public boost::ptr_vector<SvXMLNumFmtEntry> {};
+typedef ::boost::ptr_vector<SvXMLNumFmtEntry> SvXMLNumFmtEntryArr;
struct SvXMLEmbeddedElement
{
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index e5c0750a4fea..8bb20659bd06 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -342,11 +342,10 @@ XMLTextColumnsContext::~XMLTextColumnsContext()
{
if( pColumns )
{
- while( !pColumns->empty() )
+ for (XMLTextColumnsArray_Impl::iterator it = pColumns->begin();
+ it != pColumns->end(); ++it)
{
- XMLTextColumnContext_Impl *pColumn = *pColumns->begin();
- pColumns->erase( pColumns->begin() );
- pColumn->ReleaseRef();
+ (*it)->ReleaseRef();
}
}
if( pColumnSep )