Kaydet (Commit) cfc71668 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

A bit of cleanup.

Change-Id: Id7e11540755b727475fb82c872c718fefea26567
üst 59f38bab
......@@ -2131,7 +2131,7 @@ void ScColumn::SetDirty( const ScRange& rRange )
else
{
aHint.GetAddress().SetRow( nRow );
aHint.SetBroadcaster(maBroadcasters.get<SvtBroadcaster*>(nRow));
aHint.SetBroadcaster(GetBroadcaster(nRow));
pDocument->Broadcast( aHint );
}
nIndex++;
......@@ -2160,7 +2160,7 @@ void ScColumn::SetTableOpDirty( const ScRange& rRange )
else
{
aHint.GetAddress().SetRow( nRow );
aHint.SetBroadcaster(maBroadcasters.get<SvtBroadcaster*>(nRow));
aHint.SetBroadcaster(GetBroadcaster(nRow));
pDocument->Broadcast( aHint );
}
nIndex++;
......
......@@ -1887,14 +1887,12 @@ void ScColumn::MoveListeners( SvtBroadcaster& rSource, SCROW nDestRow )
return;
// See if the destination position already has a broadcaster, if not, create one.
SvtBroadcaster* pBC = NULL;
if (maBroadcasters.is_empty(nDestRow))
SvtBroadcaster* pBC = GetBroadcaster(nDestRow);
if (!pBC)
{
pBC = new SvtBroadcaster;
maBroadcasters.set(nDestRow, pBC);
}
else
pBC = maBroadcasters.get<SvtBroadcaster*>(nDestRow);
SvtListenerIter aIter(rSource);
for (SvtListener* pLst = aIter.GoStart(); pLst; pLst = aIter.GoNext())
......@@ -1906,7 +1904,7 @@ void ScColumn::MoveListeners( SvtBroadcaster& rSource, SCROW nDestRow )
void ScColumn::EndListening( SvtListener& rLst, SCROW nRow )
{
SvtBroadcaster* pBC = maBroadcasters.get<SvtBroadcaster*>(nRow);
SvtBroadcaster* pBC = GetBroadcaster(nRow);
if (!pBC)
return;
......
......@@ -125,7 +125,7 @@ void ScColumn::DeleteAtIndex( SCSIZE nIndex )
ScBaseCell* pCell = maItems[nIndex].pCell;
SCROW nRow = maItems[nIndex].nRow;
pDocument->Broadcast(
ScHint(SC_HINT_DYING, ScAddress(nCol, nRow, nTab), maBroadcasters.get<SvtBroadcaster*>(nRow)));
ScHint(SC_HINT_DYING, ScAddress(nCol, nRow, nTab), GetBroadcaster(nRow)));
maItems.erase(maItems.begin() + nIndex);
if (pCell->GetCellType() == CELLTYPE_FORMULA)
static_cast<ScFormulaCell*>(pCell)->EndListeningTo(pDocument);
......
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