diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:22:28 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:18:55 +0000 |
commit | 25aec383f95fded43b3fe5fc588b4ebdc6d7d272 (patch) | |
tree | 846cce228d7ff120abc40b7767b251c2e04b2a30 /xmloff | |
parent | 35f5833ca35dc170b67ed9f8e288302eb06eb972 (diff) |
use initialiser for Sequence<OUString>
replaced using:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)'
| xargs perl -0777 -pi -e
"s/Sequence<\s*OUString\s*> (\w+)\(\s*1\s*\);
.*\[0\] = (\S+);/Sequence<OUString> \1 { \2 };/g"
Change-Id: I20ad0489da887a9712982531c3b127339bb8b3b9
Reviewed-on: https://gerrit.libreoffice.org/19969
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/forms/elementimport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventExport.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/text/XMLAutoTextEventImport.cxx | 3 |
4 files changed, 5 insertions, 10 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index dee62a3312e0..bad7295224b5 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -521,8 +521,7 @@ void SdXMLShapeContext::AddShape(OUString const & serviceName) } catch(const uno::Exception& e) { - uno::Sequence<OUString> aSeq( 1 ); - aSeq[0] = serviceName; + uno::Sequence<OUString> aSeq { serviceName }; GetImport().SetError( XMLERROR_FLAG_ERROR | XMLERROR_API, aSeq, e.Message, nullptr ); } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index f3a40fa7dad8..1ecf02e38706 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1661,8 +1661,7 @@ namespace xmloff // a listbox which has a list-source attribute must have a list-source-type of something // not equal to ValueList. // In this case, the list-source value is simply the one and only element of the ListSource property. - Sequence< OUString > aListSourcePropValue( 1 ); - aListSourcePropValue[0] = _rValue; + Sequence<OUString> aListSourcePropValue { _rValue }; aListSource.Value <<= aListSourcePropValue; } diff --git a/xmloff/source/text/XMLAutoTextEventExport.cxx b/xmloff/source/text/XMLAutoTextEventExport.cxx index 1497327d0d80..69c793650e56 100644 --- a/xmloff/source/text/XMLAutoTextEventExport.cxx +++ b/xmloff/source/text/XMLAutoTextEventExport.cxx @@ -212,8 +212,7 @@ void XMLAutoTextEventExport::_ExportContent() {} Sequence< OUString > SAL_CALL XMLAutoTextEventExport_getSupportedServiceNames() throw() { - Sequence< OUString > aSeq( 1 ); - aSeq[0] = XMLAutoTextEventExport_getImplementationName(); + Sequence<OUString> aSeq { XMLAutoTextEventExport_getImplementationName() }; return aSeq; } @@ -234,8 +233,7 @@ Reference< XInterface > SAL_CALL XMLAutoTextEventExport_createInstance( Sequence< OUString > SAL_CALL XMLAutoTextEventExportOOO_getSupportedServiceNames() throw() { - Sequence< OUString > aSeq( 1 ); - aSeq[0] = XMLAutoTextEventExportOOO_getImplementationName(); + Sequence<OUString> aSeq { XMLAutoTextEventExportOOO_getImplementationName() }; return aSeq; } diff --git a/xmloff/source/text/XMLAutoTextEventImport.cxx b/xmloff/source/text/XMLAutoTextEventImport.cxx index 340b03ae5ef7..2f84a86708d4 100644 --- a/xmloff/source/text/XMLAutoTextEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextEventImport.cxx @@ -108,8 +108,7 @@ Sequence< OUString > SAL_CALL XMLAutoTextEventImport_getSupportedServiceNames() throw() { - Sequence< OUString > aSeq( 1 ); - aSeq[0] = XMLAutoTextEventImport_getImplementationName(); + Sequence<OUString> aSeq { XMLAutoTextEventImport_getImplementationName() }; return aSeq; } |