summaryrefslogtreecommitdiff
path: root/reportdesign
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 /reportdesign
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 'reportdesign')
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx3
-rw-r--r--reportdesign/source/core/api/FixedText.cxx3
-rw-r--r--reportdesign/source/core/api/FormatCondition.cxx3
-rw-r--r--reportdesign/source/core/api/Function.cxx3
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx3
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx3
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx3
-rw-r--r--reportdesign/source/core/api/Shape.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx18
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx3
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx15
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx9
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx3
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx3
-rw-r--r--reportdesign/source/ui/inspection/ReportComponentHandler.cxx3
16 files changed, 27 insertions, 54 deletions
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 42df349e9998..8c2b7fc306ca 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -218,8 +218,7 @@ OUString SAL_CALL OFixedLine::getImplementationName( ) throw(uno::RuntimeExcept
uno::Sequence< OUString > OFixedLine::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_FIXEDLINE;
+ uno::Sequence< OUString > aServices { SERVICE_FIXEDLINE };
return aServices;
}
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index a64edfb08b2a..bbd1da439322 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -106,8 +106,7 @@ OUString SAL_CALL OFixedText::getImplementationName( ) throw(uno::RuntimeExcept
uno::Sequence< OUString > OFixedText::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_FIXEDTEXT;
+ uno::Sequence< OUString > aServices { SERVICE_FIXEDTEXT };
return aServices;
}
diff --git a/reportdesign/source/core/api/FormatCondition.cxx b/reportdesign/source/core/api/FormatCondition.cxx
index 2166a3ff86ba..92835ea2d82a 100644
--- a/reportdesign/source/core/api/FormatCondition.cxx
+++ b/reportdesign/source/core/api/FormatCondition.cxx
@@ -72,8 +72,7 @@ OUString SAL_CALL OFormatCondition::getImplementationName( ) throw(uno::Runtime
uno::Sequence< OUString > OFormatCondition::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_FORMATCONDITION;
+ uno::Sequence< OUString > aServices { SERVICE_FORMATCONDITION };
return aServices;
}
diff --git a/reportdesign/source/core/api/Function.cxx b/reportdesign/source/core/api/Function.cxx
index 6b7ca7282310..43bc4b7a1aae 100644
--- a/reportdesign/source/core/api/Function.cxx
+++ b/reportdesign/source/core/api/Function.cxx
@@ -72,8 +72,7 @@ OUString SAL_CALL OFunction::getImplementationName( ) throw(uno::RuntimeExcepti
uno::Sequence< OUString > OFunction::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_FUNCTION;
+ uno::Sequence< OUString > aServices { SERVICE_FUNCTION };
return aServices;
}
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index 36355d0d53ae..92bd06598397 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -180,8 +180,7 @@ OUString SAL_CALL OImageControl::getImplementationName( ) throw(uno::RuntimeExc
uno::Sequence< OUString > OImageControl::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_IMAGECONTROL;
+ uno::Sequence< OUString > aServices { SERVICE_IMAGECONTROL };
return aServices;
}
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 4cf3f71ee96b..3355055e776c 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -711,8 +711,7 @@ OUString SAL_CALL OReportDefinition::getImplementationName( ) throw(uno::Runtim
uno::Sequence< OUString > OReportDefinition::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_REPORTDEFINITION;
+ uno::Sequence< OUString > aServices { SERVICE_REPORTDEFINITION };
return aServices;
}
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index db24846fb052..d2be19e0c9df 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -97,8 +97,7 @@ OUString SAL_CALL OReportEngineJFree::getImplementationName( ) throw(uno::Runti
uno::Sequence< OUString > OReportEngineJFree::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices[0] = "com.sun.star.report.ReportEngine";
+ uno::Sequence< OUString > aServices { "com.sun.star.report.ReportEngine" };
return aServices;
}
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index ec562862d27d..0ff1778939fe 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -133,8 +133,7 @@ OUString SAL_CALL OShape::getImplementationName( ) throw(uno::RuntimeException,
uno::Sequence< OUString > OShape::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_SHAPE;
+ uno::Sequence< OUString > aServices { SERVICE_SHAPE };
return aServices;
}
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 7da95327f7dd..4dd2bf449527 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -82,8 +82,7 @@ namespace rptxml
Sequence< OUString > ORptExportHelper::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;
}
@@ -99,8 +98,7 @@ namespace rptxml
Sequence< OUString > ORptContentExportHelper::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;
}
@@ -118,8 +116,7 @@ namespace rptxml
Sequence< OUString > ORptStylesExportHelper::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;
}
@@ -136,8 +133,7 @@ namespace rptxml
Sequence< OUString > ORptMetaExportHelper::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;
}
@@ -154,8 +150,7 @@ namespace rptxml
Sequence< OUString > 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;
}
@@ -316,8 +311,7 @@ OUString ORptExport::getImplementationName_Static( ) throw(uno::RuntimeExceptio
uno::Sequence< OUString > ORptExport::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = "com.sun.star.document.ExportFilter";
+ uno::Sequence< OUString > aServices { "com.sun.star.document.ExportFilter" };
return aServices;
}
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index e8be136df26d..638a5bc20799 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -118,8 +118,7 @@ OUString ExportDocumentHandler::getImplementationName_Static( ) throw(uno::Runt
uno::Sequence< OUString > ExportDocumentHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.ExportDocumentHandler";
+ uno::Sequence< OUString > aSupported { "com.sun.star.report.ExportDocumentHandler" };
return aSupported;
}
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index b25b34c3288e..b173f7056067 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -89,8 +89,7 @@ OUString ImportDocumentHandler::getImplementationName_Static( ) throw(uno::Runt
uno::Sequence< OUString > ImportDocumentHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.ImportDocumentHandler";
+ uno::Sequence< OUString > aSupported { "com.sun.star.report.ImportDocumentHandler" };
return aSupported;
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 50eb48c1b077..27cd7b8ba921 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -292,8 +292,7 @@ OUString ORptImportHelper::getImplementationName_Static( ) throw (RuntimeExcept
Sequence< OUString > ORptImportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = SERVICE_IMPORTFILTER;
+ Sequence< OUString > aSupported { SERVICE_IMPORTFILTER };
return aSupported;
}
@@ -310,8 +309,7 @@ OUString ORptContentImportHelper::getImplementationName_Static( ) throw (Runtim
Sequence< OUString > ORptContentImportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = SERVICE_IMPORTFILTER;
+ Sequence< OUString > aSupported { SERVICE_IMPORTFILTER };
return aSupported;
}
@@ -330,8 +328,7 @@ OUString ORptStylesImportHelper::getImplementationName_Static( ) throw (Runtime
Sequence< OUString > ORptStylesImportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = SERVICE_IMPORTFILTER;
+ Sequence< OUString > aSupported { SERVICE_IMPORTFILTER };
return aSupported;
}
@@ -349,8 +346,7 @@ OUString ORptMetaImportHelper::getImplementationName_Static( ) throw (RuntimeEx
Sequence< OUString > ORptMetaImportHelper::getSupportedServiceNames_Static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = SERVICE_IMPORTFILTER;
+ Sequence< OUString > aSupported { SERVICE_IMPORTFILTER };
return aSupported;
}
@@ -396,8 +392,7 @@ OUString ORptFilter::getImplementationName_Static( ) throw(uno::RuntimeExceptio
uno::Sequence< OUString > ORptFilter::getSupportedServiceNames_Static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aServices(1);
- aServices.getArray()[0] = SERVICE_IMPORTFILTER;
+ uno::Sequence< OUString > aServices { SERVICE_IMPORTFILTER };
return aServices;
}
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 3659ce67c1f6..1d0a3071ed43 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -94,8 +94,7 @@ OUString DataProviderHandler::getImplementationName_Static( ) throw(uno::Runtim
uno::Sequence< OUString > DataProviderHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.inspection.DataProviderHandler";
+ uno::Sequence< OUString > aSupported { "com.sun.star.report.inspection.DataProviderHandler" };
return aSupported;
}
@@ -387,8 +386,7 @@ uno::Sequence< beans::Property > SAL_CALL DataProviderHandler::getSupportedPrope
uno::Sequence< OUString > SAL_CALL DataProviderHandler::getSupersededProperties() throw (uno::RuntimeException, std::exception)
{
- uno::Sequence< OUString > aRet(1);
- aRet[0] = PROPERTY_TITLE; // have a look at OPropertyInfoService::getExcludeProperties
+ uno::Sequence< OUString > aRet { PROPERTY_TITLE }; // have a look at OPropertyInfoService::getExcludeProperties
return aRet;
}
@@ -396,8 +394,7 @@ uno::Sequence< OUString > SAL_CALL DataProviderHandler::getActuatingProperties()
{
::osl::MutexGuard aGuard( m_aMutex );
- uno::Sequence< OUString > aSeq(1);
- aSeq[0] = PROPERTY_TITLE;
+ uno::Sequence< OUString > aSeq { PROPERTY_TITLE };
return ::comphelper::concatSequences(m_xFormComponentHandler->getActuatingProperties(),aSeq);
}
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index f838b3ee7453..1d8b699d2b91 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -87,8 +87,7 @@ namespace rptui
Sequence< OUString > DefaultComponentInspectorModel::getSupportedServiceNames_static( ) throw(RuntimeException)
{
- Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.inspection.DefaultComponentInspectorModel";
+ Sequence< OUString > aSupported { "com.sun.star.report.inspection.DefaultComponentInspectorModel" };
return aSupported;
}
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 08bda842c518..2c6dce15edca 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -271,8 +271,7 @@ OUString GeometryHandler::getImplementationName_Static( ) throw(uno::RuntimeExc
uno::Sequence< OUString > GeometryHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.inspection.GeometryHandler";
+ uno::Sequence< OUString > aSupported { "com.sun.star.report.inspection.GeometryHandler" };
return aSupported;
}
diff --git a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
index c7f278f5cc37..6c8c475f46f3 100644
--- a/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
+++ b/reportdesign/source/ui/inspection/ReportComponentHandler.cxx
@@ -75,8 +75,7 @@ OUString ReportComponentHandler::getImplementationName_Static( ) throw(uno::Run
uno::Sequence< OUString > ReportComponentHandler::getSupportedServiceNames_static( ) throw(uno::RuntimeException)
{
- uno::Sequence< OUString > aSupported(1);
- aSupported[0] = "com.sun.star.report.inspection.ReportComponentHandler";
+ uno::Sequence< OUString > aSupported { "com.sun.star.report.inspection.ReportComponentHandler" };
return aSupported;
}