Kaydet (Commit) a6b80833 authored tarafından Julien Nabet's avatar Julien Nabet

Replace some lists by vectors (ucb)

Change-Id: I2e42f6b0f3835400bca008cca31129fc03a76359
Reviewed-on: https://gerrit.libreoffice.org/42607Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 31919b89
...@@ -717,7 +717,7 @@ HierarchyContent::makeNewIdentifier( const OUString& rTitle ) ...@@ -717,7 +717,7 @@ HierarchyContent::makeNewIdentifier( const OUString& rTitle )
} }
void HierarchyContent::queryChildren( HierarchyContentRefList& rChildren ) void HierarchyContent::queryChildren( HierarchyContentRefVector& rChildren )
{ {
if ( ( m_eKind != FOLDER ) && ( m_eKind != ROOT ) ) if ( ( m_eKind != FOLDER ) && ( m_eKind != ROOT ) )
return; return;
...@@ -808,13 +808,12 @@ bool HierarchyContent::exchangeIdentity( ...@@ -808,13 +808,12 @@ bool HierarchyContent::exchangeIdentity(
{ {
// Process instantiated children... // Process instantiated children...
HierarchyContentRefList aChildren; HierarchyContentRefVector aChildren;
queryChildren( aChildren ); queryChildren( aChildren );
HierarchyContentRefList::const_iterator it = aChildren.begin(); HierarchyContentRefVector::const_iterator it = aChildren.begin();
HierarchyContentRefList::const_iterator end = aChildren.end();
while ( it != end ) while ( it != aChildren.end() )
{ {
HierarchyContentRef xChild = (*it); HierarchyContentRef xChild = (*it);
...@@ -1488,16 +1487,12 @@ void HierarchyContent::destroy( bool bDeletePhysical, ...@@ -1488,16 +1487,12 @@ void HierarchyContent::destroy( bool bDeletePhysical,
{ {
// Process instantiated children... // Process instantiated children...
HierarchyContentRefList aChildren; HierarchyContentRefVector aChildren;
queryChildren( aChildren ); queryChildren( aChildren );
HierarchyContentRefList::const_iterator it = aChildren.begin(); for ( auto & child : aChildren)
HierarchyContentRefList::const_iterator end = aChildren.end();
while ( it != end )
{ {
(*it)->destroy( bDeletePhysical, xEnv ); child->destroy( bDeletePhysical, xEnv );
++it;
} }
} }
} }
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#ifndef INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYCONTENT_HXX #ifndef INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYCONTENT_HXX
#define INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYCONTENT_HXX #define INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYCONTENT_HXX
#include <list> #include <vector>
#include <rtl/ref.hxx> #include <rtl/ref.hxx>
#include <com/sun/star/ucb/XContentCreator.hpp> #include <com/sun/star/ucb/XContentCreator.hpp>
#include <ucbhelper/contenthelper.hxx> #include <ucbhelper/contenthelper.hxx>
...@@ -155,8 +155,8 @@ private: ...@@ -155,8 +155,8 @@ private:
makeNewIdentifier( const OUString& rTitle ); makeNewIdentifier( const OUString& rTitle );
typedef rtl::Reference< HierarchyContent > HierarchyContentRef; typedef rtl::Reference< HierarchyContent > HierarchyContentRef;
typedef std::list< HierarchyContentRef > HierarchyContentRefList; typedef std::vector< HierarchyContentRef > HierarchyContentRefVector;
void queryChildren( HierarchyContentRefList& rChildren ); void queryChildren( HierarchyContentRefVector& rChildren );
bool exchangeIdentity( bool exchangeIdentity(
const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId ); const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId );
......
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