diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2011-05-06 22:39:38 -0430 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-05-08 06:37:58 -0700 |
commit | 322cbf9d4e5b2ec8b9c55dafc12a580c234e19cc (patch) | |
tree | 82b9b2bd779ec6160600ac852d435c0bfeb4fe9c /svx/source/gallery2/galexpl.cxx | |
parent | b21661ce4200fd8040a213770a3f9e63a4b9f137 (diff) |
Remove List in GalleryExplorer::FillObjList functions.
Diffstat (limited to 'svx/source/gallery2/galexpl.cxx')
-rw-r--r-- | svx/source/gallery2/galexpl.cxx | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index 2f41aeae0eff..538b981d9fce 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -129,7 +129,7 @@ bool GalleryExplorer::FillThemeList( std::vector<String>& rThemeList ) // ------------------------------------------------------------------------ -sal_Bool GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList ) +sal_Bool GalleryExplorer::FillObjList( const String& rThemeName, std::vector<String> &rObjList ) { Gallery* pGal = ImplGetGallery(); @@ -140,22 +140,26 @@ sal_Bool GalleryExplorer::FillObjList( const String& rThemeName, List& rObjList if( pTheme ) { - for( sal_uIntPtr i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) - rObjList.Insert( new String( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::NO_DECODE ) ), LIST_APPEND ); + for( sal_uInt32 i = 0, nCount = pTheme->GetObjectCount(); i < nCount; i++ ) + rObjList.push_back( pTheme->GetObjectURL( i ).GetMainURL( INetURLObject::NO_DECODE ) ); pGal->ReleaseTheme( pTheme, aListener ); } } - return( rObjList.Count() > 0 ); + return !rObjList.empty(); } // ------------------------------------------------------------------------ -sal_Bool GalleryExplorer::FillObjList( sal_uIntPtr nThemeId, List& rObjList ) +sal_Bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<String> &rObjList ) { Gallery* pGal = ImplGetGallery(); - return( pGal ? FillObjList( pGal->GetThemeName( nThemeId ), rObjList ) : sal_False ); + + if (!pGal) + return false; + + return FillObjList( pGal->GetThemeName( nThemeId ), rObjList ); } // ------------------------------------------------------------------------ |