Bug 100297 - API, Calc sheets, Inconsistency concerning changes of cell properties by a user function.
Summary: API, Calc sheets, Inconsistency concerning changes of cell properties by a us...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected) release
Hardware: All All
: low normal
Assignee: Not Assigned
Depends on:
Blocks: Macro
  Show dependency treegraph
Reported: 2016-06-09 17:40 UTC by Wolfgang Jäger
Modified: 2021-04-22 03:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:

Demonstration of the problems; Code included (21.28 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-06-09 17:40 UTC, Wolfgang Jäger

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Jäger 2016-06-09 17:40:27 UTC
Created attachment 125577 [details]
Demonstration of the problems; Code included

Predecessors of LibO Calc did not allow any changes of the content of a cell by a function called from a formula contained in a cell of the same sheet. AOO 4.1.2 still is regarding this restriction (as I tested). 

LibO relieved this restriction substantially. From my recent tests I found that changes of all the relevant properties as there are 
- Value
- String
- Formula
for cells in the same sheet as the call of the function whose body is performing the changes are allowed. 
This with one exception: Setting the Formula property to "" (empty string) which should make the cell BLANK (answer TRUE if asked ISBLANK) does not cause an error, but is not performed. It only works for cells in different sheets. 

If the content of a cell in a different sheet is changed by the body of a function called from a cell not in the active sheet, the recalculation of a cell in the active sheet referencing the changed cell, is not correctly triggered. 

Generally the behaviour of cells is inconsistent with respect to changes of contents by the bodies of user functions via the API. 

The alternatives I see are to either suppress changes of cells by function bodies completely, or to thoroughly remove any inconsistencies. 

See attached example.
Comment 1 Buovjaga 2016-10-12 11:19:01 UTC
Tentatively setting to NEW and CC'ing Eike.
Comment 2 Wolfgang Jäger 2017-09-30 19:15:07 UTC
It is still unclear which properties of cells allow chagnes by SIDE-EFFECTs of user functions called during the evaluation of a formula IN THE SAME SHEET. 

The classical restriction was (and still is in AOO) that no changes at all are allowed. 

LibreOffice since V5.1 (at least) loosened this restriction: 
.Formula e.g.
accept assignments, .Formula with the exception of new content "".

Other properties, in specific those containing hard attributes and the 
property refuse to accept an assignment. 

Above statements are made after testing with V5.4.1 and V5.4.2 today.

Is there any specification concerning this?
Comment 3 QA Administrators 2018-10-01 02:52:27 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2021-04-22 03:54:36 UTC
Dear Wolfgang Jäger,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team