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

A bit of cleanup before refactoring.

Change-Id: I3627a83669b6a69c299aef96b8b2ead1352eabe2
üst c2e28f50
...@@ -3188,53 +3188,32 @@ void ScFormulaCell::StartListeningTo( ScDocument* pDoc ) ...@@ -3188,53 +3188,32 @@ void ScFormulaCell::StartListeningTo( ScDocument* pDoc )
switch( eType ) switch( eType )
{ {
case svSingleRef: case svSingleRef:
rRef1.CalcAbsIfRel(aPos); {
if ( rRef1.Valid() ) ScAddress aCell = rRef1.toAbs(aPos);
{ if (aCell.IsValid())
pDoc->StartListeningCell( pDoc->StartListeningCell(aCell, this);
ScAddress( rRef1.nCol, }
rRef1.nRow,
rRef1.nTab ), this );
}
break; break;
case svDoubleRef: case svDoubleRef:
t->CalcAbsIfRel(aPos); {
if ( rRef1.Valid() && rRef2.Valid() ) ScAddress aCell1 = rRef1.toAbs(aPos);
ScAddress aCell2 = rRef2.toAbs(aPos);
if (aCell1.IsValid() && aCell2.IsValid())
{ {
if ( t->GetOpCode() == ocColRowNameAuto ) if (t->GetOpCode() == ocColRowNameAuto)
{ // automagically { // automagically
if ( rRef1.IsColRel() ) if ( rRef1.IsColRel() )
{ // ColName { // ColName
pDoc->StartListeningArea( ScRange ( aCell2.SetRow(MAXROW);
rRef1.nCol,
rRef1.nRow,
rRef1.nTab,
rRef2.nCol,
MAXROW,
rRef2.nTab ), this );
} }
else else
{ // RowName { // RowName
pDoc->StartListeningArea( ScRange ( aCell2.SetCol(MAXCOL);
rRef1.nCol,
rRef1.nRow,
rRef1.nTab,
MAXCOL,
rRef2.nRow,
rRef2.nTab ), this );
} }
} }
else pDoc->StartListeningArea(ScRange(aCell1, aCell2), this);
{
pDoc->StartListeningArea( ScRange (
rRef1.nCol,
rRef1.nRow,
rRef1.nTab,
rRef2.nCol,
rRef2.nRow,
rRef2.nTab ), this );
}
} }
}
break; break;
default: default:
; // nothing ; // nothing
......
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