https://bugs.freedesktop.org/show_bug.cgi?id=60964

          Priority: medium
            Bug ID: 60964
          Assignee: [email protected]
           Summary: Recalculation on load: Behavior problematic to certain
                    sheets
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.0.0.3 release
         Component: Spreadsheet
           Product: LibreOffice

LibreOffice 4.0.0.3 (platform independent, but tested with the Mac OS X
version) offers a setting at Preferences->LibreOffice Calc->Formula called
"Recalculation on file load".

The default setup is "Never recalculate" (tested on Mac OS X). However,
LibreOffice 3 and OpenOffice behave by default as "Always recalculate" would
do.

To have LibreOffice set to "Never recalculate" will render many sheets useless
or in inconsistent state.

The problem is that in this mode, LibreOffice will use cached values of cells
and will not recalculate the entire sheet. Assume that cell A1 refers to B1 and
C1 and B1 is changed by the user. Then A1 is recalculated using a cached value
of C1. This is problem if C1 contains some macro and the spreadsheet relies on
the fact the at least C1 is called once to initialize something (e.g. something
needed when calculating A1).

While it is OK to rely on cached values during operation of a sheet (is is
natural to only recalculate cells depending on changed cells) many professional
spreadsheets reply on the fact that the sheet is recalculated completely at
least once.

For example: I use the plugin Obba ( http://www.obba.info ) to use external
Java libraires in cell functions. Here it is crucial that those plugin
functions get called at least once. (Note: this is not a problem of an
incorrect cell dependance / dependency tree). Excample: Cell C1 contains the
macro to create an object in the external module and returns a reference to is,
cell A1 consumes the handle in C1 and a value in B1. In the new LibreOffice the
macro in C1 is never executed and hence the external module is not initialized
correctly.

There are a couple of workarounds:
- All such macros and add-in functions have to be marked as Volatile: This is
not a easy step to do, since UNO XVolatileResult is a complex beast and also
requires an additional caching of results.
- The user is advised to change the setting manually to "Always recalculate".
This is a problem, since many user will not realize that this is the reason why
there sheet remains corrupted.
- All sheets are equipped with an "OnLoad" Macro which performs a recalculation
(I have yet to find out how to do it).

I believe it would be best to set the default of LibreOffice to "Always
recalculate" - at least for sheet which have "Auto Calculation" enabled. Please
consider this! Currently most of my sheets from http://www.finmath.net which I
provide for Excel and OpenOffice/LibreOffice will not work with LibreOffice 4
because of this issue (they work fine with OpenOffice 3, LibreOffice 3, Excel,
etc).

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to