Ooops forgot to attach patch On Wed, Jun 15, 2011 at 7:35 PM, Rafael Dominguez <[email protected]>wrote:
> >
From 1b72022c8169b41786c71ee52776da60418341c5 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez <[email protected]> Date: Sun, 12 Jun 2011 18:37:27 -0430 Subject: [PATCH 3/9] Replace List with std::vector<SfxStyleSheetBase*>. --- sd/source/core/stlpool.cxx | 24 +++++------------------- 1 files changed, 5 insertions(+), 19 deletions(-) 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 -- 1.7.3.4
_______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
