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>
diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx
index 50aaedf..7af1bf2 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 9abd27b..d620c45 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 4853790..bc6801e 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 65320ff..d2c2ea3 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 46b3e74..ff1f6cb 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(