[Libreoffice-commits] .: unotools/source
Joseph Powers
jpowers at kemper.freedesktop.org
Wed Feb 16 22:10:38 PST 2011
unotools/source/ucbhelper/ucbhelper.cxx | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
New commits:
commit 1ffdb5fafd8d222365698d0311c95d4fab6b7109
Author: Joseph Powers <jpowers27 at cox.net>
Date: Wed Feb 16 21:47:31 2011 -0800
Remove DECLARE_LIST( StringList_Impl, OUString* )
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 6f2d9e1..d311c60 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -65,6 +65,7 @@
#include <ucbhelper/contentbroker.hxx>
#include "unotools/localfilehelper.hxx"
+#include <vector>
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;
}
More information about the Libreoffice-commits
mailing list