From 2045714acd0a8858ed7c1c60d42996bd00be4dac Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 15 Feb 2013 14:20:07 +0100 Subject: CELL needs to be recalculated during import as well, fdo#60645 (cherry picked from commit 9c55eab0309681991eae7382b682c26550786f56) use AddRecalcMode(RECALCMODE_ONLOAD), fdo#60645 related Instead of SetRecalcModeOnLoad() which sets the exclusive bit overriding RECALCMODE_ALWAYS use AddRecalcMode() that handles these cases. (cherry picked from commit ff319d052659974d1aa5d6ac8c468a7259a46cc4) ocColumn and ocRow do not need recalc on load, fdo#60645 related (cherry picked from commit 61c72ef4bebebdfa505176e7d5db82920ad3822e) Change-Id: I86e2d2c8156e50c14e4e9ae269e8b97e4560c68f Reviewed-on: https://gerrit.libreoffice.org/2168 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard --- formula/source/core/api/FormulaCompiler.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 8323e15acff4..468ecd321a68 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1066,18 +1066,22 @@ void FormulaCompiler::Factor() // If the referred cell is moved the value changes. case ocColumn : case ocRow : + pArr->SetRecalcModeOnRefMove(); + break; // ocCell needs recalc on move for some possible type values. + // and recalc mode on load, fdo#60646 case ocCell : pArr->SetRecalcModeOnRefMove(); + pArr->AddRecalcMode( RECALCMODE_ONLOAD ); break; case ocHyperLink : // cell with hyperlink needs to be calculated on load to // get its matrix result generated. - pArr->SetRecalcModeOnLoad(); + pArr->AddRecalcMode( RECALCMODE_ONLOAD ); pArr->SetHyperLink(true); break; case ocDde: - pArr->SetRecalcModeOnLoad(); + pArr->AddRecalcMode( RECALCMODE_ONLOAD ); break; default: ; // nothing -- cgit