diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2019-08-16 10:52:32 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2019-08-16 15:11:00 +0200 |
commit | 2379f36bd809c3cf3be71315a85946e273023a8c (patch) | |
tree | b7a272976004302f4947e69551f67cb10f359b3b /dbaccess/source | |
parent | 9a03308fafee8f424eba399c1aae56af02beafb0 (diff) |
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>
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/core/api/callablestatement.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/datacolumn.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/api/definitioncolumn.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/core/api/preparedstatement.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/querydescriptor.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/resultcolumn.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/api/resultset.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/definitioncontainer.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documentcontainer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/misc/DatabaseDataProvider.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbloader.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 7 |
13 files changed, 20 insertions, 66 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 919ece8761c9..1485d77dcdec 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 542e7089098d..db0db3695e0d 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 bcf0f9450bfd..3ce0dbb9ccaf 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 8ca2c6fd9a6f..2cd33cfbd2fc 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 1eb91f2615ec..012792c512c2 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 f38485cacd3e..3e2f017d37ad 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 69bdae0e1467..3c91cce4a303 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 7b2bc25e6096..5a7514fecd49 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 bcaf7a36927f..950ce083db62 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 5f1bfa87effa..c179d1234b13 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 a0c60fbad1d8..7c4927765c5e 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 a86fb44eb518..d4903a4de4fa 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 1e022db90320..eba9dd077461 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) |