[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source
Kohei Yoshida
kohei.yoshida at gmail.com
Fri May 3 12:11:05 PDT 2013
sc/source/core/data/column.cxx | 4 ++--
sc/source/core/data/column2.cxx | 8 +++-----
sc/source/core/data/column3.cxx | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
New commits:
commit 75fb7b653e86dae9b18cadce48f03232052864e3
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Fri May 3 15:13:27 2013 -0400
A bit of cleanup.
Change-Id: Id7e11540755b727475fb82c872c718fefea26567
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index 188932b..4e061ab 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 817fca0..3301e00 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 8cd890e..5084c3e 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);
More information about the Libreoffice-commits
mailing list