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