summaryrefslogtreecommitdiff
path: root/xmloff
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 /xmloff
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 'xmloff')
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx19
1 files changed, 7 insertions, 12 deletions
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index c40160082e72..5d84e725de6f 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -44,6 +44,7 @@
#include "OOo2Oasis.hxx"
#include "XMLFilterRegistration.hxx"
#include <cppuhelper/supportsservice.hxx>
+#include <cppuhelper/typeprovider.hxx>
using namespace ::xmloff::token;
using namespace ::com::sun::star::uno;
@@ -1967,19 +1968,13 @@ Sequence< OUString > SAL_CALL OOo2OasisTransformer::getSupportedServiceNames( )
}
// XTypeProvider
-Sequence< css::uno::Type > SAL_CALL
- OOo2OasisTransformer::getTypes()
+Sequence< css::uno::Type > SAL_CALL OOo2OasisTransformer::getTypes()
{
- Sequence< css::uno::Type > aTypes( XMLTransformerBase::getTypes() );
-
- sal_Int32 nIndex = aTypes.getLength();
- aTypes.realloc( nIndex + 2 );
-
- css::uno::Type* pTypes = aTypes.getArray();
- pTypes[nIndex++] = cppu::UnoType<XImporter>::get();
- pTypes[nIndex++] = cppu::UnoType<XFilter>::get();
-
- return aTypes;
+ return cppu::OTypeCollection(
+ cppu::UnoType<XImporter>::get(),
+ cppu::UnoType<XFilter>::get(),
+ XMLTransformerBase::getTypes()
+ ).getTypes();
}
// Service registration