summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-16 11:19:38 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-16 14:51:32 +0100
commit84322944980f6e2f9d4a531de7a6803797156968 (patch)
treee873be0b269409e47060a6a2a7bacd174eaa5337 /sw/source
parent6de6c21de8278dec88b15a2482a4a034c782d5f4 (diff)
Simplify sequence initialization
Change-Id: I332cf55883bab679c395b9643d54e558ce0c1c64 Reviewed-on: https://gerrit.libreoffice.org/82974 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/unocore/unodraw.cxx7
1 files changed, 4 insertions, 3 deletions
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()