summaryrefslogtreecommitdiff
path: root/formula
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-12-11 15:46:59 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-12-11 15:57:10 -0500
commitbe1b35346d2870033b1156ee1e307bcf66d0fd23 (patch)
treee55ca836951341742f85f421a1b04b750b797932 /formula
parent71b4551ab80bd4f420b6284379bb9174fc93382c (diff)
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
Diffstat (limited to 'formula')
-rw-r--r--formula/source/core/api/FormulaCompiler.cxx5
1 files changed, 4 insertions, 1 deletions
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