summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-11-19 09:14:59 +0200
committerNoel Grandin <noel@peralex.com>2015-11-19 09:33:29 +0200
commit2554efabb6d7cd2ad9f7cfdddd0712c25cdca1cd (patch)
tree1b8fd3940910ffcd328e16a53e208c099f67ab21 /framework/source
parentf7b5f477bfd942e0a1d8880c372635000d724dd7 (diff)
use comphelper::containerToSequence
in chart2, we remove a local equivalent of the method Change-Id: I25129a3d1ea1dd724eb9cd38a57be37a78b3d100
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/classes/framecontainer.cxx7
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx5
2 files changed, 3 insertions, 9 deletions
diff --git a/framework/source/classes/framecontainer.cxx b/framework/source/classes/framecontainer.cxx
index 1eea3b39cefe..dd18ea5ce7d6 100644
--- a/framework/source/classes/framecontainer.cxx
+++ b/framework/source/classes/framecontainer.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <vcl/svapp.hxx>
+#include <comphelper/sequence.hxx>
namespace framework{
@@ -186,11 +187,7 @@ css::uno::Reference< css::frame::XFrame > FrameContainer::operator[]( sal_uInt32
css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > FrameContainer::getAllElements() const
{
SolarMutexGuard g;
- sal_Int32 nPosition = 0;
- css::uno::Sequence< css::uno::Reference< css::frame::XFrame > > lElements ( (sal_uInt32)m_aContainer.size() );
- for (TFrameContainer::const_iterator pItem=m_aContainer.begin(); pItem!=m_aContainer.end(); ++pItem)
- lElements[nPosition++] = *pItem;
- return lElements;
+ return comphelper::containerToSequence(m_aContainer);
}
/**-***************************************************************************************************************
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index b7f271a6d5f4..e62a7a7e5603 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -751,10 +751,7 @@ throw (css::uno::RuntimeException, lang::IllegalAccessException)
ImageList* pImageList = implts_getUserImageList( ImageType(i));
pImageList->GetImageNames( aUserImageNames );
- Sequence< OUString > aRemoveList( aUserImageNames.size() );
- const sal_uInt32 nCount = aUserImageNames.size();
- for ( sal_uInt32 j = 0; j < nCount; j++ )
- aRemoveList[j] = aUserImageNames[j];
+ Sequence< OUString > aRemoveList( comphelper::containerToSequence(aUserImageNames) );
// Remove images
removeImages( sal_Int16( i ), aRemoveList );