summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-02 22:46:22 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-11-03 07:14:22 +0100
commitb80403167935550a4dd97f31b79d2bdcb97e4e88 (patch)
tree4cb7098e5ff3300f72b3675239d9e794dbac36fe /ucb
parent42bfbc216474b4f60d5a5e52a88d95baded5191c (diff)
Replace lists by vector or deque in ucb/ucbhelper
Change-Id: I9f72d7c8ab48f8dc2eec779db2f40531a33db6f9 Reviewed-on: https://gerrit.libreoffice.org/44238 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/providermap.hxx4
-rw-r--r--ucb/source/ucp/cmis/children_provider.hxx4
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx4
-rw-r--r--ucb/source/ucp/cmis/cmis_content.hxx4
-rw-r--r--ucb/source/ucp/cmis/cmis_datasupplier.cxx5
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx19
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.hxx2
-rw-r--r--ucb/source/ucp/gio/gio_content.hxx4
-rw-r--r--ucb/source/ucp/package/pkgcontent.hxx4
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.hxx2
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.hxx2
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.hxx2
12 files changed, 27 insertions, 29 deletions
diff --git a/ucb/source/core/providermap.hxx b/ucb/source/core/providermap.hxx
index ba793aad9e73..c1b50e058820 100644
--- a/ucb/source/core/providermap.hxx
+++ b/ucb/source/core/providermap.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_UCB_SOURCE_CORE_PROVIDERMAP_HXX
#define INCLUDED_UCB_SOURCE_CORE_PROVIDERMAP_HXX
-#include <list>
+#include <deque>
#include <com/sun/star/uno/Reference.h>
#include <regexpmap.hxx>
@@ -56,7 +56,7 @@ ProviderListEntry_Impl::getResolvedProvider() const
}
-typedef std::list< ProviderListEntry_Impl > ProviderList_Impl;
+typedef std::deque< ProviderListEntry_Impl > ProviderList_Impl;
typedef ucb_impl::RegexpMap< ProviderList_Impl > ProviderMap_Impl;
diff --git a/ucb/source/ucp/cmis/children_provider.hxx b/ucb/source/ucp/cmis/children_provider.hxx
index 770c29e68d11..210522a5f916 100644
--- a/ucb/source/ucp/cmis/children_provider.hxx
+++ b/ucb/source/ucp/cmis/children_provider.hxx
@@ -9,7 +9,7 @@
#ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_CHILDREN_PROVIDER_HXX
#define INCLUDED_UCB_SOURCE_UCP_CMIS_CHILDREN_PROVIDER_HXX
-#include <list>
+#include <vector>
#include <com/sun/star/ucb/XContent.hpp>
@@ -20,7 +20,7 @@ namespace cmis
public:
virtual ~ChildrenProvider( ) { };
- virtual std::list< css::uno::Reference< css::ucb::XContent > > getChildren( ) = 0;
+ virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) = 0;
};
}
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index da5f779631ec..db55e200b6e5 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -2033,9 +2033,9 @@ namespace cmis
return uno::Sequence< ucb::ContentInfo >();
}
- list< uno::Reference< ucb::XContent > > Content::getChildren( )
+ std::vector< uno::Reference< ucb::XContent > > Content::getChildren( )
{
- list< uno::Reference< ucb::XContent > > results;
+ std::vector< uno::Reference< ucb::XContent > > results;
SAL_INFO( "ucb.ucp.cmis", "Content::getChildren() " << m_sURL );
libcmis::FolderPtr pFolder = boost::dynamic_pointer_cast< libcmis::Folder >( getObject( uno::Reference< ucb::XCommandEnvironment >() ) );
diff --git a/ucb/source/ucp/cmis/cmis_content.hxx b/ucb/source/ucp/cmis/cmis_content.hxx
index acd45e8d65b6..3a83cde97b06 100644
--- a/ucb/source/ucp/cmis/cmis_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_content.hxx
@@ -98,7 +98,7 @@ private:
private:
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
/// @throws css::uno::Exception
/// @throws libcmis::Exception
@@ -201,7 +201,7 @@ public:
css::uno::Sequence< css::ucb::ContentInfo >
queryCreatableContentsInfo( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
- virtual std::list< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
+ virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
/// @throws css::uno::RuntimeException
/// @throws css::ucb::CommandFailedException
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index a09bceace7b7..13133a2d27ad 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -19,7 +19,6 @@
#include "cmis_provider.hxx"
using namespace com::sun::star;
-using namespace std;
namespace cmis
{
@@ -36,10 +35,10 @@ namespace cmis
if ( mbCountFinal )
return true;
- list< uno::Reference< ucb::XContent > > aChildren = m_pChildrenProvider->getChildren( );
+ std::vector< uno::Reference< ucb::XContent > > aChildren = m_pChildrenProvider->getChildren( );
// Loop over the results and filter them
- for ( list< uno::Reference< ucb::XContent > >::iterator it = aChildren.begin();
+ for ( std::vector< uno::Reference< ucb::XContent > >::iterator it = aChildren.begin();
it != aChildren.end(); ++it )
{
OUString sContentType = ( *it )->getContentType( );
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index d12cbdae8a27..ed87ad5f3323 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -40,17 +40,16 @@
#include "cmis_resultset.hxx"
#include <memory>
-#define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
+#define OUSTR_TO_STDSTR(s) std::string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
#define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
using namespace com::sun::star;
-using namespace std;
namespace cmis
{
RepoContent::RepoContent( const uno::Reference< uno::XComponentContext >& rxContext,
ContentProvider *pProvider, const uno::Reference< ucb::XContentIdentifier >& Identifier,
- vector< libcmis::RepositoryPtr > const & aRepos )
+ std::vector< libcmis::RepositoryPtr > const & aRepos )
: ContentImplHelper( rxContext, pProvider, Identifier ),
m_pProvider( pProvider ),
m_aURL( Identifier->getContentIdentifier( ) ),
@@ -148,7 +147,7 @@ namespace cmis
OUString sProxy = rProxy.aName;
if ( rProxy.nPort > 0 )
sProxy += ":" + OUString::number( rProxy.nPort );
- libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), string(), string(), string() );
+ libcmis::SessionFactory::setProxySettings( OUSTR_TO_STDSTR( sProxy ), std::string(), std::string(), std::string() );
if ( m_aRepositories.empty() )
{
@@ -161,8 +160,8 @@ namespace cmis
AuthProvider authProvider( xEnv, m_xIdentifier->getContentIdentifier( ), m_aURL.getBindingUrl( ) );
AuthProvider::setXEnv( xEnv );
- string rUsername = OUSTR_TO_STDSTR( m_aURL.getUsername( ) );
- string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
+ std::string rUsername = OUSTR_TO_STDSTR( m_aURL.getUsername( ) );
+ std::string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
bool bIsDone = false;
@@ -243,7 +242,7 @@ namespace cmis
if ( !m_sRepositoryId.isEmpty() )
{
- for ( vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
+ for ( std::vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
it != m_aRepositories.end( ) && nullptr == repo.get( ); ++it )
{
if ( STD_TO_OUSTR( ( *it )->getId( ) ) == m_sRepositoryId )
@@ -396,16 +395,16 @@ namespace cmis
return s_aFolderCollection.getTypes();
}
- list< uno::Reference< ucb::XContent > > RepoContent::getChildren( )
+ std::vector< uno::Reference< ucb::XContent > > RepoContent::getChildren( )
{
- list< uno::Reference< ucb::XContent > > result;
+ std::vector< uno::Reference< ucb::XContent > > result;
// TODO Cache the results somehow
SAL_INFO( "ucb.ucp.cmis", "RepoContent::getChildren" );
if ( m_sRepositoryId.isEmpty( ) )
{
- for ( vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
+ for ( std::vector< libcmis::RepositoryPtr >::iterator it = m_aRepositories.begin( );
it != m_aRepositories.end(); ++it )
{
URL aUrl( m_aURL );
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.hxx b/ucb/source/ucp/cmis/cmis_repo_content.hxx
index 4be969ee1c24..241d9fb44853 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.hxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.hxx
@@ -109,7 +109,7 @@ public:
virtual void SAL_CALL abort( sal_Int32 CommandId ) override;
- virtual std::list< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
+ virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
};
}
diff --git a/ucb/source/ucp/gio/gio_content.hxx b/ucb/source/ucp/gio/gio_content.hxx
index 9b2849e726e4..56196295025f 100644
--- a/ucb/source/ucp/gio/gio_content.hxx
+++ b/ucb/source/ucp/gio/gio_content.hxx
@@ -29,7 +29,7 @@
#include <ucbhelper/contenthelper.hxx>
#include <gio/gio.h>
-#include <list>
+#include <vector>
namespace com { namespace sun { namespace star {
namespace beans {
@@ -82,7 +82,7 @@ private:
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
private:
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren );
diff --git a/ucb/source/ucp/package/pkgcontent.hxx b/ucb/source/ucp/package/pkgcontent.hxx
index f6b0ad555b56..0b57fed019cf 100644
--- a/ucb/source/ucp/package/pkgcontent.hxx
+++ b/ucb/source/ucp/package/pkgcontent.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_UCB_SOURCE_UCP_PACKAGE_PKGCONTENT_HXX
#define INCLUDED_UCB_SOURCE_UCP_PACKAGE_PKGCONTENT_HXX
-#include <list>
+#include <vector>
#include <rtl/ref.hxx>
#include <com/sun/star/ucb/InteractiveBadTransferURLException.hpp>
@@ -165,7 +165,7 @@ private:
flushData();
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren );
bool
diff --git a/ucb/source/ucp/tdoc/tdoc_content.hxx b/ucb/source/ucp/tdoc/tdoc_content.hxx
index baa47bb37fba..cf1032a514da 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.hxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.hxx
@@ -133,7 +133,7 @@ private:
makeNewIdentifier( const OUString& rTitle );
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren );
bool exchangeIdentity(
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.hxx b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
index 571dec7b2fa6..4eb700d91d36 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.hxx
@@ -136,7 +136,7 @@ private:
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren);
bool
diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx
index 8eefba6f2f32..5c0b47bda8ce 100644
--- a/ucb/source/ucp/webdav/webdavcontent.hxx
+++ b/ucb/source/ucp/webdav/webdavcontent.hxx
@@ -104,7 +104,7 @@ private:
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
typedef rtl::Reference< Content > ContentRef;
- typedef std::list< ContentRef > ContentRefList;
+ typedef std::vector< ContentRef > ContentRefList;
void queryChildren( ContentRefList& rChildren);
bool