Apache OpenOffice (AOO) Bugzilla – Issue 101273
Bad graph refreshing when pressing [F9]
Last modified: 2013-02-24 21:21:11 UTC
When pressing [F9], datas of Calc Sheet are refreshed but not the corresponding chart. I add that this wrong behavior didn't exist in previous versions.
Created attachment 61728 [details] In this .ods file it's possible to test the chart refeshing problem
I confirm the problem under Ubuntu 8.04 for OOo 3.1 RC1 : if you open the bugdoc with OOo 3.0.1 and press F9, data are modified and the chart is updated. With OOo 3.1 RC1 the chart is not updated. Regards JBF
@kohei, this regression was introduced by CWS koheiformula02. Please have a look.
Heh, interesting. Quite timely, I was just working on stuff that involves F9 update. Let's see what I'll find there.
Ok. The reason the chart was not being updated was because the data cache was not being rebuilt on F9 update. The reason the data cache was not rebuilt was because the cache was not emptied before BuildDataCache() was called (the method was being called as it should be). And, the reason why the cache was not emptied was because, when you hit F9, the values of the cells get updated on screen but ScChart2DataSequence::Notify() was not called to notify the data change within the data source range. Now, I'm trying to figure out why it's not notifying ScChart2DataSequence of data change like it should....
Ah, an F9 update is not considered to be modifying the document? No wonder the chart object is not notified of the value change.
Ok. I've found a reasonable way to fix this. I'll attach a proposed patch shortly.
Created attachment 61761 [details] propsed patch
The fix is to broadcast value change to UNO objects (which all chart objects are) when Calc does F9 re-calculation. BTW, I've also added one brace set where the braces were missing. I'm not sure if it was me who did that, or just an integration hiccup, but either way those braces in chart2uno.cxx should be there. @iha: is there an open CWS where you can commit this patch to?
@iha: if there is no open cws for this, then I can commit this to koheiformula03 for 3.2 integration. Let me know.
Is it possible to fixe this bug in OOo 3.1 ? As it is a regression we could consider this issue as stopper. An unfixed regression is always a bad user experience. Kind regards JBF
Kohei, DoHardRecalc (shift-ctrl-f9) must also be handled. I can take care of this next week.
@nn: ah, ok. So, the hard recalc is still being used, huh? Good to know. I was wondering about that. Thanks for taking care of this, Niklas.
jbfaure, there is an easy workaround (modify the document: instead of F9 press backspace on an empty cell), and charts from random data are not very common.
@ nn : yes I know that, but such kind of document is designed for education purpose and needs to be modified if one want used it with OOo 3.1. Basic users are not aware of this kind of subtilities.
taking the issue
It's fixed in CWS "calclinkfixes" (it was broken with a fix for links, so it kind of fits there).
reassigning to QA for verification
I'll attach a new bugdoc which crashes my OOo 3.1.0 on ubuntu 8.04 when I press F9. This doc is similar to the first one : chart with random data. Pressing ctrl+maj+F9 replays random function but does not refresh the chart. Does the patch work with this file ? Regards JBF
Created attachment 62333 [details] bugdoc with chart of random data which crashes OOo 3.1.0 when pressing F9
It works for me though. No crash here (on openSUSE). Do you have a stack trace on your crash? Not working with shift-ctrl-F9 is known; I didn't bother to fix that one because I thought it was going to be fixed in the upstream build for 3.1, which, as I just checked, is not the case unfortunately. But fixing that is super-trivial.
I don't have crash report. I refused to send it for the first crash and now OOo does not propose anymore to send a crash report. I found that the crash has something to do with Language Tool extension. If I remove it there is no crash. Regards JBF
taking the issue back for fixing in 3.1.1
Also fixed in CWS "calc311fixes", for 3.1.1.
verified in internal build cws_calc311fixes (OOo311) and verified in internal build cws_calclinkfixes (OOo32)
Verified in OOo3.1.1(OOo310m13) on WinXP Closing
*** Issue 103241 has been marked as a duplicate of this issue. ***