[Libreoffice-commits] core.git: sc/inc sc/source
Julien Nabet
serval2412 at yahoo.fr
Wed Sep 6 20:45:33 UTC 2017
sc/inc/listenercalls.hxx | 4 ++--
sc/inc/unoreflist.hxx | 4 ++--
sc/source/ui/unoobj/listenercalls.cxx | 5 ++---
sc/source/ui/unoobj/unoreflist.cxx | 6 ++----
4 files changed, 8 insertions(+), 11 deletions(-)
New commits:
commit f8defe59ff75df2b516ee407f1dac22b0ac72a19
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Sep 6 21:49:59 2017 +0200
Replace some lists by vectors in unoobj (sc)
Change-Id: I611f1a217ff1d5468c77f04a0c2eddd61ee33b8b
Reviewed-on: https://gerrit.libreoffice.org/42025
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/sc/inc/listenercalls.hxx b/sc/inc/listenercalls.hxx
index 0a335a1a4ae4..d9f1a476af6c 100644
--- a/sc/inc/listenercalls.hxx
+++ b/sc/inc/listenercalls.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SC_INC_LISTENERCALLS_HXX
#define INCLUDED_SC_INC_LISTENERCALLS_HXX
-#include <list>
+#include <vector>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/lang/EventObject.hpp>
@@ -52,7 +52,7 @@ struct ScUnoListenerEntry
class ScUnoListenerCalls
{
private:
- ::std::list<ScUnoListenerEntry> aEntries;
+ ::std::vector<ScUnoListenerEntry> aEntries;
public:
ScUnoListenerCalls();
diff --git a/sc/inc/unoreflist.hxx b/sc/inc/unoreflist.hxx
index d9b845e22d2c..c5192d7308fc 100644
--- a/sc/inc/unoreflist.hxx
+++ b/sc/inc/unoreflist.hxx
@@ -20,7 +20,7 @@
#ifndef INCLUDED_SC_INC_UNOREFLIST_HXX
#define INCLUDED_SC_INC_UNOREFLIST_HXX
-#include <list>
+#include <vector>
#include <svl/hint.hxx>
#include "rangelst.hxx"
@@ -42,7 +42,7 @@ struct ScUnoRefEntry
class ScUnoRefList
{
private:
- ::std::list<ScUnoRefEntry> aEntries;
+ ::std::vector<ScUnoRefEntry> aEntries;
public:
ScUnoRefList();
diff --git a/sc/source/ui/unoobj/listenercalls.cxx b/sc/source/ui/unoobj/listenercalls.cxx
index b1d98412a183..1164043b3977 100644
--- a/sc/source/ui/unoobj/listenercalls.cxx
+++ b/sc/source/ui/unoobj/listenercalls.cxx
@@ -48,9 +48,8 @@ void ScUnoListenerCalls::ExecuteAndClear()
if (!aEntries.empty())
{
- std::list<ScUnoListenerEntry>::iterator aItr(aEntries.begin());
- std::list<ScUnoListenerEntry>::iterator aEndItr(aEntries.end());
- while ( aItr != aEndItr )
+ std::vector<ScUnoListenerEntry>::iterator aItr(aEntries.begin());
+ while (aItr != aEntries.end())
{
ScUnoListenerEntry aEntry = *aItr;
try
diff --git a/sc/source/ui/unoobj/unoreflist.cxx b/sc/source/ui/unoobj/unoreflist.cxx
index 598b25bfcf94..13d6cd06a0d6 100644
--- a/sc/source/ui/unoobj/unoreflist.cxx
+++ b/sc/source/ui/unoobj/unoreflist.cxx
@@ -35,11 +35,9 @@ void ScUnoRefList::Add( sal_Int64 nId, const ScRangeList& rOldRanges )
void ScUnoRefList::Undo( ScDocument* pDoc )
{
- std::list<ScUnoRefEntry>::const_iterator aEnd( aEntries.end() );
- for ( std::list<ScUnoRefEntry>::const_iterator aIter( aEntries.begin() );
- aIter != aEnd; ++aIter )
+ for (auto & entry: aEntries)
{
- ScUnoRefUndoHint aHint( *aIter );
+ ScUnoRefUndoHint aHint(entry);
pDoc->BroadcastUno( aHint );
}
}
More information about the Libreoffice-commits
mailing list