summaryrefslogtreecommitdiff
path: root/dbaccess
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 /dbaccess
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 'dbaccess')
-rw-r--r--dbaccess/source/core/dataaccess/bookmarkcontainer.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/connection.cxx3
-rw-r--r--dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx6
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx3
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationwizard.cxx3
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx6
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx3
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx3
8 files changed, 10 insertions, 20 deletions
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 05faa3668652..a7490bd7cd01 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -81,8 +81,7 @@ sal_Bool SAL_CALL OBookmarkContainer::supportsService( const OUString& _rService
Sequence< OUString > SAL_CALL OBookmarkContainer::getSupportedServiceNames( ) throw(RuntimeException, std::exception)
{
- Sequence< OUString > aReturn(1);
- aReturn.getArray()[0] = "com.sun.star.sdb.DefinitionContainer";
+ Sequence< OUString > aReturn { "com.sun.star.sdb.DefinitionContainer" };
return aReturn;
}
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index a86507ffa779..3589548024cf 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -667,8 +667,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstanceWithArguments( const
Sequence< OUString > SAL_CALL OConnection::getAvailableServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aRet(1);
- aRet[0] = SERVICE_NAME_SINGLESELECTQUERYCOMPOSER;
+ Sequence< OUString > aRet { SERVICE_NAME_SINGLESELECTQUERYCOMPOSER };
return aRet;
}
diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index ce54c09ab62c..567e2312cafd 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -188,8 +188,7 @@ namespace dbaccess
Sequence< OUString > SAL_CALL DataAccessDescriptor::getSupportedServiceNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aServices(1);
- aServices[0] = "com.sun.star.sdb.DataAccessDescriptor";
+ Sequence< OUString > aServices { "com.sun.star.sdb.DataAccessDescriptor" };
return aServices;
}
@@ -256,8 +255,7 @@ namespace dbaccess
Sequence< OUString > DataAccessDescriptorFactory::getSupportedServiceNames_static() throw( RuntimeException )
{
- Sequence< OUString > aServices(1);
- aServices[0] = getSingletonName_static();
+ Sequence< OUString > aServices { getSingletonName_static() };
return aServices;
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 559505d7e2b4..3b07612b313e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2094,8 +2094,7 @@ Reference< XEnumeration > SAL_CALL ODatabaseDocument::getControllers( ) throw (
Sequence< OUString > SAL_CALL ODatabaseDocument::getAvailableViewControllerNames( ) throw (RuntimeException, std::exception)
{
- Sequence< OUString > aNames(1);
- aNames[0] = SERVICE_SDB_APPLICATIONCONTROLLER;
+ Sequence< OUString > aNames { SERVICE_SDB_APPLICATIONCONTROLLER };
return aNames;
}
diff --git a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
index ebdf5a8860cf..33ee622dd22d 100644
--- a/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationwizard.cxx
@@ -143,8 +143,7 @@ namespace dbmm
Sequence< OUString > SAL_CALL MacroMigrationDialogService::getSupportedServiceNames_static() throw(RuntimeException)
{
- Sequence< OUString > aServices(1);
- aServices[0] = "com.sun.star.sdb.application.MacroMigrationWizard";
+ Sequence< OUString > aServices { "com.sun.star.sdb.application.MacroMigrationWizard" };
return aServices;
}
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 72124df81138..220349b7cba1 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -114,8 +114,7 @@ namespace dbaxml
Sequence< OUString > SAL_CALL ODBExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.document.ExportFilter";
+ Sequence< OUString > aSupported { "com.sun.star.document.ExportFilter" };
return aSupported;
}
@@ -129,8 +128,7 @@ namespace dbaxml
}
Sequence< OUString > SAL_CALL ODBFullExportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.document.ExportFilter";
+ Sequence< OUString > aSupported { "com.sun.star.document.ExportFilter" };
return aSupported;
}
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index da5b77b4a6cb..e1eec6b5f397 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -623,8 +623,7 @@ namespace dbaui
}
// the properties which need to be set on the new content
- Sequence< OUString > aNewDirectoryProperties(1);
- aNewDirectoryProperties[0] = "Title";
+ Sequence< OUString > aNewDirectoryProperties { "Title" };
// the values to be set
Sequence< Any > aNewDirectoryAttributes(1);
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index b49bd07b13e2..8f70184dd87e 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -284,8 +284,7 @@ namespace dbaui
Reference<XModifiable> xModi(getDataSourceOrModel(xProp),UNO_QUERY);
bool bModified = ( xModi.is() && xModi->isModified() );
- Sequence< OUString > aNewTableFilter(1);
- aNewTableFilter[0] = "%";
+ Sequence< OUString > aNewTableFilter { "%" };
xProp->setPropertyValue(PROPERTY_TABLEFILTER,makeAny(aNewTableFilter));
xProp->setPropertyValue( PROPERTY_TABLETYPEFILTER, makeAny( Sequence< OUString >() ) );