basctl/source/dlged/propbrw.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit 633213093e22c813f3c9df6d2d174ec07eedebff Author: Akshay Kumar Dubey <akshaymani...@gmail.com> AuthorDate: Sat Jan 11 11:15:18 2025 +0530 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Wed Jan 15 10:20:23 2025 +0100 Use comphelper::containerToSequence() instead of loop Change-Id: I768bf65bd3f5d2fff601a0d50fcec8e832162b70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180108 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Tested-by: Jenkins diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index c16e65a7d167..c3d30d15d03d 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -43,6 +43,7 @@ #include <vcl/weld.hxx> #include <memory> +#include <comphelper/sequence.hxx> namespace basctl { @@ -241,7 +242,6 @@ bool PropBrw::Close() Sequence< Reference< XInterface > > PropBrw::CreateMultiSelectionSequence( const SdrMarkList& _rMarkList ) { - Sequence< Reference< XInterface > > aSeq; InterfaceArray aInterfaces; const size_t nMarkCount = _rMarkList.GetMarkCount(); @@ -271,13 +271,7 @@ Sequence< Reference< XInterface > > } } - sal_Int32 nCount = aInterfaces.size(); - aSeq.realloc( nCount ); - Reference< XInterface >* pInterfaces = aSeq.getArray(); - for( sal_Int32 i = 0 ; i < nCount ; i++ ) - pInterfaces[i] = aInterfaces[i]; - - return aSeq; + return comphelper::containerToSequence(aInterfaces); }