[Libreoffice-commits] core.git: animations/source canvas/source chart2/source cui/source dbaccess/source desktop/source extensions/source extensions/test filter/source io/source io/test lingucomponent/source odk/examples sax/source sc/source sd/source sfx2/source shell/source stoc/source svtools/source sw/qa sw/source unotools/source vcl/source xmloff/source
Noel Grandin
noelgrandin at gmail.com
Sun Nov 15 03:31:49 PST 2015
animations/source/animcore/animcore.cxx | 33 +++-------
canvas/source/factory/cf_service.cxx | 3
chart2/source/controller/main/ToolbarController.cxx | 3
chart2/source/controller/sidebar/Chart2PanelFactory.cxx | 3
cui/source/options/treeopt.cxx | 3
dbaccess/source/filter/xml/xmlExport.cxx | 3
dbaccess/source/filter/xml/xmlfilter.cxx | 3
dbaccess/source/ui/browser/exsrcbrw.cxx | 3
dbaccess/source/ui/browser/unodatbr.cxx | 3
dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx | 3
dbaccess/source/ui/uno/DBTypeWizDlg.cxx | 3
dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx | 3
dbaccess/source/ui/uno/TableFilterDlg.cxx | 3
dbaccess/source/ui/uno/UserSettingsDlg.cxx | 3
dbaccess/source/ui/uno/admindlg.cxx | 3
dbaccess/source/ui/uno/copytablewizard.cxx | 3
dbaccess/source/ui/uno/unosqlmessage.cxx | 3
desktop/source/offacc/acceptor.cxx | 3
extensions/source/abpilot/unodialogabp.cxx | 3
extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 3
extensions/source/propctrlr/controlfontdialog.cxx | 3
extensions/test/ole/cpnt/cpnt.cxx | 3
filter/source/xsltfilter/XSLTFilter.cxx | 6 -
io/source/stm/odata.cxx | 9 --
io/source/stm/omark.cxx | 6 -
io/source/stm/opipe.cxx | 3
io/test/stm/datatest.cxx | 3
io/test/stm/marktest.cxx | 6 -
io/test/stm/pipetest.cxx | 3
lingucomponent/source/languageguessing/guesslang.cxx | 3
odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx | 3
sax/source/expatwrap/sax_expat.cxx | 3
sax/source/expatwrap/saxwriter.cxx | 3
sax/source/fastparser/fastparser.cxx | 3
sc/source/filter/xml/xmlimprt.cxx | 3
sc/source/ui/sidebar/ScPanelFactory.cxx | 3
sc/source/ui/unoobj/exceldetect.cxx | 3
sc/source/ui/unoobj/pageuno.cxx | 3
sc/source/ui/unoobj/scdetect.cxx | 3
sd/source/ui/dlg/dlgass.cxx | 3
sfx2/source/sidebar/CommandInfoProvider.cxx | 3
shell/source/backends/localebe/localebackend.cxx | 3
shell/source/backends/wininetbe/wininetbackend.cxx | 3
stoc/source/inspect/introspection.cxx | 3
svtools/source/config/fontsubstconfig.cxx | 6 -
svtools/source/uno/addrtempuno.cxx | 3
svtools/source/uno/unoevent.cxx | 3
sw/qa/extras/odfexport/odfexport.cxx | 3
sw/source/core/unocore/unoparagraph.cxx | 6 -
sw/source/ui/dbui/addresslistdialog.cxx | 3
sw/source/ui/dbui/dbinsdlg.cxx | 3
sw/source/uibase/envelp/labelcfg.cxx | 3
unotools/source/config/fltrcfg.cxx | 12 +--
unotools/source/ucbhelper/ucbhelper.cxx | 6 -
vcl/source/window/builder.cxx | 6 -
xmloff/source/core/DomBuilderContext.cxx | 3
xmloff/source/core/xmlexp.cxx | 15 +---
xmloff/source/draw/XMLShapeStyleContext.cxx | 3
xmloff/source/style/xmlimppr.cxx | 15 +---
xmloff/source/text/XMLIndexTOCContext.cxx | 3
60 files changed, 90 insertions(+), 180 deletions(-)
New commits:
commit 54d22957bc241fc5867fa1c720cf1266133e4e90
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Sun Nov 15 12:17:19 2015 +0200
use initialiser for Sequence<OUString>
performed using:
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: I4da56c80fa09bfc1e8f868794001e9921431e09f
Reviewed-on: https://gerrit.libreoffice.org/19968
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index bfe6657..ab1bf53 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -510,8 +510,7 @@ AnimationNode::~AnimationNode()
Sequence<OUString> getSupportedServiceNames_PAR()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.ParallelTimeContainer";
+ Sequence<OUString> aRet { "com.sun.star.animations.ParallelTimeContainer" };
return aRet;
}
@@ -522,8 +521,7 @@ OUString getImplementationName_PAR()
Sequence<OUString> getSupportedServiceNames_SEQ()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.SequenceTimeContainer";
+ Sequence<OUString> aRet { "com.sun.star.animations.SequenceTimeContainer" };
return aRet;
}
@@ -534,8 +532,7 @@ OUString getImplementationName_SEQ()
Sequence<OUString> getSupportedServiceNames_ITERATE()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.IterateContainer";
+ Sequence<OUString> aRet { "com.sun.star.animations.IterateContainer" };
return aRet;
}
@@ -546,8 +543,7 @@ OUString getImplementationName_ITERATE()
Sequence<OUString> getSupportedServiceNames_ANIMATE()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.Animate";
+ Sequence<OUString> aRet { "com.sun.star.animations.Animate" };
return aRet;
}
@@ -558,8 +554,7 @@ OUString getImplementationName_ANIMATE()
Sequence<OUString> getSupportedServiceNames_SET()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.AnimateSet";
+ Sequence<OUString> aRet { "com.sun.star.animations.AnimateSet" };
return aRet;
}
@@ -570,8 +565,7 @@ OUString getImplementationName_SET()
Sequence<OUString> getSupportedServiceNames_ANIMATECOLOR()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.AnimateColor";
+ Sequence<OUString> aRet { "com.sun.star.animations.AnimateColor" };
return aRet;
}
@@ -582,8 +576,7 @@ OUString getImplementationName_ANIMATECOLOR()
Sequence<OUString> getSupportedServiceNames_ANIMATEMOTION()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.AnimateMotion";
+ Sequence<OUString> aRet { "com.sun.star.animations.AnimateMotion" };
return aRet;
}
@@ -594,8 +587,7 @@ OUString getImplementationName_ANIMATEMOTION()
Sequence<OUString> getSupportedServiceNames_ANIMATETRANSFORM()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.AnimateTransform";
+ Sequence<OUString> aRet { "com.sun.star.animations.AnimateTransform" };
return aRet;
}
@@ -606,8 +598,7 @@ OUString getImplementationName_ANIMATETRANSFORM()
Sequence<OUString> getSupportedServiceNames_TRANSITIONFILTER()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.TransitionFilter";
+ Sequence<OUString> aRet { "com.sun.star.animations.TransitionFilter" };
return aRet;
}
@@ -618,8 +609,7 @@ OUString getImplementationName_TRANSITIONFILTER()
Sequence<OUString> getSupportedServiceNames_AUDIO()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.Audio";
+ Sequence<OUString> aRet { "com.sun.star.animations.Audio" };
return aRet;
}
@@ -630,8 +620,7 @@ OUString getImplementationName_AUDIO()
Sequence<OUString> getSupportedServiceNames_COMMAND()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.animations.Command";
+ Sequence<OUString> aRet { "com.sun.star.animations.Command" };
return aRet;
}
diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx
index 3e655b3..e29a7fe 100644
--- a/canvas/source/factory/cf_service.cxx
+++ b/canvas/source/factory/cf_service.cxx
@@ -198,8 +198,7 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
{
// Ugh. Looks like configuration is borked. Fake minimal
// setup.
- Sequence<OUString> aServices(1);
- aServices[0] = "com.sun.star.comp.rendering.Canvas.VCL";
+ Sequence<OUString> aServices { "com.sun.star.comp.rendering.Canvas.VCL" };
m_aAvailableImplementations.push_back( std::make_pair(OUString("com.sun.star.rendering.Canvas"),
aServices) );
diff --git a/chart2/source/controller/main/ToolbarController.cxx b/chart2/source/controller/main/ToolbarController.cxx
index 3d76caf..0381a3a 100644
--- a/chart2/source/controller/main/ToolbarController.cxx
+++ b/chart2/source/controller/main/ToolbarController.cxx
@@ -125,8 +125,7 @@ sal_Bool ChartToolbarController::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> ChartToolbarController::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = "com.sun.star.frame.ToolbarController";
+ css::uno::Sequence<OUString> aServiceNames { "com.sun.star.frame.ToolbarController" };
return aServiceNames;
}
diff --git a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
index 98b628f..ba30ff4 100644
--- a/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
+++ b/chart2/source/controller/sidebar/Chart2PanelFactory.cxx
@@ -139,8 +139,7 @@ sal_Bool ChartPanelFactory::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> ChartPanelFactory::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = "com.sun.star.ui.UIElementFactory";
+ css::uno::Sequence<OUString> aServiceNames { "com.sun.star.ui.UIElementFactory" };
return aServiceNames;
}
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 9bc61c6..81b9462 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -268,8 +268,7 @@ MailMergeCfg_Impl::MailMergeCfg_Impl() :
utl::ConfigItem("Office.Writer/MailMergeWizard"),
bIsEmailSupported(false)
{
- Sequence<OUString> aNames(1);
- aNames.getArray()[0] = "EMailSupported";
+ Sequence<OUString> aNames { "EMailSupported" };
const Sequence< Any > aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
if(aValues.getLength() && pValues[0].hasValue())
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 220349b..25fafb1 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -256,8 +256,7 @@ OUString ODBExport::getImplementationName_Static()
css::uno::Sequence<OUString> ODBExport::getSupportedServiceNames_Static()
throw (css::uno::RuntimeException)
{
- css::uno::Sequence<OUString> s(1);
- s[0] = "com.sun.star.document.ExportFilter";
+ css::uno::Sequence<OUString> s { "com.sun.star.document.ExportFilter" };
return s;
}
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 1c24ca3..702ac84 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -233,8 +233,7 @@ OUString ODBFilter::getImplementationName_Static()
css::uno::Sequence<OUString> ODBFilter::getSupportedServiceNames_Static()
throw (css::uno::RuntimeException)
{
- css::uno::Sequence<OUString> s(1);
- s[0] = "com.sun.star.document.ImportFilter";
+ css::uno::Sequence<OUString> s { "com.sun.star.document.ImportFilter" };
return s;
}
diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx
index 1b5d239..c3d2195 100644
--- a/dbaccess/source/ui/browser/exsrcbrw.cxx
+++ b/dbaccess/source/ui/browser/exsrcbrw.cxx
@@ -85,8 +85,7 @@ OUString SbaExternalSourceBrowser::getImplementationName_Static() throw(RuntimeE
css::uno::Sequence<OUString> SbaExternalSourceBrowser::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.FormGridView";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.FormGridView" };
return aSupported;
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index fd349e9..3d235aa 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -197,8 +197,7 @@ OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeExcep
css::uno::Sequence<OUString> SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.DataSourceBrowser";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.DataSourceBrowser" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index 412397f..300dac9 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -97,8 +97,7 @@ namespace dbaui
css::uno::Sequence<OUString> OAdvancedSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.AdvancedDatabaseSettingsDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.AdvancedDatabaseSettingsDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index d39aec3..c8228a0 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -69,8 +69,7 @@ css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialog::getSupportedServiceNames
css::uno::Sequence<OUString> ODBTypeWizDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.DataSourceTypeChangeDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.DataSourceTypeChangeDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index d4547ba..26f34a0 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -84,8 +84,7 @@ css::uno::Sequence<OUString> SAL_CALL ODBTypeWizDialogSetup::getSupportedService
css::uno::Sequence<OUString> ODBTypeWizDialogSetup::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.DatabaseWizardDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.DatabaseWizardDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index 203f924..4810894 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -69,8 +69,7 @@ css::uno::Sequence<OUString> SAL_CALL OTableFilterDialog::getSupportedServiceNam
css::uno::Sequence<OUString> OTableFilterDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.TableFilterDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.TableFilterDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index 22b66f5..96f4781 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -69,8 +69,7 @@ css::uno::Sequence<OUString> SAL_CALL OUserSettingsDialog::getSupportedServiceNa
css::uno::Sequence<OUString> OUserSettingsDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.UserAdministrationDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.UserAdministrationDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index 9b854eb..1366ed7 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -69,8 +69,7 @@ css::uno::Sequence<OUString> SAL_CALL ODataSourcePropertyDialog::getSupportedSer
css::uno::Sequence<OUString> ODataSourcePropertyDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.sdb.DatasourceAdministrationDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.DatasourceAdministrationDialog" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 8fd5012..177d221 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -430,8 +430,7 @@ css::uno::Sequence<OUString> SAL_CALL CopyTableWizard::getSupportedServiceNames(
css::uno::Sequence<OUString> CopyTableWizard::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.sdb.application.CopyTableWizard";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.application.CopyTableWizard" };
return aSupported;
}
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index 49b3d83..554a12a 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -80,8 +80,7 @@ css::uno::Sequence<OUString> SAL_CALL OSQLMessageDialog::getSupportedServiceName
css::uno::Sequence<OUString> OSQLMessageDialog::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.sdb.ErrorMessageDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.sdb.ErrorMessageDialog" };
return aSupported;
}
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 2702ded..612d796 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -190,8 +190,7 @@ OUString Acceptor::getImplementationName()
}
Sequence<OUString> Acceptor::impl_getSupportedServiceNames()
{
- Sequence<OUString> aSequence(1);
- aSequence[0] = "com.sun.star.office.Acceptor";
+ Sequence<OUString> aSequence { "com.sun.star.office.Acceptor" };
return aSequence;
}
Sequence<OUString> Acceptor::getSupportedServiceNames()
diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx
index 40c7c55..3f01533 100644
--- a/extensions/source/abpilot/unodialogabp.cxx
+++ b/extensions/source/abpilot/unodialogabp.cxx
@@ -109,8 +109,7 @@ namespace abp
css::uno::Sequence<OUString> OABSPilotUno::getSupportedServiceNames_Static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.ui.dialogs.AddressBookSourcePilot";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.ui.dialogs.AddressBookSourcePilot" };
return aSupported;
}
diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
index 4f37497..c8a7af3 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
@@ -72,8 +72,7 @@ namespace pcr
css::uno::Sequence<OUString> MasterDetailLinkDialog::getSupportedServiceNames_static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.form.MasterDetailLinkDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.form.MasterDetailLinkDialog" };
return aSupported;
}
diff --git a/extensions/source/propctrlr/controlfontdialog.cxx b/extensions/source/propctrlr/controlfontdialog.cxx
index 75032a9..1305301 100644
--- a/extensions/source/propctrlr/controlfontdialog.cxx
+++ b/extensions/source/propctrlr/controlfontdialog.cxx
@@ -94,8 +94,7 @@ namespace pcr
css::uno::Sequence<OUString> OControlFontDialog::getSupportedServiceNames_static() throw(RuntimeException)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported[0] = "com.sun.star.form.ControlFontDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.form.ControlFontDialog" };
return aSupported;
}
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index f0bbebc..fd210f4 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -331,8 +331,7 @@ Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMulti
Sequence<OUString> OComponent_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName();
+ Sequence<OUString> aRet { SERVICE_NAME;//ODataInputStream_getImplementationName() };
return aRet;
}
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 6a1f849..2029b9f 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -568,8 +568,7 @@ extern "C"
{
if (rtl_str_compare(pImplName, FILTER_IMPL_NAME) == 0)
{
- Sequence<OUString> serviceNames(1);
- serviceNames.getArray()[0] = FILTER_SERVICE_NAME;
+ Sequence<OUString> serviceNames { FILTER_SERVICE_NAME };
css::uno::Reference<XSingleServiceFactory>
xFactory(
@@ -588,8 +587,7 @@ extern "C"
}
else if (rtl_str_compare(pImplName, TRANSFORMER_IMPL_NAME) == 0)
{
- Sequence<OUString> serviceNames(1);
- serviceNames.getArray()[0] = TRANSFORMER_SERVICE_NAME;
+ Sequence<OUString> serviceNames { TRANSFORMER_SERVICE_NAME };
css::uno::Reference<XSingleServiceFactory>
xFactory(
createSingleFactory(
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index c626661..d8ac930 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -486,8 +486,7 @@ OUString ODataInputStream_getImplementationName()
Sequence<OUString> ODataInputStream_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.DataInputStream";
+ Sequence<OUString> aRet { "com.sun.star.io.DataInputStream" };
return aRet;
}
@@ -1152,8 +1151,7 @@ OUString OObjectOutputStream_getImplementationName()
Sequence<OUString> OObjectOutputStream_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.ObjectOutputStream";
+ Sequence<OUString> aRet { "com.sun.star.io.ObjectOutputStream" };
return aRet;
}
@@ -1456,8 +1454,7 @@ OUString OObjectInputStream_getImplementationName()
Sequence<OUString> OObjectInputStream_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.ObjectInputStream";
+ Sequence<OUString> aRet { "com.sun.star.io.ObjectInputStream" };
return aRet;
}
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index c2e524b..c653efb 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -450,8 +450,7 @@ OUString OMarkableOutputStream_getImplementationName()
Sequence<OUString> OMarkableOutputStream_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.MarkableOutputStream";
+ Sequence<OUString> aRet { "com.sun.star.io.MarkableOutputStream" };
return aRet;
}
@@ -945,8 +944,7 @@ OUString OMarkableInputStream_getImplementationName()
Sequence<OUString> OMarkableInputStream_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.MarkableInputStream";
+ Sequence<OUString> aRet { "com.sun.star.io.MarkableInputStream" };
return aRet;
}
diff --git a/io/source/stm/opipe.cxx b/io/source/stm/opipe.cxx
index b32c869..ec7b703 100644
--- a/io/source/stm/opipe.cxx
+++ b/io/source/stm/opipe.cxx
@@ -427,8 +427,7 @@ OUString OPipeImpl_getImplementationName()
Sequence<OUString> OPipeImpl_getSupportedServiceNames()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = "com.sun.star.io.Pipe";
+ Sequence<OUString> aRet { "com.sun.star.io.Pipe" };
return aRet;
}
}
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index f98f602..3d03080 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -614,8 +614,7 @@ Reference < XInterface > SAL_CALL OMyPersistObject_CreateInstance(
Sequence<OUString> OMyPersistObject_getSupportedServiceNames( ) throw ()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = OMyPersistObject_getImplementationName();
+ Sequence<OUString> aRet { OMyPersistObject_getImplementationName() };
return aRet;
}
diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx
index f481c31..e737f94 100644
--- a/io/test/stm/marktest.cxx
+++ b/io/test/stm/marktest.cxx
@@ -375,8 +375,7 @@ Reference < XInterface > SAL_CALL OMarkableOutputStreamTest_CreateInstance( cons
Sequence<OUString> OMarkableOutputStreamTest_getSupportedServiceNames() throw ()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = OMarkableOutputStreamTest_getImplementationName();
+ Sequence<OUString> aRet { OMarkableOutputStreamTest_getImplementationName() };
return aRet;
}
@@ -647,8 +646,7 @@ Reference < XInterface > SAL_CALL OMarkableInputStreamTest_CreateInstance( const
Sequence<OUString> OMarkableInputStreamTest_getSupportedServiceNames() throw ()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = OMarkableInputStreamTest_getImplementationName();
+ Sequence<OUString> aRet { OMarkableInputStreamTest_getImplementationName() };
return aRet;
}
diff --git a/io/test/stm/pipetest.cxx b/io/test/stm/pipetest.cxx
index 2d9ee9f..f7dc2d4 100644
--- a/io/test/stm/pipetest.cxx
+++ b/io/test/stm/pipetest.cxx
@@ -411,8 +411,7 @@ Reference < XInterface > SAL_CALL OPipeTest_CreateInstance( const Reference< XMu
Sequence<OUString> OPipeTest_getSupportedServiceNames() throw()
{
- Sequence<OUString> aRet(1);
- aRet.getArray()[0] = OPipeTest_getServiceName();
+ Sequence<OUString> aRet { OPipeTest_getServiceName() };
return aRet;
}
diff --git a/lingucomponent/source/languageguessing/guesslang.cxx b/lingucomponent/source/languageguessing/guesslang.cxx
index 500f672..8ac3e8d 100644
--- a/lingucomponent/source/languageguessing/guesslang.cxx
+++ b/lingucomponent/source/languageguessing/guesslang.cxx
@@ -57,8 +57,7 @@ using namespace ::com::sun::star::linguistic2;
static Sequence< OUString > getSupportedServiceNames_LangGuess_Impl()
{
- Sequence<OUString> names(1);
- names[0] = SERVICENAME;
+ Sequence<OUString> names { SERVICENAME };
return names;
}
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index def4910..fd36a45 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -60,8 +60,7 @@ extern Reference< XInterface > SAL_CALL create_MyService1Impl(
static Sequence< OUString > getSupportedServiceNames_MyService2Impl()
{
- Sequence<OUString> names(1);
- names[0] = "my_module.MyService2";
+ Sequence<OUString> names { "my_module.MyService2" };
return names;
}
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 71bb257..be80a80 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -566,8 +566,7 @@ sal_Bool SaxExpatParser::supportsService(const OUString& ServiceName) throw (std
// XServiceInfo
css::uno::Sequence< OUString > SaxExpatParser::getSupportedServiceNames() throw (std::exception)
{
- css::uno::Sequence<OUString> seq(1);
- seq[0] = "com.sun.star.xml.sax.Parser";
+ css::uno::Sequence<OUString> seq { "com.sun.star.xml.sax.Parser" };
return seq;
}
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 2c5c56b..c9ad122 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -1010,8 +1010,7 @@ sal_Bool SAXWriter::supportsService(const OUString& ServiceName) throw(std::exce
// XServiceInfo
Sequence< OUString > SAXWriter::getSupportedServiceNames() throw (std::exception)
{
- Sequence<OUString> seq(1);
- seq[0] = "com.sun.star.xml.sax.Writer";
+ Sequence<OUString> seq { "com.sun.star.xml.sax.Writer" };
return seq;
}
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index 3c353d9..1978a54 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -1355,8 +1355,7 @@ sal_Bool FastSaxParser::supportsService( const OUString& ServiceName )
uno::Sequence<OUString> FastSaxParser::getSupportedServiceNames()
throw (uno::RuntimeException, std::exception)
{
- Sequence<OUString> seq(1);
- seq[0] = "com.sun.star.xml.sax.FastParser";
+ Sequence<OUString> seq { "com.sun.star.xml.sax.FastParser" };
return seq;
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index 9e38457..4797821 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2678,8 +2678,7 @@ sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& r
sErrorMessage += sFormatString;
sErrorMessage += " an Position ";
sErrorMessage += OUString::number(rException.CheckPos);
- uno::Sequence<OUString> aSeq(1);
- aSeq[0] = sErrorMessage;
+ uno::Sequence<OUString> aSeq { sErrorMessage };
uno::Reference<xml::sax::XLocator> xLocator;
SetError(XMLERROR_API | XMLERROR_FLAG_ERROR, aSeq, rException.Message, xLocator);
}
diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 1e63495..c953f19 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -139,8 +139,7 @@ sal_Bool ScPanelFactory::supportsService(OUString const & ServiceName)
css::uno::Sequence<OUString> ScPanelFactory::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aServiceNames(1);
- aServiceNames[0] = "com.sun.star.ui.UIElementFactory";
+ css::uno::Sequence<OUString> aServiceNames { "com.sun.star.ui.UIElementFactory" };
return aServiceNames;
}
diff --git a/sc/source/ui/unoobj/exceldetect.cxx b/sc/source/ui/unoobj/exceldetect.cxx
index 5e663bf..ae8f2e6 100644
--- a/sc/source/ui/unoobj/exceldetect.cxx
+++ b/sc/source/ui/unoobj/exceldetect.cxx
@@ -39,8 +39,7 @@ sal_Bool ScExcelBiffDetect::supportsService( const OUString& aName ) throw (uno:
uno::Sequence<OUString> ScExcelBiffDetect::getSupportedServiceNames() throw (uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> aNames(1);
- aNames[0] = "com.sun.star.frame.ExtendedTypeDetection";
+ uno::Sequence<OUString> aNames { "com.sun.star.frame.ExtendedTypeDetection" };
return aNames;
}
diff --git a/sc/source/ui/unoobj/pageuno.cxx b/sc/source/ui/unoobj/pageuno.cxx
index 744ac5e..6ba7b31 100644
--- a/sc/source/ui/unoobj/pageuno.cxx
+++ b/sc/source/ui/unoobj/pageuno.cxx
@@ -58,8 +58,7 @@ sal_Bool SAL_CALL ScPageObj::supportsService( const OUString& rServiceName )
uno::Sequence<OUString> SAL_CALL ScPageObj::getSupportedServiceNames()
throw(uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> aRet(1);
- aRet[0] = "com.sun.star.sheet.SpreadsheetDrawPage";
+ uno::Sequence<OUString> aRet { "com.sun.star.sheet.SpreadsheetDrawPage" };
return aRet;
}
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index eac13bb..66dcac2 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -325,8 +325,7 @@ sal_Bool ScFilterDetect::supportsService( const OUString& sServiceName )
css::uno::Sequence<OUString> ScFilterDetect::getSupportedServiceNames()
throw (uno::RuntimeException, std::exception)
{
- uno::Sequence<OUString> seqServiceNames(1);
- seqServiceNames.getArray()[0] = "com.sun.star.frame.ExtendedTypeDetection";
+ uno::Sequence<OUString> seqServiceNames { "com.sun.star.frame.ExtendedTypeDetection" };
return seqServiceNames;
}
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index f79fcc9..c6687ca 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1711,8 +1711,7 @@ Image AssistentDlgImpl::GetUiIconForCommand (const OUString& sCommandURL)
xManager->getImageManager(),
UNO_QUERY_THROW);
- Sequence<OUString> aCommandList(1);
- aCommandList[0] = sCommandURL;
+ Sequence<OUString> aCommandList { sCommandURL };
Sequence<Reference<graphic::XGraphic> > xIconList (
xImageManager->getImages(0,aCommandList));
if ( ! xIconList.hasElements())
diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx
index 6eb30d7..1abaed1 100644
--- a/sfx2/source/sidebar/CommandInfoProvider.cxx
+++ b/sfx2/source/sidebar/CommandInfoProvider.cxx
@@ -241,8 +241,7 @@ OUString CommandInfoProvider::RetrieveShortcutsFromConfiguration(
{
try
{
- Sequence<OUString> aCommands(1);
- aCommands[0] = rsCommandName;
+ Sequence<OUString> aCommands { rsCommandName };
Sequence<Any> aKeyCodes (rxConfiguration->getPreferredKeyEventsForCommandList(aCommands));
if (aCommands.getLength() == 1)
diff --git a/shell/source/backends/localebe/localebackend.cxx b/shell/source/backends/localebe/localebackend.cxx
index a901405..b147b67 100644
--- a/shell/source/backends/localebe/localebackend.cxx
+++ b/shell/source/backends/localebe/localebackend.cxx
@@ -314,8 +314,7 @@ OUString SAL_CALL LocaleBackend::getImplementationName()
uno::Sequence<OUString> SAL_CALL LocaleBackend::getBackendServiceNames()
{
- uno::Sequence<OUString> aServiceNameList(1);
- aServiceNameList[0] = "com.sun.star.configuration.backend.LocaleBackend";
+ uno::Sequence<OUString> aServiceNameList { "com.sun.star.configuration.backend.LocaleBackend" };
return aServiceNameList ;
}
diff --git a/shell/source/backends/wininetbe/wininetbackend.cxx b/shell/source/backends/wininetbe/wininetbackend.cxx
index 23aed71..e08fc29 100644
--- a/shell/source/backends/wininetbe/wininetbackend.cxx
+++ b/shell/source/backends/wininetbe/wininetbackend.cxx
@@ -376,8 +376,7 @@ OUString SAL_CALL WinInetBackend::getImplementationName()
uno::Sequence<OUString> SAL_CALL WinInetBackend::getBackendServiceNames()
{
- uno::Sequence<OUString> aServiceNameList(1);
- aServiceNameList[0] = "com.sun.star.configuration.backend.WinInetBackend";
+ uno::Sequence<OUString> aServiceNameList { "com.sun.star.configuration.backend.WinInetBackend" };
return aServiceNameList ;
}
diff --git a/stoc/source/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx
index e5eae6c..65bb0ff 100644
--- a/stoc/source/inspect/introspection.cxx
+++ b/stoc/source/inspect/introspection.cxx
@@ -1696,8 +1696,7 @@ private:
getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override
{
- Sequence<OUString> s(1);
- s[0] = "com.sun.star.beans.Introspection";
+ Sequence<OUString> s { "com.sun.star.beans.Introspection" };
return s;
}
diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx
index e25836e..02a3844 100644
--- a/svtools/source/config/fontsubstconfig.cxx
+++ b/svtools/source/config/fontsubstconfig.cxx
@@ -52,8 +52,7 @@ SvtFontSubstConfig::SvtFontSubstConfig() :
bIsEnabled(false),
pImpl(new SvtFontSubstConfig_Impl)
{
- Sequence<OUString> aNames(1);
- aNames.getArray()[0] = cReplacement;
+ Sequence<OUString> aNames { cReplacement };
Sequence<Any> aValues = GetProperties(aNames);
DBG_ASSERT(aValues.getConstArray()[0].hasValue(), "no value available");
if(aValues.getConstArray()[0].hasValue())
@@ -100,8 +99,7 @@ void SvtFontSubstConfig::Notify( const css::uno::Sequence< OUString >& )
void SvtFontSubstConfig::ImplCommit()
{
- Sequence<OUString> aNames(1);
- aNames.getArray()[0] = cReplacement;
+ Sequence<OUString> aNames { cReplacement };
Sequence<Any> aValues(1);
aValues.getArray()[0].setValue(&bIsEnabled, cppu::UnoType<bool>::get());
PutProperties(aNames, aValues);
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 10e9485..4ffafea 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -101,8 +101,7 @@ namespace {
css::uno::Sequence<OUString> SAL_CALL OAddressBookSourceDialogUno::getSupportedServiceNames() throw(RuntimeException, std::exception)
{
- css::uno::Sequence<OUString> aSupported(1);
- aSupported.getArray()[0] = "com.sun.star.ui.AddressBookSourceDialog";
+ css::uno::Sequence<OUString> aSupported { "com.sun.star.ui.AddressBookSourceDialog" };
return aSupported;
}
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index b5b4d21..56e6ccb 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -151,8 +151,7 @@ sal_Bool SvBaseEventDescriptor::supportsService(const OUString& rServiceName)
Sequence<OUString> SvBaseEventDescriptor::getSupportedServiceNames()
throw(RuntimeException, std::exception)
{
- Sequence<OUString> aSequence(1);
- aSequence[0] = sServiceName;
+ Sequence<OUString> aSequence { sServiceName };
return aSequence;
}
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index cb91303..addf9c5 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -364,8 +364,7 @@ DECLARE_ODFEXPORT_TEST(testFdo79358, "fdo79358.odt")
uno::Reference<container::XIndexReplace> xLevels(
getProperty< uno::Reference<container::XIndexReplace> >(xTOCProps,
"LevelParagraphStyles"));
- uno::Sequence<OUString> seq(1);
- seq[0] = "Heading";
+ uno::Sequence<OUString> seq { "Heading" };
CPPUNIT_ASSERT_EQUAL(uno::makeAny(seq), xLevels->getByIndex(1));
CPPUNIT_ASSERT_EQUAL(uno::makeAny(uno::Sequence<OUString>()), xLevels->getByIndex(2));
}
diff --git a/sw/source/core/unocore/unoparagraph.cxx b/sw/source/core/unocore/unoparagraph.cxx
index 91e8cf1..6845a9a 100644
--- a/sw/source/core/unocore/unoparagraph.cxx
+++ b/sw/source/core/unocore/unoparagraph.cxx
@@ -368,8 +368,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- uno::Sequence<OUString> aPropertyNames(1);
- aPropertyNames.getArray()[0] = rPropertyName;
+ uno::Sequence<OUString> aPropertyNames { rPropertyName };
uno::Sequence<uno::Any> aValues(1);
aValues.getArray()[0] = rValue;
m_pImpl->SetPropertyValues_Impl( aPropertyNames, aValues );
@@ -381,8 +380,7 @@ throw (beans::UnknownPropertyException, lang::WrappedTargetException,
uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- uno::Sequence<OUString> aPropertyNames(1);
- aPropertyNames.getArray()[0] = rPropertyName;
+ uno::Sequence<OUString> aPropertyNames { rPropertyName };
const uno::Sequence< uno::Any > aRet =
m_pImpl->GetPropertyValues_Impl(aPropertyNames);
return aRet.getConstArray()[0];
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 4a878f2..b4d4cb5 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -389,8 +389,7 @@ IMPL_LINK_TYPED(SwAddressListDialog, CreateHdl_Impl, Button*, pButton, void)
Any aAny(&sDBURL, cppu::UnoType<decltype(sDBURL)>::get());
xDataProperties->setPropertyValue("URL", aAny);
//set the filter to the file name without extension
- uno::Sequence<OUString> aFilters(1);
- aFilters[0] = sNewName;
+ uno::Sequence<OUString> aFilters { sNewName };
aAny <<= aFilters;
xDataProperties->setPropertyValue("TableFilter", aAny);
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 866c799..af571d1 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1540,8 +1540,7 @@ void SwInsertDBColAutoPilot::ImplCommit()
pSourceProps[1] >>= sCommand;
if(sSource==aDBData.sDataSource && sCommand==aDBData.sCommand)
{
- Sequence<OUString> aElements(1);
- aElements.getArray()[0] = pNames[nNode];
+ Sequence<OUString> aElements { pNames[nNode] };
ClearNodeElements(OUString(), aElements);
}
}
diff --git a/sw/source/uibase/envelp/labelcfg.cxx b/sw/source/uibase/envelp/labelcfg.cxx
index bfa2220..21bfbf5 100644
--- a/sw/source/uibase/envelp/labelcfg.cxx
+++ b/sw/source/uibase/envelp/labelcfg.cxx
@@ -323,8 +323,7 @@ void SwLabelConfig::SaveLabel( const OUString& rManufacturer,
sPrefix += "/";
sPrefix += pLabels[nLabel];
sPrefix += "/";
- Sequence<OUString> aProperties(1);
- aProperties.getArray()[0] = sPrefix;
+ Sequence<OUString> aProperties { sPrefix };
aProperties.getArray()[0] += "Name";
Sequence<Any> aValues = GetProperties( aProperties );
const Any* pValues = aValues.getConstArray();
diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx
index 38a2275..ed9350c 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -156,8 +156,7 @@ void SvtWriterFilterOptions_Impl::ImplCommit()
{
SvtAppFilterOptions_Impl::ImplCommit();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues(1);
aValues[0] <<= bLoadExecutable;
@@ -168,8 +167,7 @@ void SvtWriterFilterOptions_Impl::Load()
{
SvtAppFilterOptions_Impl::Load();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
@@ -204,8 +202,7 @@ void SvtCalcFilterOptions_Impl::ImplCommit()
{
SvtAppFilterOptions_Impl::ImplCommit();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues(1);
aValues[0] <<= bLoadExecutable;
@@ -216,8 +213,7 @@ void SvtCalcFilterOptions_Impl::Load()
{
SvtAppFilterOptions_Impl::Load();
- Sequence<OUString> aNames(1);
- aNames[0] = "Executable";
+ Sequence<OUString> aNames { "Executable" };
Sequence<Any> aValues = GetProperties(aNames);
const Any* pValues = aValues.getConstArray();
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index e9602a4..11b7867 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -84,8 +84,7 @@ std::vector<OUString> getContents(OUString const & url) {
try {
std::vector<OUString> cs;
ucbhelper::Content c(content(url));
- css::uno::Sequence<OUString> args(1);
- args[0] = "Title";
+ css::uno::Sequence<OUString> args { "Title" };
css::uno::Reference<css::sdbc::XResultSet> res(
c.createCursor(args),
css::uno::UNO_SET_THROW);
@@ -246,8 +245,7 @@ bool utl::UCBContentHelper::MakeFolder(
{
continue;
}
- css::uno::Sequence<OUString> keys(1);
- keys[0] = "Title";
+ css::uno::Sequence<OUString> keys { "Title" };
css::uno::Sequence<css::uno::Any> values(1);
values[0] <<= title;
if (parent.insertNewContent(info[i].Type, keys, values, result))
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 40174d5..09ed49e 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2226,8 +2226,7 @@ Image VclBuilder::getCommandImage(const OUString& rCommand, bool bLarge,
uno::Reference<ui::XImageManager> xDocImgMgr(xDocUICfgMgr->getImageManager(), uno::UNO_QUERY);
uno::Sequence< uno::Reference<graphic::XGraphic> > aGraphicSeq;
- uno::Sequence<OUString> aImageCmdSeq(1);
- aImageCmdSeq[0] = rCommand;
+ uno::Sequence<OUString> aImageCmdSeq { rCommand };
aGraphicSeq = xDocImgMgr->getImages( nImageType, aImageCmdSeq );
uno::Reference<graphic::XGraphic> xGraphic = aGraphicSeq[0];
@@ -2248,8 +2247,7 @@ Image VclBuilder::getCommandImage(const OUString& rCommand, bool bLarge,
uno::Sequence< uno::Reference<graphic::XGraphic> > aGraphicSeq;
uno::Reference<ui::XImageManager> xModuleImageManager(xUICfgMgr->getImageManager(), uno::UNO_QUERY);
- uno::Sequence<OUString> aImageCmdSeq(1);
- aImageCmdSeq[0] = rCommand;
+ uno::Sequence<OUString> aImageCmdSeq { rCommand };
aGraphicSeq = xModuleImageManager->getImages(nImageType, aImageCmdSeq);
diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx
index 75131e6..2aa6935 100644
--- a/xmloff/source/core/DomBuilderContext.cxx
+++ b/xmloff/source/core/DomBuilderContext.cxx
@@ -219,8 +219,7 @@ static Reference<XNode> lcl_createElement( SvXMLImport& rImport,
// both cases are illegal; raise warning (and use only local name)
xElement = xDocument->createElement( rLocalName );
{
- Sequence<OUString> aSeq(1);
- aSeq[0] = rLocalName;
+ Sequence<OUString> aSeq { rLocalName };
rImport.SetError(
XMLERROR_FLAG_WARNING | XMLERROR_NAMESPACE_TROUBLE, aSeq );
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index a2b8ee1..877afda 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2255,14 +2255,12 @@ void SvXMLExport::StartElement(const OUString& rName,
}
catch (const SAXInvalidCharacterException& e)
{
- Sequence<OUString> aPars(1);
- aPars[0] = rName;
+ Sequence<OUString> aPars { rName };
SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr );
}
catch (const SAXException& e)
{
- Sequence<OUString> aPars(1);
- aPars[0] = rName;
+ Sequence<OUString> aPars { rName };
SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE,
aPars, e.Message, nullptr );
}
@@ -2281,14 +2279,12 @@ void SvXMLExport::Characters(const OUString& rChars)
}
catch (const SAXInvalidCharacterException& e)
{
- Sequence<OUString> aPars(1);
- aPars[0] = rChars;
+ Sequence<OUString> aPars { rChars };
SetError( XMLERROR_SAX|XMLERROR_FLAG_WARNING, aPars, e.Message, nullptr );
}
catch (const SAXException& e)
{
- Sequence<OUString> aPars(1);
- aPars[0] = rChars;
+ Sequence<OUString> aPars { rChars };
SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE,
aPars, e.Message, nullptr );
}
@@ -2328,8 +2324,7 @@ void SvXMLExport::EndElement(const OUString& rName,
}
catch (const SAXException& e)
{
- Sequence<OUString> aPars(1);
- aPars[0] = rName;
+ Sequence<OUString> aPars { rName };
SetError( XMLERROR_SAX|XMLERROR_FLAG_ERROR|XMLERROR_FLAG_SEVERE,
aPars, e.Message, nullptr );
}
diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx
index f7e9737..2a80b43 100644
--- a/xmloff/source/draw/XMLShapeStyleContext.cxx
+++ b/xmloff/source/draw/XMLShapeStyleContext.cxx
@@ -264,8 +264,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet
}
catch ( const ::com::sun::star::lang::IllegalArgumentException& e )
{
- Sequence<OUString> aSeq(1);
- aSeq[0] = sStyleName;
+ Sequence<OUString> aSeq { sStyleName };
GetImport().SetError(
XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_WARNING,
aSeq, e.Message, nullptr );
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 5bb140a..3dc9de4 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -492,8 +492,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet(
// allowed to throw this exception
if ( 0 == ( nPropFlags & MID_FLAG_PROPERTY_MAY_THROW ) )
{
- Sequence<OUString> aSeq(1);
- aSeq[0] = rPropName;
+ Sequence<OUString> aSeq { rPropName };
rImport.SetError(
XMLERROR_STYLE_PROP_VALUE | XMLERROR_FLAG_ERROR,
aSeq, e.Message, nullptr );
@@ -502,8 +501,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet(
catch ( const UnknownPropertyException& e )
{
// unknown property: This is always an error!
- Sequence<OUString> aSeq(1);
- aSeq[0] = rPropName;
+ Sequence<OUString> aSeq { rPropName };
rImport.SetError(
XMLERROR_STYLE_PROP_UNKNOWN | XMLERROR_FLAG_ERROR,
aSeq, e.Message, nullptr );
@@ -511,8 +509,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet(
catch ( const PropertyVetoException& e )
{
// property veto: this shouldn't happen
- Sequence<OUString> aSeq(1);
- aSeq[0] = rPropName;
+ Sequence<OUString> aSeq { rPropName };
rImport.SetError(
XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR,
aSeq, e.Message, nullptr );
@@ -520,8 +517,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet(
catch ( const WrappedTargetException& e )
{
// wrapped target: this shouldn't happen either
- Sequence<OUString> aSeq(1);
- aSeq[0] = rPropName;
+ Sequence<OUString> aSeq { rPropName };
rImport.SetError(
XMLERROR_STYLE_PROP_OTHER | XMLERROR_FLAG_ERROR,
aSeq, e.Message, nullptr );
@@ -709,8 +705,7 @@ bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet(
sal_Int32 nCount(aResults.getLength());
for( sal_Int32 i = 0; i < nCount; ++i)
{
- Sequence<OUString> aSeq(1);
- aSeq[0] = aResults[i].Name;
+ Sequence<OUString> aSeq { aResults[i].Name };
OUString sMessage;
switch (aResults[i].Result)
{
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index bdadb2d..c51bf80 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -212,8 +212,7 @@ void XMLIndexTOCContext::StartElement(
catch(const IllegalArgumentException& e)
{
// illegal argument? Then we can't accept indices here!
- Sequence<OUString> aSeq(1);
- aSeq[0] = GetLocalName();
+ Sequence<OUString> aSeq { GetLocalName() };
GetImport().SetError(
XMLERROR_FLAG_ERROR | XMLERROR_NO_INDEX_ALLOWED_HERE,
aSeq, e.Message, nullptr );
More information about the Libreoffice-commits
mailing list