From 28239c40430ec4e613d9d936614c5c3853c332c4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 2 Mar 2019 08:28:03 +0200 Subject: simplify UNO getTypes methods Change-Id: Ia8b07edec54527fb4904536fabb03a18e8452550 Reviewed-on: https://gerrit.libreoffice.org/68659 Tested-by: Jenkins Reviewed-by: Noel Grandin --- basic/source/classes/sbxmod.cxx | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'basic/source/classes') 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 #include #include +#include #include #include #include @@ -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::get(); - } - else - { - *pPtr = sTypes[ i - 1 ]; - } - } + m_Types = comphelper::concatSequences(sTypes, + Sequence { cppu::UnoType::get() }); } return m_Types; } -- cgit