summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-02 08:28:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-04 08:52:39 +0100
commit28239c40430ec4e613d9d936614c5c3853c332c4 (patch)
tree0fa6bc36c05f8f42a0799b884ed38eb3e569ff90 /starmath
parent85b7e7fdd7f283a3084e2db0dd8e71a48fac228d (diff)
simplify UNO getTypes methods
Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/unomodel.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index a3ae716c8e4d..73dc76130dc6 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -34,6 +34,7 @@
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/script/XLibraryContainer.hpp>
#include <comphelper/propertysetinfo.hxx>
+#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <unotools/moduleoptions.hxx>
@@ -343,17 +344,12 @@ void SAL_CALL SmModel::release() throw()
uno::Sequence< uno::Type > SAL_CALL SmModel::getTypes( )
{
- SolarMutexGuard aGuard;
- uno::Sequence< uno::Type > aTypes = SfxBaseModel::getTypes();
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 4);
- uno::Type* pTypes = aTypes.getArray();
- pTypes[nLen++] = cppu::UnoType<XServiceInfo>::get();
- pTypes[nLen++] = cppu::UnoType<XPropertySet>::get();
- pTypes[nLen++] = cppu::UnoType<XMultiPropertySet>::get();
- pTypes[nLen++] = cppu::UnoType<XRenderable>::get();
-
- return aTypes;
+ return comphelper::concatSequences(SfxBaseModel::getTypes(),
+ uno::Sequence {
+ cppu::UnoType<XServiceInfo>::get(),
+ cppu::UnoType<XPropertySet>::get(),
+ cppu::UnoType<XMultiPropertySet>::get(),
+ cppu::UnoType<XRenderable>::get() });
}
namespace