diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-21 11:54:18 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-24 16:51:39 -0400 |
commit | 5f188d659e8601e577f3a837c9dd3459761371ac (patch) | |
tree | 7a301014e6af6439976c33a25b5ecf19f00ac0aa /sc | |
parent | 7a522da4f3946006fd325d498845225b8a8836f2 (diff) |
Avoid having formula cell directly update text attributes.
This would cause column cell and text attribute arrays to go out of
sync, because the formula cells may be stored and interpreted in places
such as change track and conditional formatting.
We still need to find a good way to mark text attributes "obsolete" when
formula cells are re-calculated.
Change-Id: Ida612806d3afec23c5ae501f2fc8cc7d52e019a8
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/formulacell.cxx | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx index 6724d2ec4c27..68d242dc485c 100644 --- a/sc/source/core/data/formulacell.cxx +++ b/sc/source/core/data/formulacell.cxx @@ -728,11 +728,8 @@ void ScFormulaCell::Compile( const OUString& rFormula, bool bNoListening, CompileTokenArray( bNoListening ); } else - { bChanged = true; - pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); - pDocument->SetScriptType(aPos, SC_SCRIPTTYPE_UNKNOWN); - } + if ( bWasInFormulaTree ) pDocument->PutInFormulaTree( this ); } @@ -820,11 +817,7 @@ void ScFormulaCell::CompileXML( ScProgress& rProgress ) pDocument->AddSubTotalCell(this); } else - { bChanged = true; - pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); - pDocument->SetScriptType(aPos, SC_SCRIPTTYPE_UNKNOWN); - } // Same as in Load: after loading, it must be known if ocMacro is in any formula // (for macro warning, CompileXML is called at the end of loading XML file) @@ -1093,8 +1086,6 @@ void ScFormulaCell::Interpret() pIterCell->bTableOpDirty = false; pIterCell->aResult.SetResultError( errNoConvergence); pIterCell->bChanged = true; - pDocument->SetTextWidth(pIterCell->aPos, TEXTWIDTH_DIRTY); - pDocument->SetScriptType(pIterCell->aPos, SC_SCRIPTTYPE_UNKNOWN); } } // End this iteration and remove entries. @@ -1389,11 +1380,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) aResult.SetResultError( nErr); bChanged = bContentChanged = true; } - if( bChanged ) - { - pDocument->SetTextWidth(aPos, TEXTWIDTH_DIRTY); - pDocument->SetScriptType(aPos, SC_SCRIPTTYPE_UNKNOWN); - } + if (bContentChanged && pDocument->IsStreamValid(aPos.Tab())) { // pass bIgnoreLock=true, because even if called from pending row height update, |