diff options
author | Arkadiy Illarionov <qarkai@gmail.com> | 2019-05-06 10:08:52 +0300 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-07 08:31:10 +0200 |
commit | 3484dff661d7418ecf4da48faac27ae64e01ec5f (patch) | |
tree | b0bbc594a1b6e351a814945eca1cc2a12882be6e /xmloff | |
parent | 0e791f4e59f0288081375d26d281a5aef41b628d (diff) |
Use comphelper::concatSequences to reduce copypaste
Change-Id: I15aafc657680d476abdba621ec6c3288beafc55f
Reviewed-on: https://gerrit.libreoffice.org/71847
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/PropertySetMerger.cxx | 20 |
1 files changed, 2 insertions, 18 deletions
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 <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 ) |