summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-08-17 16:08:25 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-08-17 17:03:14 +0200
commit2674cf29a87c8f56ccf9f491c496e36ce4e8e367 (patch)
treea7b5d05d7032138f673000c9fb584ea850caa0d6 /forms
parentb1d8262dad9939ffbf38f288d0ec60727e3742fb (diff)
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in forms and fpicker Change-Id: Ifa931bed6de434a2ee183c78e8e1be852ca06a56 Reviewed-on: https://gerrit.libreoffice.org/77637 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'forms')
-rw-r--r--forms/source/component/FormComponent.cxx5
-rw-r--r--forms/source/component/FormsCollection.cxx7
-rw-r--r--forms/source/component/scrollbar.cxx4
-rw-r--r--forms/source/component/spinbutton.cxx4
-rw-r--r--forms/source/richtext/richtextmodel.cxx18
5 files changed, 13 insertions, 25 deletions
diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx
index e0c7b3e04bd6..e8c8efca5c6c 100644
--- a/forms/source/component/FormComponent.cxx
+++ b/forms/source/component/FormComponent.cxx
@@ -682,10 +682,7 @@ Sequence<OUString> SAL_CALL OControlModel::getSupportedServiceNames()
Sequence< OUString > OControlModel::getSupportedServiceNames_Static()
{
- Sequence< OUString > aServiceNames( 2 );
- aServiceNames[ 0 ] = FRM_SUN_FORMCOMPONENT;
- aServiceNames[ 1 ] = "com.sun.star.form.FormControlModel";
- return aServiceNames;
+ return { FRM_SUN_FORMCOMPONENT, "com.sun.star.form.FormControlModel" };
}
// XEventListener
diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx
index 753deca90143..2b2b52c2545d 100644
--- a/forms/source/component/FormsCollection.cxx
+++ b/forms/source/component/FormsCollection.cxx
@@ -95,12 +95,7 @@ sal_Bool SAL_CALL OFormsCollection::supportsService( const OUString& _rServiceNa
css::uno::Sequence<OUString> SAL_CALL OFormsCollection::getSupportedServiceNames()
{
- css::uno::Sequence<OUString> aReturn(2);
-
- aReturn[0] = "com.sun.star.form.Forms";
- aReturn[1] = "com.sun.star.form.FormComponents";
-
- return aReturn;
+ return { "com.sun.star.form.Forms", "com.sun.star.form.FormComponents" };
}
// XCloneable
diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx
index 2e153c3d71f3..b478a58c69e2 100644
--- a/forms/source/component/scrollbar.cxx
+++ b/forms/source/component/scrollbar.cxx
@@ -118,9 +118,7 @@ namespace frm
// to benefit from the functionality for binding to spreadsheet cells
Sequence< OUString > SAL_CALL OScrollBarModel::getSupportedServiceNames()
{
- Sequence< OUString > aOwnNames( 2 );
- aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SCROLLBAR;
- aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+ Sequence< OUString > aOwnNames { FRM_SUN_COMPONENT_SCROLLBAR, BINDABLE_INTEGER_VALUE_RANGE };
return ::comphelper::combineSequences(
getAggregateServiceNames(),
diff --git a/forms/source/component/spinbutton.cxx b/forms/source/component/spinbutton.cxx
index 9d6b618c3506..d9504a55b616 100644
--- a/forms/source/component/spinbutton.cxx
+++ b/forms/source/component/spinbutton.cxx
@@ -71,9 +71,7 @@ namespace frm
// to benefit from the functionality for binding to spreadsheet cells
Sequence< OUString > SAL_CALL OSpinButtonModel::getSupportedServiceNames()
{
- Sequence< OUString > aOwnNames( 2 );
- aOwnNames[ 0 ] = FRM_SUN_COMPONENT_SPINBUTTON;
- aOwnNames[ 1 ] = BINDABLE_INTEGER_VALUE_RANGE;
+ Sequence< OUString > aOwnNames { FRM_SUN_COMPONENT_SPINBUTTON, BINDABLE_INTEGER_VALUE_RANGE };
return ::comphelper::combineSequences(
getAggregateServiceNames(),
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 3d1e7a75e834..9ec22b913924 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -233,15 +233,15 @@ namespace frm
Sequence< OUString > SAL_CALL ORichTextModel::getSupportedServiceNames()
{
- Sequence< OUString > aOwnNames( 8 );
- aOwnNames[ 0 ] = FRM_SUN_COMPONENT_RICHTEXTCONTROL;
- aOwnNames[ 1 ] = "com.sun.star.text.TextRange";
- aOwnNames[ 2 ] = "com.sun.star.style.CharacterProperties";
- aOwnNames[ 3 ] = "com.sun.star.style.ParagraphProperties";
- aOwnNames[ 4 ] = "com.sun.star.style.CharacterPropertiesAsian";
- aOwnNames[ 5 ] = "com.sun.star.style.CharacterPropertiesComplex";
- aOwnNames[ 6 ] = "com.sun.star.style.ParagraphPropertiesAsian";
- aOwnNames[ 7 ] = "com.sun.star.style.ParagraphPropertiesComplex";
+ Sequence< OUString > aOwnNames {
+ FRM_SUN_COMPONENT_RICHTEXTCONTROL,
+ "com.sun.star.text.TextRange",
+ "com.sun.star.style.CharacterProperties",
+ "com.sun.star.style.ParagraphProperties",
+ "com.sun.star.style.CharacterPropertiesAsian",
+ "com.sun.star.style.CharacterPropertiesComplex",
+ "com.sun.star.style.ParagraphPropertiesAsian",
+ "com.sun.star.style.ParagraphPropertiesComplex" };
return ::comphelper::combineSequences(
getAggregateServiceNames(),