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>
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index fcee9b0..823bdea 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 2689e2c..253cbbb 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 633b7d2..b9a83a1 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 295a866..2646425 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 587f068..e9e3296 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") } ;
}
diff --git a/xmlhelp/source/cxxhelp/provider/provider.cxx b/xmlhelp/source/cxxhelp/provider/provider.cxx
index ff6db4b..6c52e03 100644
--- a/xmlhelp/source/cxxhelp/provider/provider.cxx
+++ b/xmlhelp/source/cxxhelp/provider/provider.cxx
@@ -140,11 +140,7 @@ ContentProvider_CreateInstance(
uno::Sequence< OUString >
ContentProvider::getSupportedServiceNames_Static()
{
uno::Sequence< OUString > aSNS( 2 );
aSNS.getArray()[ 0 ] = MYUCP_CONTENT_PROVIDER_SERVICE_NAME1;
aSNS.getArray()[ 1 ] = MYUCP_CONTENT_PROVIDER_SERVICE_NAME2;
return aSNS;
return { MYUCP_CONTENT_PROVIDER_SERVICE_NAME1, MYUCP_CONTENT_PROVIDER_SERVICE_NAME2 };
}
// Service factory implementation.
diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx
index 16aa313..73adce6 100644
--- a/xmlhelp/source/treeview/tvfactory.cxx
+++ b/xmlhelp/source/treeview/tvfactory.cxx
@@ -117,8 +117,7 @@ TVFactory::createInstanceWithArguments(
Sequence< OUString > SAL_CALL
TVFactory::getAvailableServiceNames( )
{
Sequence<OUString> seq { "com.sun.star.ucb.HierarchyDataReadAccess" };
return seq;
return { "com.sun.star.ucb.HierarchyDataReadAccess" };
}
// static