summaryrefslogtreecommitdiff
path: root/svx/source/form/fmdmod.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-07-07 16:20:12 +0300
committerArkadiy Illarionov <qarkai@gmail.com>2019-07-09 17:48:06 +0200
commit44a6335f49a64ac77207d3aa46c267503c65c5ff (patch)
tree8ed220967528dc6caa72fa9e753c0955f3de2433 /svx/source/form/fmdmod.cxx
parent4a96a5d862ed46bbcb64d34b32720b5b1b3d7ca8 (diff)
Simplify Sequence iterations in svx
Use range-based loops, STL and comphelper functions Change-Id: If6d190cf72b8653c1c3fbe9a6a6e47f10f1a6765 Reviewed-on: https://gerrit.libreoffice.org/75255 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
Diffstat (limited to 'svx/source/form/fmdmod.cxx')
-rw-r--r--svx/source/form/fmdmod.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
index 849d21b25871..6f34a16d4d5f 100644
--- a/svx/source/form/fmdmod.cxx
+++ b/svx/source/form/fmdmod.cxx
@@ -23,6 +23,7 @@
#include <fmobj.hxx>
#include <svx/unoshape.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <svx/fmglob.hxx>
@@ -81,10 +82,7 @@ using namespace ::svxform;
static const sal_uInt16 nSvxComponentServiceNameListCount = SAL_N_ELEMENTS(aSvxComponentServiceNameList);
- ::com::sun::star::uno::Sequence< OUString > aSeq( nSvxComponentServiceNameListCount );
- OUString* pStrings = aSeq.getArray();
- for( sal_uInt16 nIdx = 0; nIdx < nSvxComponentServiceNameListCount; nIdx++ )
- pStrings[nIdx] = aSvxComponentServiceNameList[nIdx];
+ auto aSeq( comphelper::arrayToSequence< OUString >(aSvxComponentServiceNameList, nSvxComponentServiceNameListCount) );
::com::sun::star::uno::Sequence< OUString > aParentSeq( SvxUnoDrawMSFactory::getAvailableServiceNames() );
return concatServiceNames( aParentSeq, aSeq );