Bug 89402 - EDITING: Column/Rows label are not updating when inserting a row/column, needs save and reload the file.
Summary: EDITING: Column/Rows label are not updating when inserting a row/column, need...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.0.beta1
Hardware: All All
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2015-02-15 23:46 UTC by m_a_riosv
Modified: 2015-12-15 11:03 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file to test the issue. (9.88 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-02-15 23:46 UTC, m_a_riosv
Details
Calc document: Concise demonstration (14.70 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-02-16 01:50 UTC, Wolfgang Jäger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m_a_riosv 2015-02-15 23:46:00 UTC
Created attachment 113411 [details]
Sample file to test the issue.

When a row/column is inserted in the scope of a Column/Row label, formulas using it are not update.
Hard recalc doesn't work.
Save and reload solves the issue.

Steps:
- Open attached file.
- Goto A8.
- Insert a row.
- Enter a value in the new blank cell.
The formula with label now in A9 it's not update.
Save and reload the file, reopening without close the file doesn't.
Value for A9 is updated.

First version with the issue:
Versión: 4.2.0.0.beta1 Id.: f4ca7b35f580827ad2c69ea6d29f7c9b48ebbac7


With:
Version: 4.2.8.0.0+ Build ID: 1fc1d0d7d38bb16832d0d78d78682ed2d5f8716f
  TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2015-01-08_03:10:08
Only happens inserting in the same row where the formula is.

Last version working fine:
Version: 4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
Comment 1 Joel Madero 2015-02-16 00:14:09 UTC
Cannot reproduce:
Ubuntu 14.10
LibreOffice 4.4.0.3 release

Inserted a row, put in a new number in A8, A11 (which has the formula =SUM('Asome')), updates without any savings/closing/etc...
Comment 2 Wolfgang Jäger 2015-02-16 01:50:32 UTC
Created attachment 113416 [details]
Calc document: Concise demonstration
Comment 3 Wolfgang Jäger 2015-02-16 01:51:51 UTC
Tested with V 4.4.0.3 on Windows 8.1 here

The bug was discussed under a different aspect in http://en.libreofficeforum.org/node/10277. 

There was first disclosed an issue with the specification under http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.pdf#page=47&zoom=auto,129.6,606.8 . 

In compliance with this specification the formula did not include the content of the adjacent cell above it after insertion of a row immediately above the formula and entering a number into the new empty cell of the same column. After save/reload or after minimal editing of the formula without changing it the new addend was included. This is not clearly a bug but in any case a flaw of the specification. Behaviour unchanged insofar since StarOffice 5.2. ( I did, of course not check with all the versions since.) "Recalculation of the formula containing an automatic range not triggered by the insertion of a row."

NOT in compliance with the specification is the observation of @m.a.riosv that insertion of a row breaking up the range already added and entering a number into the gap created will recalculate the sum - but now exluding the addend immediately above the formula. 

See attached for more detail.

Please try again! It should not be likely that this is restricted to the Win build.
Comment 4 Joel Madero 2015-02-16 02:24:44 UTC
Indeed - verified with the additional information. Let's try to bibisect this one.

Ubuntu 14.10
LibreOffice 4.4.0.3 release
Comment 5 Matthew Francis 2015-02-20 03:26:58 UTC
The first issue demonstrated in attachment 113416 [details] is inherited from OOo (it's already present in OOo 3.3.0)

The second one started here in bibisect 43all:
# first bad commit: [ba096f438393091574da98fe7b8e6b05182a8971] source-hash-8499e78ca03c792f4fa2650e02b519094ba0baa8

It contains a long series of patches by Kohei about range references that looks relevant. Bug 81659 is from the same series but probably not exactly the same issue.

Not sure if it's worth splitting these two into separate bugs. Possibly the latter change has ended up making the second case "bug compatible" with the first, and there is only one current issue?
Comment 6 Matthew Francis 2015-02-20 05:34:29 UTC
The specific commit seems to have been this one (although it may not be that relevant given the surrounding work)

commit 932c5679353819b30a1671831d1f591e48df73f0
Author: Kohei Yoshida <kohei.yoshida@gmail.com>
Date:   Tue Jul 16 23:31:51 2013 -0400

    More on removing CalcAbsIfRel().
    
    One test fails. I'll look into that next.
    
    Change-Id: I4a40104187a73953769740fd47d7a917c83bf337
Comment 7 Wolfgang Jäger 2015-02-20 09:18:16 UTC
From comment 5 (Matthew Francis): "The first issue demonstrated in attachment 113416 [details] is inherited from OOo (it's already present in OOo 3.3.0)"

This behaviour (first issue) was already as described in StarOffice 5.2. I also tested OOo 3.2.0 with the same result.

The issue should be caused by not triggering a complete update of automatic ranges on insertion of rows/columns peripheral to an existing automatic range. While the concept of automatic ranges may be doubtable from the beginning, it must, if introduced at all, be implemented putting reliability over efficiency.
Comment 8 m_a_riosv 2015-08-15 15:54:51 UTC
Remains with:

Version: 4.4.5.2 Build ID: a22f674fd25a3b6f45bdebf25400ed2adff0ff99

But seems solved in:
Version: 4.4.6.0.0+ Build ID: 57e6d5e978e0a70aa036f19bd3328a71dd3a587f
 TinderBox: Win-x86@51-TDF, Branch:libreoffice-4-4, Time: 2015-07-31_00:32:33

Version: 5.0.1.1 (x64) Build ID: 13f702ca819ea5b9f8605782c852d5bb513b3891
Comment 9 Robinson Tryon (qubit) 2015-12-15 11:03:19 UTC
Migrating Whiteboard tags to Keywords: (bibisected)
[NinjaEdit]