diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-02-12 09:13:46 -0800 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-02-12 09:13:46 -0800 |
commit | 48ce10a78d327d4611ec066e140ddb2d8c5e4149 (patch) | |
tree | eb9f7f8586d1c360131f1ec5a5158c45dfa66e6f /cui/source/dialogs/cuigaldlg.cxx | |
parent | 267aa681af9e250208f79488d90d2a51146b48a8 (diff) |
Remove DECLARE_LIST( UniStringList, UniString* )
I converted the DECLARE_LIST() into a vector<> and moved it to the .hxx
file. This also means I no longer have to reference /bootstrp/sstring.hxx.
Diffstat (limited to 'cui/source/dialogs/cuigaldlg.cxx')
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 41 |
1 files changed, 20 insertions, 21 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(); |