diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-24 00:32:41 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-01-24 00:48:02 +0100 |
commit | ae516fabd96a948b62c4d3a522555fc955750c3e (patch) | |
tree | 940342f47524f646f0ed7a3f2bc3efab487e2707 /sc/source/core/data/cell.cxx | |
parent | c3ea61ab29648bf93b3b4f809c7e98c40c1113f8 (diff) |
import inherited number formats with cached values, fdo#59724
Change-Id: I698f60daf4e591b57d8d99c130d2e524dc10c306
Diffstat (limited to 'sc/source/core/data/cell.cxx')
-rw-r--r-- | sc/source/core/data/cell.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index ce073e2e29eb..2b0366c2f543 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -988,7 +988,7 @@ void ScFormulaCell::Compile( const rtl::OUString& rFormula, bool bNoListening, delete pCodeOld; if( !pCode->GetCodeError() ) { - if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() && rFormula == rtl::OUString(aResult.GetHybridFormula()) ) + if ( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() && rFormula == aResult.GetHybridFormula() ) { // not recursive CompileTokenArray/Compile/CompileTokenArray if ( rFormula[0] == '=' ) pCode->AddBad( rFormula.copy(1) ); @@ -1012,7 +1012,7 @@ void ScFormulaCell::Compile( const rtl::OUString& rFormula, bool bNoListening, void ScFormulaCell::CompileTokenArray( bool bNoListening ) { // Not already compiled? - if( !pCode->GetLen() && aResult.GetHybridFormula().Len() ) + if( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() ) Compile( aResult.GetHybridFormula(), bNoListening, eTempGrammar); else if( bCompile && !pDocument->IsClipOrUndo() && !pCode->GetCodeError() ) { @@ -1120,7 +1120,7 @@ void ScFormulaCell::CalcAfterLoad() { bool bNewCompiled = false; // If a Calc 1.0-doc is read, we have a result, but no token array - if( !pCode->GetLen() && aResult.GetHybridFormula().Len() ) + if( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() ) { Compile( aResult.GetHybridFormula(), true, eTempGrammar); aResult.SetToken( NULL); @@ -1469,7 +1469,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) // This should only be a temporary condition and, since we set an // error, if ran into it again we'd bump into the dirty-clearing // condition further down. - if ( !pCode->GetLen() && aResult.GetHybridFormula().Len() ) + if ( !pCode->GetLen() && !aResult.GetHybridFormula().isEmpty() ) { pCode->SetCodeError( errNoCode ); // This is worth an assertion; if encountered in daily work |