summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 13:17:00 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:20:39 +0000
commit96c26b0d9d10fa9bac3695222980d7145f0342d7 (patch)
treed2d2b4e60e8ec98ff4025abfad42be06d29b3c13 /ucb
parent25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (diff)
use initialiser for Sequence<OUString>
using variations of: git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\; \s*OUString\* pArray.*; .*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g" Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3 Reviewed-on: https://gerrit.libreoffice.org/19971 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/core/cmdenv.cxx3
-rw-r--r--ucb/source/sorter/sortdynres.cxx6
-rw-r--r--ucb/source/sorter/sortresult.cxx3
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx3
-rw-r--r--ucb/source/ucp/cmis/cmis_repo_content.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpcontent.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpcontentprovider.cxx3
-rw-r--r--ucb/source/ucp/gio/gio_content.cxx3
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx3
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx6
-rw-r--r--ucb/source/ucp/webdav/webdavcontent.cxx6
11 files changed, 14 insertions, 28 deletions
diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx
index e0f53fc6b6d9..f412435f3e84 100644
--- a/ucb/source/core/cmdenv.cxx
+++ b/ucb/source/core/cmdenv.cxx
@@ -113,8 +113,7 @@ OUString UcbCommandEnvironment::getImplementationName_Static()
uno::Sequence< OUString >
UcbCommandEnvironment::getSupportedServiceNames_Static()
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CommandEnvironment";
+ uno::Sequence<OUString> aSNS { "com.sun.star.ucb.CommandEnvironment" };
return aSNS;
}
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 0030cdc6a731..4487e979918c 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -123,8 +123,7 @@ css::uno::Sequence< OUString > SAL_CALL SortedDynamicResultSet::getSupportedServ
css::uno::Sequence< OUString > SortedDynamicResultSet::getSupportedServiceNames_Static()
{
- css::uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = DYNAMIC_RESULTSET_SERVICE_NAME;
+ css::uno::Sequence<OUString> aSNS { DYNAMIC_RESULTSET_SERVICE_NAME };
return aSNS;
}
@@ -501,8 +500,7 @@ SortedDynamicResultSetFactory_CreateInstance( const css::uno::Reference<
css::uno::Sequence< OUString > SortedDynamicResultSetFactory::getSupportedServiceNames_Static()
{
- css::uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = DYNAMIC_RESULTSET_FACTORY_NAME;
+ css::uno::Sequence<OUString> aSNS { DYNAMIC_RESULTSET_FACTORY_NAME };
return aSNS;
}
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 1a4707e75212..945fee5c9834 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -192,8 +192,7 @@ css::uno::Sequence< OUString > SAL_CALL SortedResultSet::getSupportedServiceName
css::uno::Sequence< OUString >SortedResultSet::getSupportedServiceNames_Static()
{
- css::uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = RESULTSET_SERVICE_NAME;
+ css::uno::Sequence<OUString> aSNS { RESULTSET_SERVICE_NAME };
return aSNS;
}
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 6cf2f195e8f8..44dba8919213 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1706,8 +1706,7 @@ namespace cmis
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException, std::exception )
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.CmisContent";
+ uno::Sequence<OUString> aSNS { "com.sun.star.ucb.CmisContent" };
return aSNS;
}
diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index 644c5c2a3569..0073108bc2a6 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -330,8 +330,7 @@ namespace cmis
uno::Sequence< OUString > SAL_CALL RepoContent::getSupportedServiceNames()
throw( uno::RuntimeException, std::exception )
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.Content";
+ uno::Sequence<OUString> aSNS { "com.sun.star.ucb.Content" };
return aSNS;
}
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 37468de43e22..cac9bdb2b065 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -201,8 +201,7 @@ css::uno::Sequence< OUString > SAL_CALL FTPContent::getSupportedServiceNames()
css::uno::Sequence< OUString > FTPContent::getSupportedServiceNames_Static()
{
- css::uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.FTPContent";
+ css::uno::Sequence<OUString> aSNS { "com.sun.star.ucb.FTPContent" };
return aSNS;
}
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index f85f0a335db6..c6bc270ddb06 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -147,8 +147,7 @@ FTPContentProvider_CreateInstance( const css::uno::Reference<
css::uno::Sequence< OUString > FTPContentProvider::getSupportedServiceNames_Static()
{
- css::uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = FTP_CONTENT_PROVIDER_SERVICE_NAME;
+ css::uno::Sequence<OUString> aSNS { FTP_CONTENT_PROVIDER_SERVICE_NAME };
return aSNS;
}
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index b02e33ef5923..10b24e79a83b 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -1353,8 +1353,7 @@ OUString SAL_CALL Content::getImplementationName() throw( uno::RuntimeException,
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException, std::exception )
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.GIOContent";
+ uno::Sequence<OUString> aSNS { "com.sun.star.ucb.GIOContent" };
return aSNS;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index 7978064596bf..4260e7fffa5f 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -1398,8 +1398,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
// Check, if all required properties were set.
if ( m_aProps.getTitle().isEmpty() )
{
- uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = "Title";
+ uno::Sequence<OUString> aProps { "Title" };
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index e843b516f777..33c2686adbf6 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -345,8 +345,7 @@ OUString SAL_CALL Content::getImplementationName()
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException, std::exception )
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME;
+ uno::Sequence<OUString> aSNS { WEBDAV_CONTENT_SERVICE_NAME };
return aSNS;
}
@@ -2269,8 +2268,7 @@ void Content::insert(
{
OSL_FAIL( "Content::insert - Title missing!" );
- uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = "Title";
+ uno::Sequence<OUString> aProps { "Title" };
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),
diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx
index 1fb3547f7de6..f35c3d99a6bb 100644
--- a/ucb/source/ucp/webdav/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav/webdavcontent.cxx
@@ -450,8 +450,7 @@ OUString SAL_CALL Content::getImplementationName()
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException )
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME;
+ uno::Sequence<OUString> aSNS { WEBDAV_CONTENT_SERVICE_NAME };
return aSNS;
}
@@ -2409,8 +2408,7 @@ void Content::insert(
{
SAL_WARN( "ucb.ucp.webdav", "Content::insert - Title missing!" );
- uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = "Title";
+ uno::Sequence<OUString> aProps { "Title" };
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),