diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:18:55 +0000 |
commit | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch) | |
tree | 846cce228d7ff120abc40b7767b251c2e04b2a30 /connectivity/source | |
parent | 35f5833ca35dc170b67ed9f8e288302eb06eb972 (diff) |
use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"
Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity/source')
8 files changed, 9 insertions, 18 deletions
diff --git a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx index 59507f5d4b35..34ed9b8f0152 100644 --- a/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx +++ b/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx @@ -856,8 +856,7 @@ void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aA Sequence< OUString > ODatabaseMetaDataResultSet::getSupportedServiceNames_Static( ) throw (RuntimeException) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.ResultSet"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.ResultSet" }; return aSNS; } diff --git a/connectivity/source/commontools/ParamterSubstitution.cxx b/connectivity/source/commontools/ParamterSubstitution.cxx index 1ed3792b5688..ebe096f0f232 100644 --- a/connectivity/source/commontools/ParamterSubstitution.cxx +++ b/connectivity/source/commontools/ParamterSubstitution.cxx @@ -62,8 +62,7 @@ namespace connectivity Sequence< OUString > ParameterSubstitution::getSupportedServiceNames_Static( ) throw (RuntimeException) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdb.ParameterSubstitution"; + Sequence<OUString> aSNS { "com.sun.star.sdb.ParameterSubstitution" }; return aSNS; } diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx index 0761e41c1686..d9783dabc84a 100644 --- a/connectivity/source/drivers/evoab2/NDriver.cxx +++ b/connectivity/source/drivers/evoab2/NDriver.cxx @@ -91,8 +91,7 @@ Sequence< OUString > OEvoabDriver::getSupportedServiceNames_Static( ) throw (Ru { // which service is supported // for more information @see com.sun.star.sdbc.Driver - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx index 5fed74908789..314c2c60c584 100644 --- a/connectivity/source/drivers/jdbc/JDriver.cxx +++ b/connectivity/source/drivers/jdbc/JDriver.cxx @@ -61,8 +61,7 @@ OUString java_sql_Driver::getImplementationName_Static( ) throw(RuntimeExceptio Sequence< OUString > java_sql_Driver::getSupportedServiceNames_Static( ) throw (RuntimeException) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } diff --git a/connectivity/source/drivers/kab/KDriver.cxx b/connectivity/source/drivers/kab/KDriver.cxx index bf7531b9c520..0e50f150d6db 100644 --- a/connectivity/source/drivers/kab/KDriver.cxx +++ b/connectivity/source/drivers/kab/KDriver.cxx @@ -369,8 +369,7 @@ Sequence< OUString > KabDriver::getSupportedServiceNames_Static( ) throw (Runti { // which service is supported // for more information @see com.sun.star.sdbc.Driver - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } diff --git a/connectivity/source/drivers/macab/MacabDriver.cxx b/connectivity/source/drivers/macab/MacabDriver.cxx index 69881a4ac1a4..bb32e6be9cf0 100644 --- a/connectivity/source/drivers/macab/MacabDriver.cxx +++ b/connectivity/source/drivers/macab/MacabDriver.cxx @@ -224,8 +224,7 @@ Sequence< OUString > MacabDriver::getSupportedServiceNames_Static( ) throw (Run { // which service is supported // for more information @see com.sun.star.sdbc.Driver - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } diff --git a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx index cefe066ffde6..25e2cc310699 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MMozillaBootstrap.cxx @@ -82,8 +82,7 @@ Sequence< OUString > MozillaBootstrap::getSupportedServiceNames_Static( ) throw { // which service is supported // for more information @see com.sun.star.mozilla.MozillaBootstrap - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap"; + Sequence<OUString> aSNS { "com.sun.star.mozilla.MozillaBootstrap" }; return aSNS; } @@ -187,8 +186,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mozbootstrap_component_getFactory Reference< XSingleServiceFactory > xFactory; if ( aImplName == "com.sun.star.comp.mozilla.MozillaBootstrap" ) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.mozilla.MozillaBootstrap"; + Sequence<OUString> aSNS { "com.sun.star.mozilla.MozillaBootstrap" }; xFactory = ::cppu::createSingleFactory( static_cast< XMultiServiceFactory* > ( pServiceManager), diff --git a/connectivity/source/drivers/odbc/ODriver.cxx b/connectivity/source/drivers/odbc/ODriver.cxx index 94987f8785fc..21c013a2845c 100644 --- a/connectivity/source/drivers/odbc/ODriver.cxx +++ b/connectivity/source/drivers/odbc/ODriver.cxx @@ -67,8 +67,7 @@ OUString ODBCDriver::getImplementationName_Static( ) throw(RuntimeException) Sequence< OUString > ODBCDriver::getSupportedServiceNames_Static( ) throw (RuntimeException) { - Sequence< OUString > aSNS( 1 ); - aSNS[0] = "com.sun.star.sdbc.Driver"; + Sequence<OUString> aSNS { "com.sun.star.sdbc.Driver" }; return aSNS; } |