diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-03 15:13:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-05-09 13:34:31 -0400 |
commit | cfc71668da381c3a2304b4de6288a1af82ce0752 (patch) | |
tree | bb8aae943c19851602458d4c98afacea5f8b1e8e /sc | |
parent | 59f38babd074cc0b835a5d2a1c81af013dba0deb (diff) |
A bit of cleanup.
Change-Id: Id7e11540755b727475fb82c872c718fefea26567
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/column.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/column2.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/column3.cxx | 2 |
3 files changed, 6 insertions, 8 deletions
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index 188932be6078..4e061abc8a2f 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -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++; diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index 817fca09b7c9..3301e00928c2 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -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; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 8cd890ec60e4..5084c3ef292e 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -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); |