diff options
author | Noel Grandin <noel@peralex.com> | 2015-11-16 09:23:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-16 08:35:42 +0000 |
commit | 8569c6d0ad70c32a08774fa6f5ec25b465ea98ee (patch) | |
tree | 3287608f4bb3170cc609b64c70d8d5e806c83b46 /svtools/source | |
parent | 57b4c4bcb0cb3c48190670b4c46ab9e92a489729 (diff) |
use initialiser list for Sequence<OUString>
Change-Id: Ia5e47261d1fc6fac2d046656c05a1c5eedb07e02
Reviewed-on: https://gerrit.libreoffice.org/19978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/config/colorcfg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/config/extcolorcfg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/dialogs/addresstemplate.cxx | 3 | ||||
-rw-r--r-- | svtools/source/graphic/descriptor.cxx | 5 | ||||
-rw-r--r-- | svtools/source/graphic/graphic.cxx | 5 |
5 files changed, 7 insertions, 18 deletions
diff --git a/svtools/source/config/colorcfg.cxx b/svtools/source/config/colorcfg.cxx index 8ab8e1c2d3c2..76f22afa5e84 100644 --- a/svtools/source/config/colorcfg.cxx +++ b/svtools/source/config/colorcfg.cxx @@ -220,8 +220,7 @@ void ColorConfig_Impl::Load(const OUString& rScheme) if(sScheme.isEmpty()) { //detect current scheme name - uno::Sequence < OUString > aCurrent(1); - aCurrent.getArray()[0] = "CurrentColorScheme"; + uno::Sequence < OUString > aCurrent { "CurrentColorScheme" }; uno::Sequence< uno::Any > aCurrentVal = GetProperties( aCurrent ); aCurrentVal.getConstArray()[0] >>= sScheme; } @@ -298,8 +297,7 @@ void ColorConfig_Impl::ImplCommit() void ColorConfig_Impl::CommitCurrentSchemeName() { //save current scheme name - uno::Sequence < OUString > aCurrent(1); - aCurrent.getArray()[0] = "CurrentColorScheme"; + uno::Sequence < OUString > aCurrent { "CurrentColorScheme" }; uno::Sequence< uno::Any > aCurrentVal(1); aCurrentVal.getArray()[0] <<= m_sLoadedScheme; PutProperties(aCurrent, aCurrentVal); diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 85855328076b..9db6d6dc0963 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -294,8 +294,7 @@ void ExtendedColorConfig_Impl::Load(const OUString& rScheme) if(sScheme.isEmpty()) { //detect current scheme name - uno::Sequence < OUString > aCurrent(1); - aCurrent.getArray()[0] = "ExtendedColorScheme/CurrentColorScheme"; + uno::Sequence < OUString > aCurrent { "ExtendedColorScheme/CurrentColorScheme" }; uno::Sequence< uno::Any > aCurrentVal = GetProperties( aCurrent ); aCurrentVal.getConstArray()[0] >>= sScheme; } // if(!sScheme.getLength()) @@ -460,8 +459,7 @@ void ExtendedColorConfig_Impl::ImplCommit() void ExtendedColorConfig_Impl::CommitCurrentSchemeName() { //save current scheme name - uno::Sequence < OUString > aCurrent(1); - aCurrent.getArray()[0] = "ExtendedColorScheme/CurrentColorScheme"; + uno::Sequence < OUString > aCurrent { "ExtendedColorScheme/CurrentColorScheme" }; uno::Sequence< uno::Any > aCurrentVal(1); aCurrentVal.getArray()[0] <<= m_sLoadedScheme; PutProperties(aCurrent, aCurrentVal); diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 6ca87a9b625d..bf66e5e31e7e 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -360,9 +360,8 @@ void AssignmentPersistentData::ImplCommit() void AssignmentPersistentData::setStringProperty(const sal_Char* _pLocalName, const OUString& _rValue) { - Sequence< OUString > aNames(1); + Sequence< OUString > aNames { OUString::createFromAscii(_pLocalName) }; Sequence< Any > aValues(1); - aNames[0] = OUString::createFromAscii(_pLocalName); aValues[0] <<= _rValue; PutProperties(aNames, aValues); } diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index eff107dd3a02..a762bde811a6 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -166,10 +166,7 @@ OUString GraphicDescriptor::getImplementationName_Static() uno::Sequence< OUString > GraphicDescriptor::getSupportedServiceNames_Static() throw( ) { - uno::Sequence< OUString > aSeq( 1 ); - - aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicDescriptor"; - + uno::Sequence< OUString > aSeq { "com.sun.star.graphic.GraphicDescriptor" }; return aSeq; } diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index 980f04bc11d1..ccfea396b7d7 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -111,10 +111,7 @@ OUString Graphic::getImplementationName_Static() uno::Sequence< OUString > Graphic::getSupportedServiceNames_Static() throw() { - uno::Sequence< OUString > aSeq( 1 ); - - aSeq.getArray()[ 0 ] = "com.sun.star.graphic.Graphic"; - + uno::Sequence< OUString > aSeq { "com.sun.star.graphic.Graphic" }; return aSeq; } |