tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in dbaccess
Change-Id: I7f91b5fd8ac1dfbf6244c408391a595f5250aa71
Reviewed-on: https://gerrit.libreoffice.org/77563
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 919ece8..1485d77 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -478,13 +478,8 @@ sal_Bool SAL_CALL ORowSet::supportsService( const OUString& _rServiceName )
Sequence< OUString > SAL_CALL ORowSet::getSupportedServiceNames()
{
Sequence< OUString > aSNS( 5 );
aSNS[0] = SERVICE_SDBC_RESULTSET;
aSNS[1] = SERVICE_SDBC_ROWSET;
aSNS[2] = SERVICE_SDBCX_RESULTSET;
aSNS[3] = SERVICE_SDB_RESULTSET;
aSNS[4] = SERVICE_SDB_ROWSET;
return aSNS;
return Sequence< OUString >{ SERVICE_SDBC_RESULTSET, SERVICE_SDBC_ROWSET,
SERVICE_SDBCX_RESULTSET, SERVICE_SDB_RESULTSET, SERVICE_SDB_ROWSET };
}
// OComponentHelper
@@ -2875,10 +2870,7 @@ sal_Bool ORowSetClone::supportsService( const OUString& _rServiceName )
Sequence< OUString > ORowSetClone::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = SERVICE_SDBC_RESULTSET;
aSNS[1] = SERVICE_SDB_RESULTSET;
return aSNS;
return Sequence< OUString > { SERVICE_SDBC_RESULTSET, SERVICE_SDB_RESULTSET };
}
// OComponentHelper
diff --git a/dbaccess/source/core/api/callablestatement.cxx b/dbaccess/source/core/api/callablestatement.cxx
index 542e708..db0db36 100644
--- a/dbaccess/source/core/api/callablestatement.cxx
+++ b/dbaccess/source/core/api/callablestatement.cxx
@@ -78,10 +78,7 @@ OUString OCallableStatement::getImplementationName( )
Sequence< OUString > OCallableStatement::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS.getArray()[0] = SERVICE_SDBC_CALLABLESTATEMENT;
aSNS.getArray()[1] = SERVICE_SDB_CALLABLESTATEMENT;
return aSNS;
return Sequence< OUString > { SERVICE_SDBC_CALLABLESTATEMENT, SERVICE_SDB_CALLABLESTATEMENT };
}
// XOutParameters
diff --git a/dbaccess/source/core/api/datacolumn.cxx b/dbaccess/source/core/api/datacolumn.cxx
index bcf0f94..3ce0dbb 100644
--- a/dbaccess/source/core/api/datacolumn.cxx
+++ b/dbaccess/source/core/api/datacolumn.cxx
@@ -89,11 +89,8 @@ OUString ODataColumn::getImplementationName( )
Sequence< OUString > ODataColumn::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 3 );
aSNS[0] = SERVICE_SDBCX_COLUMN;
aSNS[1] = SERVICE_SDB_RESULTCOLUMN;
aSNS[2] = SERVICE_SDB_DATACOLUMN;
return aSNS;
return Sequence< OUString > { SERVICE_SDBCX_COLUMN, SERVICE_SDB_RESULTCOLUMN,
SERVICE_SDB_DATACOLUMN };
}
// OComponentHelper
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 8ca2c6f..2cd33cf 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -92,10 +92,8 @@ OUString OTableColumnDescriptor::getImplementationName( )
Sequence< OUString > OTableColumnDescriptor::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = m_bActAsDescriptor ? OUString(SERVICE_SDBCX_COLUMNDESCRIPTOR) : OUString(SERVICE_SDBCX_COLUMN);
aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
return aSNS;
return Sequence< OUString > { m_bActAsDescriptor? OUString(SERVICE_SDBCX_COLUMNDESCRIPTOR) : OUString(SERVICE_SDBCX_COLUMN),
SERVICE_SDB_COLUMNSETTINGS };
}
// comphelper::OPropertyArrayUsageHelper
@@ -438,10 +436,7 @@ OUString OTableColumnDescriptorWrapper::getImplementationName( )
Sequence< OUString > OTableColumnDescriptorWrapper::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = SERVICE_SDBCX_COLUMNDESCRIPTOR;
aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
return aSNS;
return Sequence< OUString > { SERVICE_SDBCX_COLUMNDESCRIPTOR, SERVICE_SDB_COLUMNSETTINGS };
}
// comphelper::OPropertyArrayUsageHelper
@@ -599,10 +594,7 @@ OUString OTableColumnWrapper::getImplementationName( )
Sequence< OUString > OTableColumnWrapper::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = SERVICE_SDBCX_COLUMN;
aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
return aSNS;
return Sequence< OUString > { SERVICE_SDBCX_COLUMN, SERVICE_SDB_COLUMNSETTINGS };
}
::cppu::IPropertyArrayHelper& OTableColumnWrapper::getInfoHelper()
diff --git a/dbaccess/source/core/api/preparedstatement.cxx b/dbaccess/source/core/api/preparedstatement.cxx
index 1eb91f2..012792c 100644
--- a/dbaccess/source/core/api/preparedstatement.cxx
+++ b/dbaccess/source/core/api/preparedstatement.cxx
@@ -119,10 +119,7 @@ sal_Bool OPreparedStatement::supportsService( const OUString& _rServiceName )
Sequence< OUString > OPreparedStatement::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS.getArray()[0] = SERVICE_SDBC_PREPAREDSTATEMENT;
aSNS.getArray()[1] = SERVICE_SDB_PREPAREDSTATMENT;
return aSNS;
return Sequence< OUString > { SERVICE_SDBC_PREPAREDSTATEMENT, SERVICE_SDB_PREPAREDSTATMENT };
}
// OComponentHelper
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index f38485c..3e2f017 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -223,10 +223,7 @@ sal_Bool SAL_CALL OQueryDescriptor_Base::supportsService( const OUString& _rServ
Sequence< OUString > SAL_CALL OQueryDescriptor_Base::getSupportedServiceNames( )
{
Sequence< OUString > aSupported(2);
aSupported.getArray()[0] = SERVICE_SDB_DATASETTINGS;
aSupported.getArray()[1] = SERVICE_SDB_QUERYDESCRIPTOR;
return aSupported;
return Sequence< OUString > { SERVICE_SDB_DATASETTINGS, SERVICE_SDB_QUERYDESCRIPTOR };
}
void OQueryDescriptor_Base::disposeColumns()
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 69bdae0..3c91cce 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -116,10 +116,7 @@ OUString OResultColumn::getImplementationName( )
Sequence< OUString > OResultColumn::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = SERVICE_SDBCX_COLUMN;
aSNS[1] = SERVICE_SDB_RESULTCOLUMN;
return aSNS;
return Sequence< OUString > { SERVICE_SDBCX_COLUMN, SERVICE_SDB_RESULTCOLUMN };
}
// OComponentHelper
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index 7b2bc25..5a7514f 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -179,10 +179,7 @@ sal_Bool OResultSet::supportsService( const OUString& _rServiceName )
Sequence< OUString > OResultSet::getSupportedServiceNames( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = SERVICE_SDBC_RESULTSET;
aSNS[1] = SERVICE_SDB_RESULTSET;
return aSNS;
return Sequence< OUString > { SERVICE_SDBC_RESULTSET, SERVICE_SDB_RESULTSET };
}
// css::beans::XPropertySet
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index bcaf7a3..950ce08 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -152,10 +152,7 @@ OUString SAL_CALL ODefinitionContainer::getImplementationName( )
Sequence< OUString > SAL_CALL ODefinitionContainer::getSupportedServiceNames( )
{
Sequence< OUString > aReturn(2);
aReturn.getArray()[0] = "com.sun.star.sdb.DefinitionContainer";
aReturn.getArray()[1] = "com.sun.star.ucb.Content";
return aReturn;
return Sequence< OUString > { "com.sun.star.sdb.DefinitionContainer", "com.sun.star.ucb.Content" };
}
// XNameContainer
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 5f1bfa8..c179d12 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -119,9 +119,7 @@ IMPLEMENT_PROPERTYCONTAINER_DEFAULTS(ODocumentContainer)
Sequence< OUString > SAL_CALL ODocumentContainer::getSupportedServiceNames( )
{
Sequence< OUString > aSupported(1);
aSupported[0] = m_bFormsContainer ? OUString(SERVICE_NAME_FORM_COLLECTION) : OUString(SERVICE_NAME_REPORT_COLLECTION);
return aSupported;
return Sequence< OUString > { m_bFormsContainer ? OUString(SERVICE_NAME_FORM_COLLECTION) : OUString(SERVICE_NAME_REPORT_COLLECTION) };
}
OUString ODocumentContainer::determineContentType() const
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index a0c60fb..7c49277 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -123,8 +123,7 @@ sal_Bool SAL_CALL DatabaseDataProvider::supportsService( const OUString& _rServi
uno::Sequence< OUString > DatabaseDataProvider::getSupportedServiceNames_Static( )
{
uno::Sequence<OUString> aSNS { "com.sun.star.chart2.data.DatabaseDataProvider" };
return aSNS;
return uno::Sequence<OUString> { "com.sun.star.chart2.data.DatabaseDataProvider" };
}
uno::Sequence< OUString > SAL_CALL DatabaseDataProvider::getSupportedServiceNames( )
diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx
index a86fb44..d4903a4 100644
--- a/dbaccess/source/ui/browser/dbloader.cxx
+++ b/dbaccess/source/ui/browser/dbloader.cxx
@@ -130,10 +130,7 @@ Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames()
// ORegistryServiceManager_Static
Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static() throw( )
{
Sequence< OUString > aSNS( 2 );
aSNS[0] = "com.sun.star.frame.FrameLoader";
aSNS[1] = "com.sun.star.sdb.ContentLoader";
return aSNS;
return Sequence< OUString > { "com.sun.star.frame.FrameLoader", "com.sun.star.sdb.ContentLoader" };
}
void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OUString& rURL,
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 1e022db..eba9dd0 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -137,11 +137,8 @@ OUString SbaXGridControl::getImplementationName_Static()
Sequence< OUString> SbaXGridControl::getSupportedServiceNames_Static()
{
Sequence< OUString> aSupported(3);
aSupported[0] = "com.sun.star.form.control.InteractionGridControl";
aSupported[1] = "com.sun.star.form.control.GridControl";
aSupported[2] = "com.sun.star.awt.UnoControl";
return aSupported;
return Sequence< OUString> { "com.sun.star.form.control.InteractionGridControl", "com.sun.star.form.control.GridControl",
"com.sun.star.awt.UnoControl" };
}
SbaXGridControl::SbaXGridControl(const Reference< XComponentContext >& _rM)