diff options
author | Eike Rathke <erack@redhat.com> | 2012-07-16 22:44:12 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:30 +0200 |
commit | a64fa6c7235559667afef1bb185203fd0d262e44 (patch) | |
tree | 07987203c00d571d7e881f5f33fc9723ba99a255 | |
parent | tubes: removed duplicated iterator initialization in ScViewFunc::EnterData() (diff) | |
download | core-a64fa6c7235559667afef1bb185203fd0d262e44.tar.gz core-a64fa6c7235559667afef1bb185203fd0d262e44.zip |
tubes: do the "interpret once" only if not API in ScDocFunc::PutCell()
Change-Id: Ib8bcb89b83f0fd98f1b01f72308d07af1f7777f9
-rw-r--r-- | sc/source/ui/docshell/docfunc.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index bfeb3f011b18..f22c599eef91 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -848,7 +848,11 @@ sal_Bool ScDocFunc::PutCell( const ScAddress& rPos, ScBaseCell* pNewCell, sal_Bo pDoc->PutCell( rPos, pNewCell ); - if ( !bXMLLoading && pNewCell->GetCellType() == CELLTYPE_FORMULA && !pDoc->GetAutoCalc() ) + // This "interpret once" block was moved from ScViewFunc::EnterData() where + // it was never executed from API, so don't do it here. For performance + // reasons API calls may disable calculation while operating and + // recalculate once when done. + if ( !bXMLLoading && !bApi && pNewCell->GetCellType() == CELLTYPE_FORMULA && !pDoc->GetAutoCalc() ) { ScFormulaCell *pFormCell = static_cast<ScFormulaCell *>( pNewCell ); // calculate just the cell once and set Dirty again |