summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-11-15 08:43:35 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-15 10:13:08 +0000
commit8e234c5b7d5bae66c544e581bee5770f3f83dd81 (patch)
tree7d78f03ce2231de4f727d1135449aeb8cba74e99 /connectivity
parent3bdd176731c351638f541a37b94094124f3c9f52 (diff)
use initialiser syntax for Sequence<OUString>
replaced using the script: git grep -lP 'Sequence.*OUString.*\(1\)' | xargs perl -0777 -pi -e "s/Sequence< OUString > (\w+)\(1\); .*\[0\] = (\S+);/Sequence< OUString > \1 { \2 };/g" Change-Id: I23688a91562051a8eed11fc2a85599545c285c34 Reviewed-on: https://gerrit.libreoffice.org/19967 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx3
-rw-r--r--connectivity/source/drivers/evoab2/NCatalog.cxx3
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx3
-rw-r--r--connectivity/source/drivers/evoab2/NTables.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HCatalog.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HColumns.cxx3
-rw-r--r--connectivity/source/drivers/kab/KCatalog.cxx3
-rw-r--r--connectivity/source/drivers/kab/KTables.cxx3
-rw-r--r--connectivity/source/drivers/macab/MacabCatalog.cxx3
-rw-r--r--connectivity/source/drivers/macab/MacabTables.cxx3
-rw-r--r--connectivity/source/drivers/mork/MCatalog.cxx3
-rw-r--r--connectivity/source/drivers/mork/MDriver.cxx3
-rw-r--r--connectivity/source/drivers/mork/MTables.cxx3
-rw-r--r--connectivity/source/drivers/mysql/YCatalog.cxx3
-rw-r--r--connectivity/source/drivers/mysql/YColumns.cxx3
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx3
-rw-r--r--connectivity/source/parse/PColumn.cxx3
17 files changed, 17 insertions, 34 deletions
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 4e4bbc231863..d04dd4e2e19a 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -164,8 +164,7 @@ OUString SAL_CALL OPoolCollection::getImplementationName_Static( ) throw(Runtim
Sequence< OUString > SAL_CALL OPoolCollection::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.sdbc.ConnectionPool";
+ Sequence< OUString > aSupported { "com.sun.star.sdbc.ConnectionPool" };
return aSupported;
}
diff --git a/connectivity/source/drivers/evoab2/NCatalog.cxx b/connectivity/source/drivers/evoab2/NCatalog.cxx
index f5c3938630e7..7d670e3a3f90 100644
--- a/connectivity/source/drivers/evoab2/NCatalog.cxx
+++ b/connectivity/source/drivers/evoab2/NCatalog.cxx
@@ -42,8 +42,7 @@ OEvoabCatalog::OEvoabCatalog(OEvoabConnection* _pCon) :
void OEvoabCatalog::refreshTables()
{
TStringVector aVector;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "TABLE";
+ Sequence< OUString > aTypes { "TABLE" };
Reference< XResultSet > xResult = m_xMetaData->getTables(
Any(), "%", "%", aTypes);
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 5373c2fc6c64..0b9310bbfdc0 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -71,8 +71,7 @@ OUString SAL_CALL OEvoabResultSet::getImplementationName( ) throw ( RuntimeExce
Sequence< OUString > SAL_CALL OEvoabResultSet::getSupportedServiceNames( ) throw( RuntimeException, std::exception)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.sdbc.ResultSet";
+ Sequence< OUString > aSupported { "com.sun.star.sdbc.ResultSet" };
return aSupported;
}
diff --git a/connectivity/source/drivers/evoab2/NTables.cxx b/connectivity/source/drivers/evoab2/NTables.cxx
index db5579d05faf..67a698374843 100644
--- a/connectivity/source/drivers/evoab2/NTables.cxx
+++ b/connectivity/source/drivers/evoab2/NTables.cxx
@@ -49,8 +49,7 @@ ObjectType OEvoabTables::createObject(const OUString& aName)
{
OUString aSchema( "%" );
- Sequence< OUString > aTypes(1);
- aTypes[0] = "TABLE";
+ Sequence< OUString > aTypes { "TABLE" };
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes);
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx
index d02033edcc86..797c51f71915 100644
--- a/connectivity/source/drivers/hsqldb/HCatalog.cxx
+++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx
@@ -70,8 +70,7 @@ void OHCatalog::refreshTables()
void OHCatalog::refreshViews()
{
- Sequence< OUString > aTypes(1);
- aTypes[0] = "VIEW";
+ Sequence< OUString > aTypes { "VIEW" };
bool bSupportsViews = false;
try
diff --git a/connectivity/source/drivers/hsqldb/HColumns.cxx b/connectivity/source/drivers/hsqldb/HColumns.cxx
index 5ddc36cf2fdd..42bd2a735de3 100644
--- a/connectivity/source/drivers/hsqldb/HColumns.cxx
+++ b/connectivity/source/drivers/hsqldb/HColumns.cxx
@@ -71,8 +71,7 @@ void OHSQLColumn::construct()
Sequence< OUString > SAL_CALL OHSQLColumn::getSupportedServiceNames( ) throw(RuntimeException, std::exception)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.sdbcx.Column";
+ Sequence< OUString > aSupported { "com.sun.star.sdbcx.Column" };
return aSupported;
}
diff --git a/connectivity/source/drivers/kab/KCatalog.cxx b/connectivity/source/drivers/kab/KCatalog.cxx
index 818023d7ebb6..c9a48a19ba96 100644
--- a/connectivity/source/drivers/kab/KCatalog.cxx
+++ b/connectivity/source/drivers/kab/KCatalog.cxx
@@ -42,8 +42,7 @@ KabCatalog::KabCatalog(KabConnection* _pCon)
void KabCatalog::refreshTables()
{
TStringVector aVector;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(
Any(),
OUString("%"),
diff --git a/connectivity/source/drivers/kab/KTables.cxx b/connectivity/source/drivers/kab/KTables.cxx
index c74523af506e..085b34b2acd1 100644
--- a/connectivity/source/drivers/kab/KTables.cxx
+++ b/connectivity/source/drivers/kab/KTables.cxx
@@ -41,8 +41,7 @@ sdbcx::ObjectType KabTables::createObject(const OUString& _rName)
aSchema = "%";
aName = _rName;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes);
diff --git a/connectivity/source/drivers/macab/MacabCatalog.cxx b/connectivity/source/drivers/macab/MacabCatalog.cxx
index 33a97c8f13ad..a6c2095e1c78 100644
--- a/connectivity/source/drivers/macab/MacabCatalog.cxx
+++ b/connectivity/source/drivers/macab/MacabCatalog.cxx
@@ -42,8 +42,7 @@ MacabCatalog::MacabCatalog(MacabConnection* _pCon)
void MacabCatalog::refreshTables()
{
TStringVector aVector;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(
Any(), "%", "%", aTypes);
diff --git a/connectivity/source/drivers/macab/MacabTables.cxx b/connectivity/source/drivers/macab/MacabTables.cxx
index ee724de3ec91..a97c034df9d1 100644
--- a/connectivity/source/drivers/macab/MacabTables.cxx
+++ b/connectivity/source/drivers/macab/MacabTables.cxx
@@ -41,8 +41,7 @@ sdbcx::ObjectType MacabTables::createObject(const OUString& _rName)
aSchema = "%";
aName = _rName;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(), aSchema, aName, aTypes);
diff --git a/connectivity/source/drivers/mork/MCatalog.cxx b/connectivity/source/drivers/mork/MCatalog.cxx
index 9a4e935854bb..5ff0755dfabf 100644
--- a/connectivity/source/drivers/mork/MCatalog.cxx
+++ b/connectivity/source/drivers/mork/MCatalog.cxx
@@ -50,8 +50,7 @@ OCatalog::OCatalog(OConnection* _pCon) : connectivity::sdbcx::OCatalog(_pCon)
void OCatalog::refreshTables()
{
TStringVector aVector;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),
"%", "%", aTypes);
diff --git a/connectivity/source/drivers/mork/MDriver.cxx b/connectivity/source/drivers/mork/MDriver.cxx
index 48fd9a8754bb..4c944b90650e 100644
--- a/connectivity/source/drivers/mork/MDriver.cxx
+++ b/connectivity/source/drivers/mork/MDriver.cxx
@@ -47,8 +47,7 @@ OUString MorkDriver::getImplementationName_Static( ) throw(css::uno::RuntimeExc
css::uno::Sequence< OUString > MorkDriver::getSupportedServiceNames_Static( ) throw (css::uno::RuntimeException)
{
- css::uno::Sequence< OUString > aSNS(1);
- aSNS[0] = "com.sun.star.sdbc.Driver";
+ css::uno::Sequence< OUString > aSNS { "com.sun.star.sdbc.Driver" };
return aSNS;
}
diff --git a/connectivity/source/drivers/mork/MTables.cxx b/connectivity/source/drivers/mork/MTables.cxx
index 36150d305d85..310323011e08 100644
--- a/connectivity/source/drivers/mork/MTables.cxx
+++ b/connectivity/source/drivers/mork/MTables.cxx
@@ -50,8 +50,7 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
aSchema = "%";
aName = _rName;
- Sequence< OUString > aTypes(1);
- aTypes[0] = "%";
+ Sequence< OUString > aTypes { "%" };
Reference< XResultSet > xResult = m_xMetaData->getTables(Any(),aSchema,aName,aTypes);
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index ab79da8582d1..6556755ef1fa 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -73,8 +73,7 @@ void OMySQLCatalog::refreshTables()
void OMySQLCatalog::refreshViews()
{
- Sequence< OUString > aTypes(1);
- aTypes[0] = "VIEW";
+ Sequence< OUString > aTypes { "VIEW" };
// let's simply assume the server is new enough to support views. Current drivers
// as of this writing might not return the proper information in getTableTypes, so
diff --git a/connectivity/source/drivers/mysql/YColumns.cxx b/connectivity/source/drivers/mysql/YColumns.cxx
index eae8c5291acd..2f380e50605e 100644
--- a/connectivity/source/drivers/mysql/YColumns.cxx
+++ b/connectivity/source/drivers/mysql/YColumns.cxx
@@ -71,8 +71,7 @@ void OMySQLColumn::construct()
Sequence< OUString > SAL_CALL OMySQLColumn::getSupportedServiceNames( ) throw(RuntimeException, std::exception)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.sdbcx.Column";
+ Sequence< OUString > aSupported { "com.sun.star.sdbcx.Column" };
return aSupported;
}
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 686fdf6ee1a4..bd923f3fafe0 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -533,8 +533,7 @@ OUString SAL_CALL OSDBCDriverManager::getImplementationName_static( ) throw(Run
Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames_static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = getSingletonName_static();
+ Sequence< OUString > aSupported { getSingletonName_static() };
return aSupported;
}
diff --git a/connectivity/source/parse/PColumn.cxx b/connectivity/source/parse/PColumn.cxx
index 04fc07196f9e..39d7ebfedeea 100644
--- a/connectivity/source/parse/PColumn.cxx
+++ b/connectivity/source/parse/PColumn.cxx
@@ -263,8 +263,7 @@ void OOrderColumn::construct()
::com::sun::star::uno::Sequence< OUString > SAL_CALL OOrderColumn::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException, std::exception)
{
- ::com::sun::star::uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.sdb.OrderColumn";
+ ::com::sun::star::uno::Sequence< OUString > aSupported { "com.sun.star.sdb.OrderColumn" };
return aSupported;
}