summaryrefslogtreecommitdiff
path: root/basic
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 /basic
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 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index c7da7a7f6e21..23a279485afa 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -38,6 +38,7 @@
#include <basic/basrdll.hxx>
#include <sbobjmod.hxx>
#include <basic/vbahelper.hxx>
+#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase.hxx>
#include <unotools/eventcfg.hxx>
#include <com/sun/star/frame/Desktop.hpp>
@@ -175,19 +176,8 @@ Sequence< Type > SAL_CALL DocObjectWrapper::getTypes()
{
sTypes = m_xAggregateTypeProv->getTypes();
}
- m_Types.realloc( sTypes.getLength() + 1 );
- Type* pPtr = m_Types.getArray();
- for ( int i=0; i<m_Types.getLength(); ++i, ++pPtr )
- {
- if ( i == 0 )
- {
- *pPtr = cppu::UnoType<XInvocation>::get();
- }
- else
- {
- *pPtr = sTypes[ i - 1 ];
- }
- }
+ m_Types = comphelper::concatSequences(sTypes,
+ Sequence { cppu::UnoType<XInvocation>::get() });
}
return m_Types;
}