embeddedobj/source/commonembedding/xfactory.cxx     |    5 +----
 filter/source/odfflatxml/OdfFlatXml.cxx             |    5 +----
 filter/source/storagefilterdetect/filterdetect.cxx  |    6 +-----
 filter/source/t602/t602filter.cxx                   |    9 ++-------
 filter/source/textfilterdetect/filterdetect.cxx     |    6 +-----
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx |    6 +-----
 xmloff/source/core/unoatrcn.cxx                     |    4 +---
 xmloff/source/core/xmlexp.cxx                       |    5 +----
 xmloff/source/core/xmlimp.cxx                       |    5 +----
 xmloff/source/transform/OOo2Oasis.cxx               |   11 +++--------
 xmloff/source/transform/Oasis2OOo.cxx               |    7 ++-----
 11 files changed, 15 insertions(+), 54 deletions(-)

New commits:
commit b4092c738321cd9f9e2cba18a49519abcbd4451a
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Aug 17 12:25:34 2019 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sat Aug 17 13:29:54 2019 +0200

    tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctor
    
    in embeddedobj and filter
    
    Change-Id: I2da3fa1df8782e449852358d1c86f5e4bc79ea1a
    Reviewed-on: https://gerrit.libreoffice.org/77627
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/embeddedobj/source/commonembedding/xfactory.cxx 
b/embeddedobj/source/commonembedding/xfactory.cxx
index 50e926fd7867..1c0209460774 100644
--- a/embeddedobj/source/commonembedding/xfactory.cxx
+++ b/embeddedobj/source/commonembedding/xfactory.cxx
@@ -39,10 +39,7 @@ using namespace ::com::sun::star;
 
 uno::Sequence< OUString > 
OOoEmbeddedObjectFactory::impl_staticGetSupportedServiceNames()
 {
-    uno::Sequence< OUString > aRet(2);
-    aRet[0] = "com.sun.star.embed.OOoEmbeddedObjectFactory";
-    aRet[1] = "com.sun.star.comp.embed.OOoEmbeddedObjectFactory";
-    return aRet;
+    return { "com.sun.star.embed.OOoEmbeddedObjectFactory", 
"com.sun.star.comp.embed.OOoEmbeddedObjectFactory" };
 }
 
 OUString OOoEmbeddedObjectFactory::impl_staticGetImplementationName()
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx 
b/filter/source/odfflatxml/OdfFlatXml.cxx
index 29882d0d4029..8e0a4beb076e 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -208,10 +208,7 @@ OUString OdfFlatXml::impl_getImplementationName()
 
 Sequence< OUString > OdfFlatXml::impl_getSupportedServiceNames()
 {
-    Sequence< OUString > lServiceNames(2);
-    lServiceNames[0] = "com.sun.star.document.ImportFilter";
-    lServiceNames[1] = "com.sun.star.document.ExportFilter";
-    return lServiceNames;
+    return { "com.sun.star.document.ImportFilter", 
"com.sun.star.document.ExportFilter" };
 }
 
 Reference< XInterface > SAL_CALL OdfFlatXml::impl_createInstance(const 
Reference< XMultiServiceFactory >& fact)
diff --git a/filter/source/storagefilterdetect/filterdetect.cxx 
b/filter/source/storagefilterdetect/filterdetect.cxx
index 45bfa1f6cdbf..02ed875c6699 100644
--- a/filter/source/storagefilterdetect/filterdetect.cxx
+++ b/filter/source/storagefilterdetect/filterdetect.cxx
@@ -172,11 +172,7 @@ OUString StorageFilterDetect_getImplementationName()
 
 uno::Sequence<OUString> StorageFilterDetect_getSupportedServiceNames()
 {
-    uno::Sequence<OUString> aRet(2);
-    OUString* pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.document.ExtendedTypeDetection";
-    pArray[1] = "com.sun.star.comp.filters.StorageFilterDetect";
-    return aRet;
+    return { "com.sun.star.document.ExtendedTypeDetection", 
"com.sun.star.comp.filters.StorageFilterDetect" };
 }
 
 uno::Reference<uno::XInterface> StorageFilterDetect_createInstance(
diff --git a/filter/source/t602/t602filter.cxx 
b/filter/source/t602/t602filter.cxx
index 1f8fe00c91e4..124ec86b0a0d 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -870,11 +870,7 @@ OUString T602ImportFilter_getImplementationName ()
 
 Sequence< OUString > T602ImportFilter_getSupportedServiceNames(  )
 {
-    Sequence < OUString > aRet(2);
-    OUString* pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ImportFilter";
-    pArray[1] =  "com.sun.star.document.ExtendedTypeDetection";
-    return aRet;
+    return { "com.sun.star.document.ImportFilter", 
"com.sun.star.document.ExtendedTypeDetection" };
 }
 
 Reference< XInterface > T602ImportFilter_createInstance( const Reference< 
XMultiServiceFactory > & rSMgr)
@@ -1140,8 +1136,7 @@ OUString T602ImportFilterDialog_getImplementationName ()
 
 Sequence< OUString > T602ImportFilterDialog_getSupportedServiceNames(  )
 {
-    Sequence<OUString> aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
-    return aRet;
+    return { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
 }
 
 Reference< XInterface > T602ImportFilterDialog_createInstance( const 
Reference< XMultiServiceFactory > & )
diff --git a/filter/source/textfilterdetect/filterdetect.cxx 
b/filter/source/textfilterdetect/filterdetect.cxx
index 0551f275eecb..b4959639c574 100644
--- a/filter/source/textfilterdetect/filterdetect.cxx
+++ b/filter/source/textfilterdetect/filterdetect.cxx
@@ -219,11 +219,7 @@ OUString PlainTextFilterDetect_getImplementationName()
 
 uno::Sequence<OUString> PlainTextFilterDetect_getSupportedServiceNames()
 {
-    uno::Sequence<OUString> aRet(2);
-    OUString* pArray = aRet.getArray();
-    pArray[0] = "com.sun.star.document.ExtendedTypeDetection";
-    pArray[1] = "com.sun.star.comp.filters.PlainTextFilterDetect";
-    return aRet;
+    return { "com.sun.star.document.ExtendedTypeDetection", 
"com.sun.star.comp.filters.PlainTextFilterDetect" };
 }
 
 // XServiceInfo
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx 
b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 20ed64a4fb30..ba039bb99916 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -353,11 +353,7 @@ OUString XmlFilterAdaptor_getImplementationName ()
 
 Sequence< OUString > XmlFilterAdaptor_getSupportedServiceNames(  )
 {
-    Sequence < OUString > aRet(2);
-    OUString* pArray = aRet.getArray();
-    pArray[0] =  "com.sun.star.document.ExportFilter";
-    pArray[1] =  "com.sun.star.document.ImportFilter";
-    return aRet;
+    return { "com.sun.star.document.ExportFilter", 
"com.sun.star.document.ImportFilter" };
 }
 
 Reference< XInterface > XmlFilterAdaptor_createInstance( const Reference< 
XMultiServiceFactory > & rSMgr)
commit 1ffb614a1c7b1b693d9e78373b947ab049baa778
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Aug 17 11:50:44 2019 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sat Aug 17 13:29:46 2019 +0200

    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 <serval2...@yahoo.fr>

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(
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to