sw/source/core/unocore/unodraw.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 84322944980f6e2f9d4a531de7a6803797156968
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sat Nov 16 11:19:38 2019 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat Nov 16 14:51:32 2019 +0100

    Simplify sequence initialization
    
    Change-Id: I332cf55883bab679c395b9643d54e558ce0c1c64
    Reviewed-on: https://gerrit.libreoffice.org/82974
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 35d35b635ee0..c73614a61bc7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -63,6 +63,8 @@
 #include <crstate.hxx>
 #include <comphelper/extract.hxx>
 #include <comphelper/profilezone.hxx>
+#include <comphelper/OUStringLiteralList.hxx>
+#include <comphelper/sequence.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <svx/scene3d.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -2146,9 +2148,8 @@ uno::Sequence< OUString > 
SwXShape::getSupportedServiceNames()
     uno::Sequence< OUString > aSeq;
     if (SvxShape* pSvxShape = GetSvxShape())
         aSeq = pSvxShape->getSupportedServiceNames();
-    aSeq.realloc(aSeq.getLength() + 1);
-    aSeq.getArray()[aSeq.getLength() - 1] = "com.sun.star.drawing.Shape";
-    return aSeq;
+    return comphelper::concatSequences(
+        aSeq, comphelper::OUStringLiteralList({ "com.sun.star.drawing.Shape" 
}));
 }
 
 SvxShape*   SwXShape::GetSvxShape()
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to