Kaydet (Commit) 0792aef9 authored tarafından Eike Rathke's avatar Eike Rathke

fdo#83067 also volatile cells need to listen to all references

As we now broadcast also cell moves it is not sufficient anymore to add
volatile cells only to the BCA_LISTEN_ALWAYS broadcaster, add them as
listener to all referenced cells and ranges as usual.

Change-Id: I7901b73db7e0c82c4bac302ae746810cbc16ea44
üst bc16ad7c
...@@ -1854,7 +1854,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) ...@@ -1854,7 +1854,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam )
if (pCode->IsRecalcModeAlways()) if (pCode->IsRecalcModeAlways())
{ {
// The formula was previously volatile, but no more. // The formula was previously volatile, but no more.
EndListeningTo(pDocument); pDocument->EndListeningArea(BCA_LISTEN_ALWAYS, this);
pCode->SetExclusiveRecalcModeNormal(); pCode->SetExclusiveRecalcModeNormal();
} }
else else
...@@ -3786,8 +3786,6 @@ void ScFormulaCell::StartListeningTo( ScDocument* pDoc ) ...@@ -3786,8 +3786,6 @@ void ScFormulaCell::StartListeningTo( ScDocument* pDoc )
if( pArr->IsRecalcModeAlways() ) if( pArr->IsRecalcModeAlways() )
{ {
pDoc->StartListeningArea(BCA_LISTEN_ALWAYS, this); pDoc->StartListeningArea(BCA_LISTEN_ALWAYS, this);
SetNeedsListening( false);
return;
} }
pArr->Reset(); pArr->Reset();
...@@ -3826,8 +3824,6 @@ void ScFormulaCell::StartListeningTo( sc::StartListeningContext& rCxt ) ...@@ -3826,8 +3824,6 @@ void ScFormulaCell::StartListeningTo( sc::StartListeningContext& rCxt )
if( pArr->IsRecalcModeAlways() ) if( pArr->IsRecalcModeAlways() )
{ {
rDoc.StartListeningArea(BCA_LISTEN_ALWAYS, this); rDoc.StartListeningArea(BCA_LISTEN_ALWAYS, this);
SetNeedsListening( false);
return;
} }
pArr->Reset(); pArr->Reset();
...@@ -3893,7 +3889,6 @@ void ScFormulaCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr, ...@@ -3893,7 +3889,6 @@ void ScFormulaCell::EndListeningTo( ScDocument* pDoc, ScTokenArray* pArr,
if ( GetCode()->IsRecalcModeAlways() ) if ( GetCode()->IsRecalcModeAlways() )
{ {
pDoc->EndListeningArea( BCA_LISTEN_ALWAYS, this ); pDoc->EndListeningArea( BCA_LISTEN_ALWAYS, this );
return;
} }
if (!pArr) if (!pArr)
...@@ -3939,7 +3934,6 @@ void ScFormulaCell::EndListeningTo( sc::EndListeningContext& rCxt ) ...@@ -3939,7 +3934,6 @@ void ScFormulaCell::EndListeningTo( sc::EndListeningContext& rCxt )
if (pArr->IsRecalcModeAlways()) if (pArr->IsRecalcModeAlways())
{ {
rDoc.EndListeningArea(BCA_LISTEN_ALWAYS, this); rDoc.EndListeningArea(BCA_LISTEN_ALWAYS, this);
return;
} }
pArr->Reset(); pArr->Reset();
......
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