From 35959859ec4dde1c60360eaf142f7a52777b2a7d Mon Sep 17 00:00:00 2001 From: Joseph Powers Date: Wed, 16 Feb 2011 21:47:31 -0800 Subject: Remove DECLARE_LIST( StringList_Impl, OUString* ) --- unotools/source/ucbhelper/ucbhelper.cxx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'unotools') diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index c289730bfbc0..d311c60921af 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -65,6 +65,7 @@ #include #include "unotools/localfilehelper.hxx" +#include using namespace ucbhelper; using namespace com::sun::star; @@ -79,7 +80,7 @@ using namespace rtl; using namespace comphelper; using namespace osl; -DECLARE_LIST( StringList_Impl, OUString* ) +typedef ::std::vector< OUString* > StringList_Impl; #define CONVERT_DATETIME( aUnoDT, aToolsDT ) \ aToolsDT = DateTime( Date( aUnoDT.Day, aUnoDT.Month, aUnoDT.Year ), \ @@ -350,7 +351,7 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder { OUString aId = xContentAccess->queryContentIdentifierString(); OUString* pFile = new OUString( aId ); - pFiles->Insert( pFile, LIST_APPEND ); + pFiles->push_back( pFile ); } } catch( ::com::sun::star::ucb::CommandAbortedException& ) @@ -367,12 +368,12 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder if ( pFiles ) { - ULONG nCount = pFiles->Count(); + size_t nCount = pFiles->size(); Sequence < OUString > aRet( nCount ); OUString* pRet = aRet.getArray(); - for ( ULONG i = 0; i < nCount; ++i ) + for ( size_t i = 0; i < nCount; ++i ) { - OUString* pFile = pFiles->GetObject(i); + OUString* pFile = (*pFiles)[ i ]; pRet[i] = *( pFile ); delete pFile; } @@ -431,7 +432,7 @@ Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL ) aRow += '\t'; aRow += String( xContentAccess->queryContentIdentifierString() ); OUString* pRow = new OUString( aRow ); - pList->Insert( pRow, LIST_APPEND ); + pList->push_back( pRow ); } } catch( ::com::sun::star::ucb::CommandAbortedException& ) @@ -448,12 +449,12 @@ Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL ) if ( pList ) { - ULONG nCount = pList->Count(); + size_t nCount = pList->size(); Sequence < OUString > aRet( nCount ); OUString* pRet = aRet.getArray(); - for ( ULONG i = 0; i < nCount; ++i ) + for ( size_t i = 0; i < nCount; ++i ) { - OUString* pEntry = pList->GetObject(i); + OUString* pEntry = (*pList)[ i ]; pRet[i] = *( pEntry ); delete pEntry; } -- cgit v1.2.3