[Libreoffice-commits] .: sd/source
Joseph Powers
jpowers at kemper.freedesktop.org
Sat Jun 18 07:21:48 PDT 2011
sd/source/core/stlpool.cxx | 24 +++++-------------------
1 file changed, 5 insertions(+), 19 deletions(-)
New commits:
commit 72a84ad086f1a7cb4421994609cfeec03b3c7cd9
Author: Rafael Dominguez <venccsralph at gmail.com>
Date: Sun Jun 12 18:37:27 2011 -0430
Replace List with std::vector<SfxStyleSheetBase*>.
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index d1bee44..407c1bf 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -870,7 +870,7 @@ void SdStyleSheetPool::UpdateStdNames()
{
String aHelpFile;
sal_uInt32 nCount = aStyles.size();
- List* pEraseList = NULL;
+ std::vector<SfxStyleSheetBase*> aEraseList;
for( sal_uInt32 n=0; n < nCount; n++ )
{
@@ -953,30 +953,16 @@ void SdStyleSheetPool::UpdateStdNames()
else
{
// Sheet existiert schon: Altes Sheet muss entfernt werden
- if( !pEraseList )
- {
- pEraseList = new List();
- }
-
- pEraseList->Insert( pStyle );
+ aEraseList.push_back( pStyle );
}
}
}
}
}
- if ( pEraseList )
- {
- // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden
- for ( sal_uLong i = 0; i < pEraseList->Count(); i++ )
- {
- SfxStyleSheetBase* pEraseSheet = ( SfxStyleSheetBase* ) pEraseList->GetObject( i );
- Remove( pEraseSheet );
- }
-
- delete pEraseList;
- pEraseList = NULL;
- }
+ // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden
+ for ( size_t i = 0, n = aEraseList.size(); i < n; ++i )
+ Remove( aEraseList[ i ] );
}
// --------------------------------------------------------------------
// Neues SvxNumBulletItem fuer das jeweilige StyleSheet setzen
More information about the Libreoffice-commits
mailing list