summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:22:28 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 12:18:55 +0000
commit25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch)
tree846cce228d7ff120abc40b7767b251c2e04b2a30 /dbaccess/source
parent35f5833ca35dc170b67ed9f8e288302eb06eb972 (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 'dbaccess/source')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx3
-rw-r--r--dbaccess/source/core/api/column.cxx6
-rw-r--r--dbaccess/source/core/api/querycomposer.cxx3
-rw-r--r--dbaccess/source/core/api/statement.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx3
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx3
-rw-r--r--dbaccess/source/filter/xml/dbloader2.cxx6
-rw-r--r--dbaccess/source/sdbtools/connection/connectiontools.cxx3
-rw-r--r--dbaccess/source/ui/app/AppController.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx6
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx3
12 files changed, 15 insertions, 30 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index a5503d4342ca..04a7ada7574c 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2256,8 +2256,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
m_pTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,nullptr,m_nInAppend);
xTables = m_pTables;
- Sequence< OUString> aTableFilter(1);
- aTableFilter[0] = "%";
+ Sequence<OUString> aTableFilter { "%" };
m_pTables->construct(aTableFilter,Sequence< OUString>());
}
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index a28361ffe34e..1ee753743485 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -100,8 +100,7 @@ sal_Bool OColumn::supportsService( const OUString& _rServiceName ) throw (Runtim
Sequence< OUString > OColumn::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = SERVICE_SDBCX_COLUMN;
+ Sequence<OUString> aSNS { SERVICE_SDBCX_COLUMN };
return aSNS;
}
@@ -199,8 +198,7 @@ sal_Bool OColumns::supportsService( const OUString& _rServiceName ) throw (Runti
Sequence< OUString > OColumns::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = SERVICE_SDBCX_CONTAINER;
+ Sequence<OUString> aSNS { SERVICE_SDBCX_CONTAINER };
return aSNS;
}
diff --git a/dbaccess/source/core/api/querycomposer.cxx b/dbaccess/source/core/api/querycomposer.cxx
index 5a5f34ef5acb..6a6a7f8ab605 100644
--- a/dbaccess/source/core/api/querycomposer.cxx
+++ b/dbaccess/source/core/api/querycomposer.cxx
@@ -115,8 +115,7 @@ sal_Bool OQueryComposer::supportsService( const OUString& _rServiceName ) throw
Sequence< OUString > OQueryComposer::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = SERVICE_SDB_SQLQUERYCOMPOSER;
+ Sequence<OUString> aSNS { SERVICE_SDB_SQLQUERYCOMPOSER };
return aSNS;
}
diff --git a/dbaccess/source/core/api/statement.cxx b/dbaccess/source/core/api/statement.cxx
index 24f5929d68da..44c96f289a4d 100644
--- a/dbaccess/source/core/api/statement.cxx
+++ b/dbaccess/source/core/api/statement.cxx
@@ -436,8 +436,7 @@ sal_Bool OStatement::supportsService( const OUString& _rServiceName ) throw (Run
Sequence< OUString > OStatement::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[0] = SERVICE_SDBC_STATEMENT;
+ Sequence<OUString> aSNS { SERVICE_SDBC_STATEMENT };
return aSNS;
}
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 91aabfd8d611..8ff8df3a447d 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -212,8 +212,7 @@ Reference< XInterface > ODatabaseContext::Create(const Reference< XComponentCont
Sequence< OUString > ODatabaseContext::getSupportedServiceNames_static() throw( RuntimeException )
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = "com.sun.star.sdb.DatabaseContext";
+ Sequence<OUString> aSNS { "com.sun.star.sdb.DatabaseContext" };
return aSNS;
}
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 57eb40a2fada..5a107f04ba41 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -124,8 +124,7 @@ sal_Bool SAL_CALL DatabaseDataProvider::supportsService( const OUString& _rServi
uno::Sequence< OUString > DatabaseDataProvider::getSupportedServiceNames_Static( ) throw (uno::RuntimeException)
{
- uno::Sequence< OUString > aSNS( 1 );
- aSNS[0] = "com.sun.star.chart2.data.DatabaseDataProvider";
+ uno::Sequence<OUString> aSNS { "com.sun.star.chart2.data.DatabaseDataProvider" };
return aSNS;
}
diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx
index 84cd8273e85e..ce5b7167d478 100644
--- a/dbaccess/source/filter/xml/dbloader2.cxx
+++ b/dbaccess/source/filter/xml/dbloader2.cxx
@@ -208,8 +208,7 @@ Sequence< OUString > SAL_CALL DBTypeDetection::getSupportedServiceNames() throw(
// ORegistryServiceManager_Static
Sequence< OUString > DBTypeDetection::getSupportedServiceNames_Static() throw( )
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = "com.sun.star.document.ExtendedTypeDetection";
+ Sequence<OUString> aSNS { "com.sun.star.document.ExtendedTypeDetection" };
return aSNS;
}
@@ -299,8 +298,7 @@ Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames() throw(
// ORegistryServiceManager_Static
Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static() throw( )
{
- Sequence< OUString > aSNS( 1 );
- aSNS[0] = "com.sun.star.frame.FrameLoader";
+ Sequence<OUString> aSNS { "com.sun.star.frame.FrameLoader" };
return aSNS;
}
diff --git a/dbaccess/source/sdbtools/connection/connectiontools.cxx b/dbaccess/source/sdbtools/connection/connectiontools.cxx
index 7dc78738bc48..b2c648f41922 100644
--- a/dbaccess/source/sdbtools/connection/connectiontools.cxx
+++ b/dbaccess/source/sdbtools/connection/connectiontools.cxx
@@ -119,8 +119,7 @@ namespace sdbtools
Sequence< OUString > SAL_CALL ConnectionTools::getSupportedServiceNames_static()
{
- Sequence< OUString > aSupported( 1 );
- aSupported[0] = "com.sun.star.sdb.tools.ConnectionTools";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.tools.ConnectionTools" };
return aSupported;
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 54ccc81c44c8..4fca0c824b0a 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -169,8 +169,7 @@ OUString OApplicationController::getImplementationName_Static() throw( RuntimeEx
Sequence< OUString> OApplicationController::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.application.DefaultViewController";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.application.DefaultViewController" };
return aSupported;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index ff47a4c63196..52c76f11ab38 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -120,8 +120,7 @@ namespace dbaui
}
static Sequence< OUString > getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.sdb.ViewDesign";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.ViewDesign" };
return aSupported;
}
static Reference< XInterface > SAL_CALL Create(const Reference< XMultiServiceFactory >& _rM)
@@ -311,8 +310,7 @@ OUString OQueryController::getImplementationName_Static() throw( RuntimeExceptio
Sequence< OUString> OQueryController::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.sdb.QueryDesign";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.QueryDesign" };
return aSupported;
}
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index bb8c09feee30..29a71be5b36b 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -103,8 +103,7 @@ OUString ORelationController::getImplementationName_Static() throw( RuntimeExcep
Sequence< OUString> ORelationController::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.RelationDesign";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.RelationDesign" };
return aSupported;
}
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index b923b2fef0a4..26e48f5e5b0f 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -123,8 +123,7 @@ OUString OTableController::getImplementationName_Static() throw( RuntimeExceptio
Sequence< OUString> OTableController::getSupportedServiceNames_Static() throw( RuntimeException )
{
- Sequence< OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.TableDesign";
+ Sequence<OUString> aSupported { "com.sun.star.sdb.TableDesign" };
return aSupported;
}