summaryrefslogtreecommitdiff
path: root/framework/source/helper/ocomponentenumeration.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-02-16 19:58:33 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-04-01 07:33:45 +0000
commit3f7f497192deb486b1b959996c14f8f094146945 (patch)
treeb830caec984a7ac9fb71ce92663f35c3f5f221a1 /framework/source/helper/ocomponentenumeration.cxx
parentdba6451b2f25b3d8510e0a848977166ee5e6c8e3 (diff)
sequence->vector in framework
Change-Id: I457c3da4f4a31f58d688dcd96a2ccfc36518490d Reviewed-on: https://gerrit.libreoffice.org/23692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework/source/helper/ocomponentenumeration.cxx')
-rw-r--r--framework/source/helper/ocomponentenumeration.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index dce0ead90d00..9f4768c26b2f 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -31,7 +31,7 @@ using namespace ::osl;
// constructor
-OComponentEnumeration::OComponentEnumeration( const Sequence< css::uno::Reference< XComponent > >& seqComponents )
+OComponentEnumeration::OComponentEnumeration( const std::vector< css::uno::Reference< XComponent > >& seqComponents )
: m_nPosition ( 0 ) // 0 is the first position for a valid list and the right value for an invalid list to!
, m_seqComponents ( seqComponents )
{}
@@ -67,7 +67,7 @@ sal_Bool SAL_CALL OComponentEnumeration::hasMoreElements() throw( RuntimeExcepti
// => The last one is getLength() - 1!
// m_nPosition's current value is the position for the next element, which will be return, if user call "nextElement()"
// => We have more elements if current position less then the length of the list!
- return ( m_nPosition < (sal_uInt32)(m_seqComponents.getLength()) );
+ return ( m_nPosition < (sal_uInt32)(m_seqComponents.size()) );
}
// XEnumeration
@@ -105,7 +105,7 @@ void OComponentEnumeration::impl_resetObject()
// I can't say, which one is the first. Normally the disposing-call - but other way ....
// Delete list of components.
- m_seqComponents.realloc( 0 );
+ m_seqComponents.clear();
// Reset position in list.
// The list has no elements anymore. m_nPosition is normally the current position in list for nextElement!
// But a position of 0 in a list of 0 items is an invalid state. This constellation can't work in future.