From a67906259a748b658daa6ee33f23a04755e21b66 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 11 Dec 2012 15:46:59 -0500 Subject: fdo#58149: Recalculate HYPERLINK formula cells on load. The current implementation of HYPERLINK relies on its result being 1x2 matrix while only the first element is displayed visibly. The second element stores the URL which is only used when querying for the URL (tooltip or launch URL event). Starting with 4.0 we load cached formula results to avoid full recalculation on load. That unfortuntely ended up breaking the HYPERLINK because the result was a simple string value rather than a matrix; hence the need to recalculate it on load. But unlike volatile formula cells, cells with HYPERLINK don't need to be recalculated on every cell input change; only once when the file is loaded. P.S. This commit also reverses the logic of bNoProgressBar flag for CalcFormulaTree(), to make it easier for human brain to process what it means. Change-Id: I7a24d96d225910b88071a8fe6320f59bf7a47163 --- formula/source/core/api/FormulaCompiler.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'formula') diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 2a48678cf581..29b66945c799 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -1069,7 +1069,10 @@ void FormulaCompiler::Factor() pArr->SetRecalcModeOnRefMove(); break; case ocHyperLink : - pArr->SetHyperLink(true); + // cell with hyperlink needs to be calculated on load to + // get its matrix result generated. + pArr->SetRecalcModeOnLoad(); + pArr->SetHyperLink(true); break; default: ; // nothing -- cgit