From 3484dff661d7418ecf4da48faac27ae64e01ec5f Mon Sep 17 00:00:00 2001 From: Arkadiy Illarionov Date: Mon, 6 May 2019 10:08:52 +0300 Subject: Use comphelper::concatSequences to reduce copypaste Change-Id: I15aafc657680d476abdba621ec6c3288beafc55f Reviewed-on: https://gerrit.libreoffice.org/71847 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/core/PropertySetMerger.cxx | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'xmloff') diff --git a/xmloff/source/core/PropertySetMerger.cxx b/xmloff/source/core/PropertySetMerger.cxx index b29cf4579dd7..ad059a2b95d1 100644 --- a/xmloff/source/core/PropertySetMerger.cxx +++ b/xmloff/source/core/PropertySetMerger.cxx @@ -25,6 +25,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::lang; +#include #include class PropertySetMergerImpl : public ::cppu::WeakAggImplHelper3< XPropertySet, XPropertyState, XPropertySetInfo > @@ -200,26 +201,9 @@ Any SAL_CALL PropertySetMergerImpl::getPropertyDefault( const OUString& aPropert Sequence< Property > SAL_CALL PropertySetMergerImpl::getProperties() { Sequence< Property > aProps1( mxPropSet1Info->getProperties() ); - const Property* pProps1 = aProps1.getArray(); - const sal_Int32 nCount1 = aProps1.getLength(); - Sequence< Property > aProps2( mxPropSet1Info->getProperties() ); - const Property* pProps2 = aProps2.getArray(); - const sal_Int32 nCount2 = aProps2.getLength(); - - Sequence< Property > aProperties( nCount1 + nCount2 ); - - sal_Int32 nIndex; - - Property* pProperties = aProperties.getArray(); - - for( nIndex = 0; nIndex < nCount1; nIndex++ ) - *pProperties++ = *pProps1++; - - for( nIndex = 0; nIndex < nCount2; nIndex++ ) - *pProperties++ = *pProps2++; - return aProperties; + return comphelper::concatSequences(aProps1, aProps2); } Property SAL_CALL PropertySetMergerImpl::getPropertyByName( const OUString& aName ) -- cgit