diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 12:17:19 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-11-15 11:31:23 +0000 |
commit | 54d22957bc241fc5867fa1c720cf1266133e4e90 (patch) | |
tree | a94c9008ccbe953226a479a875e01119d77d9402 /xmloff/source/style | |
parent | 8e234c5b7d5bae66c544e581bee5770f3f83dd81 (diff) |
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@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmloff/source/style')
-rw-r--r-- | xmloff/source/style/xmlimppr.cxx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 5bb140a976bf..3dc9de47a54b 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) { |