summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-16 09:23:41 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-11-16 08:35:42 +0000
commit8569c6d0ad70c32a08774fa6f5ec25b465ea98ee (patch)
tree3287608f4bb3170cc609b64c70d8d5e806c83b46 /xmloff
parent57b4c4bcb0cb3c48190670b4c46ab9e92a489729 (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 'xmloff')
-rw-r--r--xmloff/source/core/xmlimp.cxx7
-rw-r--r--xmloff/source/script/XMLEventsImportContext.cxx4
2 files changed, 3 insertions, 8 deletions
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 5d3c9fa84d4a..e34de76ee37a 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -712,8 +712,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
{
OUString aMsg( "Root element unknown" );
Reference<xml::sax::XLocator> xDummyLocator;
- Sequence < OUString > aParams(1);
- aParams.getArray()[0] = rName;
+ Sequence < OUString > aParams { rName };
SetError( XMLERROR_FLAG_SEVERE|XMLERROR_UNKNOWN_ROOT,
aParams, aMsg, xDummyLocator );
@@ -1808,9 +1807,7 @@ void SvXMLImport::SetError(
sal_Int32 nId,
const OUString& rMsg1)
{
- Sequence<OUString> aSeq(1);
- OUString* pSeq = aSeq.getArray();
- pSeq[0] = rMsg1;
+ Sequence<OUString> aSeq { rMsg1 };
SetError( nId, aSeq );
}
diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx
index 16bbd7943caf..e9dfc24c0a91 100644
--- a/xmloff/source/script/XMLEventsImportContext.cxx
+++ b/xmloff/source/script/XMLEventsImportContext.cxx
@@ -200,9 +200,7 @@ void XMLEventsImportContext::AddEventValues(
xEvents->replaceByName(rEventName, aAny);
} catch ( const IllegalArgumentException & rException )
{
- Sequence<OUString> aMsgParams(1);
-
- aMsgParams[0] = rEventName;
+ Sequence<OUString> aMsgParams { rEventName };
GetImport().SetError(XMLERROR_FLAG_ERROR |
XMLERROR_ILLEGAL_EVENT,