summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-11-13 20:33:50 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-11-14 23:53:50 -0500
commit18d07b2affbbbfb2ff9152d3ad8d1744fe75ab47 (patch)
tree49e285fe010f073c89f92f321397a495902f78a5 /sc/source/core/data
parentd7867b28623e4220f62b8ed9259bed5d8878a3b3 (diff)
Rework SvtListener and SvtBroadcaster internals.
The old code was simply awkward. Change-Id: I1a58a9af86c100be238d306570b40f70c5100314
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/bcaslot.cxx10
-rw-r--r--sc/source/core/data/column2.cxx11
2 files changed, 11 insertions, 10 deletions
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index b7ed7f5d411c..4578fd9e55cd 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -19,7 +19,6 @@
#include <sfx2/objsh.hxx>
#include <svl/listener.hxx>
-#include <svl/listeneriter.hxx>
#include "document.hxx"
#include "brdcst.hxx"
@@ -419,11 +418,12 @@ void ScBroadcastAreaSlot::UpdateInsert( ScBroadcastArea* pArea )
if (pArea != pTarget)
{
SvtBroadcaster& rTarget = pTarget->GetBroadcaster();
- SvtListenerIter it( pArea->GetBroadcaster());
- for (SvtListener* pListener = it.GetCurr(); pListener;
- pListener = it.GoNext())
+ SvtBroadcaster::ListenersType& rListeners = pArea->GetBroadcaster().GetAllListeners();
+ SvtBroadcaster::ListenersType::iterator it = rListeners.begin(), itEnd = rListeners.end();
+ for (; it != itEnd; ++it)
{
- pListener->StartListening( rTarget);
+ SvtListener& rListener = **it;
+ rListener.StartListening(rTarget);
}
}
}
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index fbd0fbf2067a..240677b55fa1 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -60,7 +60,6 @@
#include <editeng/justifyitem.hxx>
#include <svl/zforlist.hxx>
#include <svl/broadcast.hxx>
-#include <svl/listeneriter.hxx>
#include <vcl/outdev.hxx>
#include "formula/errorcodes.hxx"
#include "formula/vectortoken.hxx"
@@ -3075,11 +3074,13 @@ void ScColumn::MoveListeners( SvtBroadcaster& rSource, SCROW nDestRow )
maBroadcasters.set(nDestRow, pBC);
}
- SvtListenerIter aIter(rSource);
- for (SvtListener* pLst = aIter.GoStart(); pLst; pLst = aIter.GoNext())
+ SvtBroadcaster::ListenersType& rListeners = rSource.GetAllListeners();
+ SvtBroadcaster::ListenersType::iterator it = rListeners.begin(), itEnd = rListeners.end();
+ for (; it != itEnd; ++it)
{
- pLst->StartListening(*pBC);
- pLst->EndListening(rSource);
+ SvtListener& rLst = **it;
+ rLst.StartListening(*pBC);
+ rLst.EndListening(rSource);
}
}