diff options
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 41 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 4 |
2 files changed, 23 insertions, 22 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index 544852a6b101..c80ce719e41d 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -194,12 +194,12 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, { SolarMutexGuard aGuard; - mpBrowser->aFoundList.Insert( - new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ), - LIST_APPEND ); + mpBrowser->aFoundList.push_back( + new String( aFoundURL.GetMainURL( INetURLObject::NO_DECODE ) ) + ); mpBrowser->aLbxFound.InsertEntry( GetReducedString( aFoundURL, 50 ), - (USHORT) mpBrowser->aFoundList.Count() - 1 ); + (USHORT) mpBrowser->aFoundList.size() - 1 ); } } } @@ -315,9 +315,9 @@ void SAL_CALL TakeThread::run() { // kompletten Filenamen aus FoundList holen if( mpBrowser->bTakeAll ) - aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = i )); + aURL = INetURLObject( *mpBrowser->aFoundList[ nPos = i ] ); else - aURL = INetURLObject(*mpBrowser->aFoundList.GetObject( nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) )); + aURL = INetURLObject(*mpBrowser->aFoundList[ nPos = mpBrowser->aLbxFound.GetSelectEntryPos( i ) ]); // Position in Taken-Liste uebernehmen mrTakenList.Insert( (void*) (ULONG)nPos, LIST_APPEND ); @@ -384,7 +384,7 @@ IMPL_LINK( TakeProgress, ClickCancelBtn, void*, EMPTYARG ) IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) { TPGalleryThemeProperties* mpBrowser = (TPGalleryThemeProperties*) GetParent(); - ::std::vector<bool, std::allocator<bool> > aRemoveEntries( mpBrowser->aFoundList.Count(), false ); + ::std::vector<bool, std::allocator<bool> > aRemoveEntries( mpBrowser->aFoundList.size(), false ); ::std::vector< String > aRemainingVector; sal_uInt32 i, nCount; @@ -401,15 +401,14 @@ IMPL_LINK( TakeProgress, CleanUpHdl, void*, EMPTYARG ) // refill found list for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i ) if( !aRemoveEntries[ i ] ) - aRemainingVector.push_back( *mpBrowser->aFoundList.GetObject( i ) ); + aRemainingVector.push_back( *mpBrowser->aFoundList[ i ] ); - for( String* pStr = mpBrowser->aFoundList.First(); pStr; pStr = mpBrowser->aFoundList.Next() ) - delete pStr; - - mpBrowser->aFoundList.Clear(); + for ( i = 0, nCount = mpBrowser->aFoundList.size(); i < nCount; ++i ) + delete mpBrowser->aFoundList[ i ]; + mpBrowser->aFoundList.clear(); for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i ) - mpBrowser->aFoundList.Insert( new String( aRemainingVector[ i ] ), LIST_APPEND ); + mpBrowser->aFoundList.push_back( new String( aRemainingVector[ i ] ) ); aRemainingVector.clear(); @@ -818,8 +817,8 @@ TPGalleryThemeProperties::~TPGalleryThemeProperties() xMediaPlayer.clear(); xDialogListener.clear(); - for( String* pStr = aFoundList.First(); pStr; pStr = aFoundList.Next() ) - delete pStr; + for ( size_t i = 0, n = aFoundList.size(); i < n; ++i ) + delete aFoundList[ i ]; for( void* pEntry = aFilterEntryList.First(); pEntry; pEntry = aFilterEntryList.Next() ) delete (FilterEntry*) pEntry; @@ -997,10 +996,10 @@ void TPGalleryThemeProperties::SearchFiles() { SearchProgress* pProgress = new SearchProgress( this, aURL ); - for( String* pStr = aFoundList.First(); pStr; pStr = aFoundList.Next() ) - delete pStr; + for ( size_t i = 0, n = aFoundList.size(); i < n; ++i ) + delete aFoundList[ i ]; + aFoundList.clear(); - aFoundList.Clear(); aLbxFound.Clear(); pProgress->SetFileType( aCbbFileType.GetText() ); @@ -1115,7 +1114,7 @@ void TPGalleryThemeProperties::DoPreview() if( aString != aPreviewString ) { - INetURLObject _aURL( *aFoundList.GetObject( aLbxFound.GetEntryPos( aString ) ) ); + INetURLObject _aURL( *aFoundList[ aLbxFound.GetEntryPos( aString ) ] ); bInputAllowed = FALSE; if ( !aWndPreview.SetGraphic( _aURL ) ) @@ -1197,7 +1196,7 @@ IMPL_LINK( TPGalleryThemeProperties, SelectFoundHdl, void *, EMPTYARG ) else aCbxPreview.Disable(); - if( aFoundList.Count() ) + if( aFoundList.size() ) aBtnTakeAll.Enable(); else aBtnTakeAll.Disable(); @@ -1238,7 +1237,7 @@ IMPL_LINK( TPGalleryThemeProperties, PreviewTimerHdl, void *, EMPTYARG ) IMPL_LINK( TPGalleryThemeProperties, EndSearchProgressHdl, SearchProgress *, EMPTYARG ) { - if( aFoundList.Count() ) + if( aFoundList.size() ) { aLbxFound.SelectEntryPos( 0 ); aBtnTakeAll.Enable(); diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 6254a9150038..536c94f1b454 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -47,7 +47,7 @@ #include <com/sun/star/media/XPlayer.hpp> #include <com/sun/star/ui/dialogs/XFolderPicker.hpp> #include <svtools/dialogclosedlistener.hxx> -#include <bootstrp/sstring.hxx> +#include <vector> // ------------ // - Forwards - @@ -59,6 +59,8 @@ class SearchProgress; class TakeProgress; class TPGalleryThemeProperties; +typedef ::std::vector< UniString* > StringList; + // --------------- // - FilterEntry - // --------------- |