Kaydet (Commit) 3484dff6 authored tarafından Arkadiy Illarionov's avatar Arkadiy Illarionov Kaydeden (comit) Noel Grandin

Use comphelper::concatSequences to reduce copypaste

Change-Id: I15aafc657680d476abdba621ec6c3288beafc55f
Reviewed-on: https://gerrit.libreoffice.org/71847
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 0e791f4e
......@@ -25,6 +25,7 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang;
#include <comphelper/sequence.hxx>
#include <cppuhelper/implbase3.hxx>
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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment