basctl/source/basicide/baside3.cxx   |    4 +---
 basctl/source/dlged/managelang.cxx   |    4 +---
 basegfx/source/tools/canvastools.cxx |    7 +++----
 basic/source/classes/sbunoobj.cxx    |    8 ++------
 4 files changed, 7 insertions(+), 16 deletions(-)

New commits:
commit 8209c2569f5726f9ed29f75d30efdccb94f98fe5
Author:     vgeof <vivian...@hotmail.fr>
AuthorDate: Sat May 9 18:57:44 2020 -0300
Commit:     Michael Stahl <michael.st...@cib.de>
CommitDate: Tue May 19 09:40:05 2020 +0200

    tdf#88205 EasyHack change css::uno::Sequence initializations
    
    1st commit. Use initializer lists for uno::Sequence in 4 files
    
    Change-Id: I0192b4b8f023fb8d606dff81c4b910c8c7c2a9a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93900
    Reviewed-by: Michael Stahl <michael.st...@cib.de>
    Tested-by: Jenkins

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index eab48715882b..4799e8f7a299 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1007,9 +1007,7 @@ bool implImportDialog(weld::Window* pWin, const OUString& 
rCurPath, const Script
                         }
                     }
 
-                    Sequence< lang::Locale > aFirstLocaleSeq( 1 );
-                    aFirstLocaleSeq[0] = aFirstLocale;
-                    pCurMgr->handleAddLocales( aFirstLocaleSeq );
+                    pCurMgr->handleAddLocales( {aFirstLocale} );
 
                     if( nOnlyInImportLanguageCount > 1 )
                     {
diff --git a/basctl/source/dlged/managelang.cxx 
b/basctl/source/dlged/managelang.cxx
index 01ce70421b24..77a40f031c80 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -298,9 +298,7 @@ Sequence< Locale > SetDefaultLanguageDialog::GetLocales() 
const
     if (bNotLocalized)
     {
         LanguageType eType(m_xLanguageLB->get_selected_id().toUInt32());
-        Sequence<Locale> aLocaleSeq(1);
-        aLocaleSeq[0] = LanguageTag(eType).getLocale();
-        return aLocaleSeq;
+        return {LanguageTag(eType).getLocale()};
     }
     std::vector<Locale> aLocaleSeq;
     const sal_Int32 nCount = m_xCheckLangLB->n_children();
diff --git a/basegfx/source/tools/canvastools.cxx 
b/basegfx/source/tools/canvastools.cxx
index 67bba41a933f..11ebe70dec28 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -131,15 +131,14 @@ namespace basegfx::unotools
 
             if( rPoly.areControlPointsUsed() )
             {
-                uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > 
> outputSequence( 1 );
-                outputSequence[0] = bezierSequenceFromB2DPolygon( rPoly );
+                uno::Sequence< uno::Sequence< geometry::RealBezierSegment2D > 
> outputSequence{ bezierSequenceFromB2DPolygon( rPoly )};
 
                 xRes = xGraphicDevice->createCompatibleBezierPolyPolygon( 
outputSequence );
             }
             else
             {
-                uno::Sequence< uno::Sequence< geometry::RealPoint2D > > 
outputSequence( 1 );
-                outputSequence[0] = pointSequenceFromB2DPolygon( rPoly );
+                uno::Sequence< uno::Sequence< geometry::RealPoint2D > > 
outputSequence{
+                 pointSequenceFromB2DPolygon( rPoly )};
 
                 xRes = xGraphicDevice->createCompatibleLinePolyPolygon( 
outputSequence );
             }
diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 15e8f6b91154..dc3e97619c73 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -3236,9 +3236,7 @@ void VBAConstantHelper::init()
     if ( isInited )
         return;
 
-    Sequence< TypeClass > types(1);
-    types[ 0 ] = TypeClass_CONSTANTS;
-    Reference< XTypeDescriptionEnumeration > xEnum = 
getTypeDescriptorEnumeration( "ooo.vba", types, 
TypeDescriptionSearchDepth_INFINITE  );
+    Reference< XTypeDescriptionEnumeration > xEnum = 
getTypeDescriptorEnumeration( "ooo.vba", {TypeClass_CONSTANTS}, 
TypeDescriptionSearchDepth_INFINITE  );
 
     if ( !xEnum.is())
     {
@@ -3922,9 +3920,7 @@ static Reference< XInterface > createAllListenerAdapter
         Reference< XInvocation > xInvocationToAllListenerMapper =
             new InvocationToAllListenerMapper(xListenerType, xListener, 
Helper);
         Type aListenerType( xListenerType->getTypeClass(), 
xListenerType->getName() );
-        Sequence<Type> arg2(1);
-        arg2[0] = aListenerType;
-        xAdapter = xInvocationAdapterFactory->createAdapter( 
xInvocationToAllListenerMapper, arg2 );
+        xAdapter = xInvocationAdapterFactory->createAdapter( 
xInvocationToAllListenerMapper, {aListenerType} );
     }
     return xAdapter;
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to