summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-08-17 11:50:44 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-08-17 13:29:46 +0200
commit1ffb614a1c7b1b693d9e78373b947ab049baa778 (patch)
treefbabe0299d6d200c732389676f7fe35f10fc327b /xmloff
parent3d24130986e6a0e1baa2cff61309f0f42cf0c339 (diff)
tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
in xmloff Change-Id: Id76c050f4e67bbcada29e78b938cc03ba5d0f6dd Reviewed-on: https://gerrit.libreoffice.org/77622 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/core/unoatrcn.cxx4
-rw-r--r--xmloff/source/core/xmlexp.cxx5
-rw-r--r--xmloff/source/core/xmlimp.cxx5
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx11
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx7
5 files changed, 8 insertions, 24 deletions
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index 50aaedfdd7c1..7af1bf24d72c 100644
--- a/xmloff/source/core/unoatrcn.cxx
+++ b/xmloff/source/core/unoatrcn.cxx
@@ -241,9 +241,7 @@ OUString SAL_CALL SvUnoAttributeContainer::getImplementationName()
uno::Sequence< OUString > SvUnoAttributeContainer::getSupportedServiceNames()
{
- OUString aSN( "com.sun.star.xml.AttributeContainer" );
- uno::Sequence< OUString > aNS( &aSN, 1 );
- return aNS;
+ return { "com.sun.star.xml.AttributeContainer" };
}
sal_Bool SvUnoAttributeContainer::supportsService(const OUString& ServiceName)
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 9abd27bb9b1f..d620c45d8053 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -859,10 +859,7 @@ sal_Bool SAL_CALL SvXMLExport::supportsService( const OUString& rServiceName )
uno::Sequence< OUString > SAL_CALL SvXMLExport::getSupportedServiceNames( )
{
- uno::Sequence<OUString> aSeq(2);
- aSeq[0] = "com.sun.star.document.ExportFilter";
- aSeq[1] = "com.sun.star.xml.XMLExportFilter";
- return aSeq;
+ return { "com.sun.star.document.ExportFilter", "com.sun.star.xml.XMLExportFilter" };
}
OUString
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 4853790606c7..bc6801ea6897 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1144,10 +1144,7 @@ sal_Bool SAL_CALL SvXMLImport::supportsService( const OUString& rServiceName )
uno::Sequence< OUString > SAL_CALL SvXMLImport::getSupportedServiceNames( )
{
- uno::Sequence<OUString> aSeq(2);
- aSeq[0] = "com.sun.star.document.ImportFilter";
- aSeq[1] = "com.sun.star.xml.XMLImportFilter";
- return aSeq;
+ return { "com.sun.star.document.ImportFilter", "com.sun.star.xml.XMLImportFilter" };
}
XMLTextImportHelper* SvXMLImport::CreateTextImport()
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 65320ff36813..d2c2ea35f23c 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1962,8 +1962,7 @@ sal_Bool SAL_CALL OOo2OasisTransformer::supportsService( const OUString& Service
Sequence< OUString > SAL_CALL OOo2OasisTransformer::getSupportedServiceNames( )
{
- Sequence<OUString> aSeq(0);
- return aSeq;
+ return { };
}
// XTypeProvider
@@ -1985,9 +1984,7 @@ OUString OOo2OasisTransformer_getImplementationName() throw()
Sequence< OUString > OOo2OasisTransformer_getSupportedServiceNames() throw()
{
- const OUString aServiceName( OOo2OasisTransformer_getImplementationName() );
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return { OOo2OasisTransformer_getImplementationName() };
}
Reference< XInterface > OOo2OasisTransformer_createInstance(
@@ -2004,9 +2001,7 @@ OUString className##_getImplementationName() throw() \
\
Sequence< OUString > className##_getSupportedServiceNames() throw()\
{ \
- const OUString aServiceName( className##_getImplementationName() ); \
- const Sequence< OUString > aSeq( &aServiceName, 1 ); \
- return aSeq; \
+ return { className##_getImplementationName() }; \
} \
\
Reference< XInterface > className##_createInstance( \
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index 46b3e748cfbe..ff1f6cb346ed 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1954,8 +1954,7 @@ sal_Bool SAL_CALL Oasis2OOoTransformer::supportsService( const OUString& Service
Sequence< OUString > SAL_CALL Oasis2OOoTransformer::getSupportedServiceNames( )
{
- Sequence<OUString> aSeq(0);
- return aSeq;
+ return { };
}
// Service registration
@@ -1968,9 +1967,7 @@ OUString Oasis2OOoTransformer_getImplementationName() throw()
Sequence< OUString > Oasis2OOoTransformer_getSupportedServiceNames()
throw()
{
- const OUString aServiceName( Oasis2OOoTransformer_getImplementationName() );
- const Sequence< OUString > aSeq( &aServiceName, 1 );
- return aSeq;
+ return { Oasis2OOoTransformer_getImplementationName() };
}
Reference< XInterface > Oasis2OOoTransformer_createInstance(