summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-08-17 11:58:10 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-08-17 13:30:06 +0200
commit1c3d143cd4e16271e1ede4484dac2a894f2c9c38 (patch)
tree25e54678ae94a71c394a8f8f62e50482a4d533d8 /ucb
parentb4092c738321cd9f9e2cba18a49519abcbd4451a (diff)
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in ucb, xmlhelp Change-Id: I79f6378cff14c71987f77e0c08e0107bd4b3eefb Reviewed-on: https://gerrit.libreoffice.org/77623 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx5
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx5
-rw-r--r--ucb/source/ucp/file/filtask.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchydatasource.cxx5
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx8
5 files changed, 5 insertions, 22 deletions
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index fcee9b022e68..823bdea776ab 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -169,10 +169,7 @@ namespace ucb { namespace ucp { namespace ext
Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
{
- Sequence< OUString > aServiceNames(2);
- aServiceNames[0] = "com.sun.star.ucb.Content";
- aServiceNames[1] = "com.sun.star.ucb.ExtensionContent";
- return aServiceNames;
+ return { "com.sun.star.ucb.Content", "com.sun.star.ucb.ExtensionContent" };
}
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index 2689e2c9e2bb..253cbbb91d79 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -68,10 +68,7 @@ namespace ucb { namespace ucp { namespace ext
Sequence< OUString > ContentProvider::getSupportedServiceNames_static( )
{
- Sequence< OUString > aServiceNames(2);
- aServiceNames[0] = "com.sun.star.ucb.ContentProvider";
- aServiceNames[1] = "com.sun.star.ucb.ExtensionContentProvider";
- return aServiceNames;
+ return { "com.sun.star.ucb.ContentProvider", "com.sun.star.ucb.ExtensionContentProvider" };
}
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index 633b7d2c87b9..b9a83a186dff 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -2952,9 +2952,7 @@ TaskManager::getImplementationName_static()
uno::Sequence< OUString >
TaskManager::getSupportedServiceNames_static()
{
- OUString Supported("com.sun.star.ucb.FileContentProvider");
- css::uno::Sequence< OUString > Seq( &Supported,1 );
- return Seq;
+ return { "com.sun.star.ucb.FileContentProvider" };
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 295a86612448..2646425394de 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -242,10 +242,7 @@ HierarchyDataSource_CreateInstance( const css::uno::Reference< css::lang::XMulti
css::uno::Sequence< OUString >
HierarchyDataSource::getSupportedServiceNames_Static()
{
- uno::Sequence< OUString > aSNS( 2 );
- aSNS[ 0 ] = "com.sun.star.ucb.DefaultHierarchyDataSource";
- aSNS[ 1 ] = "com.sun.star.ucb.HierarchyDataSource";
- return aSNS;
+ return { "com.sun.star.ucb.DefaultHierarchyDataSource", "com.sun.star.ucb.HierarchyDataSource" };
}
ONE_INSTANCE_SERVICE_FACTORY_IMPL( HierarchyDataSource );
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 587f0682e5ca..e9e3296900b3 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -367,13 +367,7 @@ OUString SAL_CALL Content::getImplementationName()
// virtual
uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
{
- uno::Sequence< OUString > aSNS( 1 );
- if ( isFolder() )
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.PackageFolderContent";
- else
- aSNS.getArray()[ 0 ] = "com.sun.star.ucb.PackageStreamContent";
-
- return aSNS;
+ return { isFolder()? OUString("com.sun.star.ucb.PackageFolderContent"):OUString("com.sun.star.ucb.PackageStreamContent") } ;
}