summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-10-13 19:50:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-15 20:49:45 +0200
commit1651dee9a9ebbef9e296358198761361836c16ff (patch)
treed32f3324ba48b127956c4208f3e4f2feaed94f6f /sfx2
parentf8b9116e710891cbd8674fe838f04e41346d83b8 (diff)
Replace lists by vectors (sfx2)
Change-Id: I081d0614978bc6d9f1a137e09d09e6d2dadb925a Reviewed-on: https://gerrit.libreoffice.org/43372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appdispatchprovider.cxx6
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx6
-rw-r--r--sfx2/source/view/viewfrm.cxx14
3 files changed, 13 insertions, 13 deletions
diff --git a/sfx2/source/appl/appdispatchprovider.cxx b/sfx2/source/appl/appdispatchprovider.cxx
index bd7b9c66fd8b..2c284688afaa 100644
--- a/sfx2/source/appl/appdispatchprovider.cxx
+++ b/sfx2/source/appl/appdispatchprovider.cxx
@@ -199,7 +199,7 @@ Sequence< sal_Int16 > SAL_CALL SfxAppDispatchProvider::getSupportedCommandGroups
Sequence< frame::DispatchInformation > SAL_CALL SfxAppDispatchProvider::getConfigurableDispatchInformation( sal_Int16 nCmdGroup )
{
- std::list< frame::DispatchInformation > aCmdList;
+ std::vector< frame::DispatchInformation > aCmdVector;
SolarMutexGuard aGuard;
SfxSlotPool& rAppSlotPool = SfxGetpApp()->GetAppSlotPool_Impl();
@@ -223,7 +223,7 @@ Sequence< frame::DispatchInformation > SAL_CALL SfxAppDispatchProvider::getConfi
frame::DispatchInformation aCmdInfo;
aCmdInfo.Command = ".uno:" + OUString::createFromAscii(pSfxSlot->GetUnoName());
aCmdInfo.GroupId = nCommandGroup;
- aCmdList.push_back( aCmdInfo );
+ aCmdVector.push_back( aCmdInfo );
}
pSfxSlot = rAppSlotPool.NextSlot();
}
@@ -231,7 +231,7 @@ Sequence< frame::DispatchInformation > SAL_CALL SfxAppDispatchProvider::getConfi
}
}
- return comphelper::containerToSequence( aCmdList );
+ return comphelper::containerToSequence( aCmdVector );
}
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 935ba2aaf8c1..b82af1b29b9a 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -1135,7 +1135,7 @@ uno::Sequence< sal_Int16 > SAL_CALL SfxBaseController::getSupportedCommandGroups
uno::Sequence< frame::DispatchInformation > SAL_CALL SfxBaseController::getConfigurableDispatchInformation( sal_Int16 nCmdGroup )
{
- std::list< frame::DispatchInformation > aCmdList;
+ std::vector< frame::DispatchInformation > aCmdVector;
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
@@ -1162,7 +1162,7 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL SfxBaseController::getConfi
frame::DispatchInformation aCmdInfo;
aCmdInfo.Command = ".uno:" + OUString::createFromAscii( pSfxSlot->GetUnoName() );
aCmdInfo.GroupId = nCommandGroup;
- aCmdList.push_back( aCmdInfo );
+ aCmdVector.push_back( aCmdInfo );
}
pSfxSlot = pSlotPool->NextSlot();
}
@@ -1171,7 +1171,7 @@ uno::Sequence< frame::DispatchInformation > SAL_CALL SfxBaseController::getConfi
}
}
- return comphelper::containerToSequence( aCmdList );
+ return comphelper::containerToSequence( aCmdVector );
}
bool SfxBaseController::HandleEvent_Impl( NotifyEvent const & rEvent )
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index ca5283c65137..77490ae2cb64 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -542,7 +542,7 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
// TODO: when UNO ViewFactories are available for SFX-based documents, the below code should
// be UNOized, too
typedef ::std::pair< Reference< XFrame >, SfxInterfaceId > ViewDescriptor;
- ::std::list< ViewDescriptor > aViewFrames;
+ ::std::vector< ViewDescriptor > aViewFrames;
SfxViewFrame *pView = GetFirst( xOldObj );
while ( pView )
{
@@ -736,23 +736,23 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
try
{
- while ( !aViewFrames.empty() )
+ for (auto const& viewFrame : aViewFrames)
{
- LoadViewIntoFrame_Impl( *xNewObj, aViewFrames.front().first, aLoadArgs, aViewFrames.front().second, false );
- aViewFrames.pop_front();
+ LoadViewIntoFrame_Impl( *xNewObj, viewFrame.first, aLoadArgs, viewFrame.second, false );
}
+ aViewFrames.clear();
}
catch( const Exception& )
{
// close the remaining frames
// Don't catch exceptions herein, if this fails, then we're left in an indetermined state, and
// crashing is better than trying to proceed
- while ( !aViewFrames.empty() )
+ for (auto const& viewFrame : aViewFrames)
{
- Reference< util::XCloseable > xClose( aViewFrames.front().first, UNO_QUERY_THROW );
+ Reference< util::XCloseable > xClose( viewFrame.first, UNO_QUERY_THROW );
xClose->close( true );
- aViewFrames.pop_front();
}
+ aViewFrames.clear();
}
// Propagate document closure.