Bug 93894 - calc doesn't handle well the column labels in a table with more than one line of data.
Summary: calc doesn't handle well the column labels in a table with more than one line...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.0.beta1
Hardware: All All
: medium major
Assignee: Kohei Yoshida
URL:
Whiteboard: target:5.3.0 target:5.2.4
Keywords: bibisected, bisected, regression
: 88963 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-09-03 15:06 UTC by Guilhem CRESPO
Modified: 2016-10-19 23:25 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Little table showing clearly the bug (9.53 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-09-03 15:06 UTC, Guilhem CRESPO
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Guilhem CRESPO 2015-09-03 15:06:58 UTC
Created attachment 118395 [details]
Little table showing clearly the bug

using column labels in a formula used to make the same calculation on several lines, the results on all the lines are the same as the first line.
Re-editing the formula on each line solve the problem... until the file is re-loaded.

(I'm not sure of the first release affected, it was before 4.4.5.2)
Comment 1 m_a_riosv 2015-09-03 21:38:31 UTC
Hi @Guilhem, thanks for reporting.

Reproducible, works without operations inside a function.
Also works defining the label range in Menu/Insert/Names/Labels

Last version working for me:
Win10x64
Versión: 4.3.7.2 Id. de compilación: 8a35821d8636a03b8bf4e15b48f59794652c68ba
Comment 2 Luca Paronuzzi 2015-10-28 08:03:49 UTC
Hello!
I'm also affected by this bug.
I had to downgrade to LibreOffice_4.2.8.2_Win_x86 to get the things working  againg.
I'm on Windows 7 home premium spk 1 (32bit).
Comment 3 Hans 2015-11-02 22:35:33 UTC
This is really annoying :(
Workaround: To get all formulas updated, use search and replace: Search for = and replace it with =.
In 5.0.2.2 (Ubuntu 64bit) the formulas keep their correct values even if I close and open the file again.
Comment 4 raal 2015-11-17 14:25:33 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Meeks ; Could you possibly take a look at this one?
Thanks

 e5da9f16777c5f1840c442ed6038eac20bba18b3 is the first bad commit
commit e5da9f16777c5f1840c442ed6038eac20bba18b3
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sat Mar 14 20:20:46 2015 +0800

    source-hash-4467c67dc8bf17c67c70985c0d0ea64636884f9f
    
    commit 4467c67dc8bf17c67c70985c0d0ea64636884f9f
    Author:     Michael Meeks <michael.meeks@collabora.com>
    AuthorDate: Wed May 28 00:06:20 2014 +0100
    Commit:     Michael Meeks <michael.meeks@collabora.com>
    CommitDate: Wed May 28 00:09:11 2014 +0100
    
        ODS load perf: accelerate CompileXML for formula by stringify and compare.
    
        For long columns of repeated formula, it is far faster to convert a formula
        to a string and compare to see if the next cell in a column matches, than
        it is to parse the formula string itself (sad but true).
    
        This saves 29s of 131s of load time for my (admittedly large) ODS file.
    
        Re-instate commit - with pCode now correctly intialized.
    
        Change-Id: Ib25840e7916c3e1c681c8100678770b7ab7222ab

/bibisect-44max$ git bisect log
# bad: [cf6ea17155fabb2a120ba07c150735591ac861d7] source-hash-3f94c9e9ddfd807b449f3bb9b232cf2041fa12d2
# good: [fc71ac001f16209654d15ef8c1c4018aa55769f5] source-hash-c15927f20d4727c3b8de68497b6949e72f9e6e9e
git bisect start 'latest' 'oldest'
# bad: [8cf60cc706948588e2f33a6d98b7c55d454e362a] source-hash-f340f0454627939f1830826fb5cc53a90e6c62a4
git bisect bad 8cf60cc706948588e2f33a6d98b7c55d454e362a
# bad: [d9885f526fc7a09cc8f9f8ee643af1b966be24bb] source-hash-d1465c64c6f64ad8dd25e40cdc69649b24b305ea
git bisect bad d9885f526fc7a09cc8f9f8ee643af1b966be24bb
# bad: [e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a] source-hash-dc9cc46f3223aff3f85d3ce9696178a5f4d3d087
git bisect bad e3eab511ffbcd2e1e2c67e7a4fec162bb0b26b7a
# good: [abcc1a4b07f3ef8bfeeed62b1902d8ba927e21d6] source-hash-aa48af57531851a16204381854f1ee19ebb63a6a
git bisect good abcc1a4b07f3ef8bfeeed62b1902d8ba927e21d6
# bad: [3549a67ccceae76cddec02ae0fd7356eeb6437ca] source-hash-ea15c9dc4da75fcd56e6b0dbce473b9e912fa4e2
git bisect bad 3549a67ccceae76cddec02ae0fd7356eeb6437ca
# bad: [b9edbe934e17d448d8ec7ec243f3b9b01dd40255] source-hash-db3c6265cf355f88e6a746db7df17f13d2ab5885
git bisect bad b9edbe934e17d448d8ec7ec243f3b9b01dd40255
# bad: [cd008ee457db6681dd407d958b18225a73014146] source-hash-461092aea109e798d349e7f2bb3e7665582b8e18
git bisect bad cd008ee457db6681dd407d958b18225a73014146
# good: [0a5725ec8a5437eb1d71f32ac0d472296051b4ec] source-hash-c26ba0d35e91bc16b2bede7de2466633ec240b51
git bisect good 0a5725ec8a5437eb1d71f32ac0d472296051b4ec
# bad: [cd1c4e97c6c6abfa405bd0df0208037a8e364e82] source-hash-a630c368f791a178e068fac542c00086ae594c2a
git bisect bad cd1c4e97c6c6abfa405bd0df0208037a8e364e82
# good: [846ebd935bea58d9ac66cfa92b347b5fccd7d062] source-hash-35078f372dfba02ccb09050a74a56d266148d4d8
git bisect good 846ebd935bea58d9ac66cfa92b347b5fccd7d062
# good: [6e7f0add4f3a8924baa19adf0f767aba56ab24df] source-hash-35a81048ca2c11d0a1092d8178e070127fd5711b
git bisect good 6e7f0add4f3a8924baa19adf0f767aba56ab24df
# bad: [e5da9f16777c5f1840c442ed6038eac20bba18b3] source-hash-4467c67dc8bf17c67c70985c0d0ea64636884f9f
git bisect bad e5da9f16777c5f1840c442ed6038eac20bba18b3
# good: [e88b6e527acb43f8eb09d98360caff7437d5bb72] source-hash-b3911e8adb34c6ee72577e58658b2cb72c6e79a3
git bisect good e88b6e527acb43f8eb09d98360caff7437d5bb72
# first bad commit: [e5da9f16777c5f1840c442ed6038eac20bba18b3] source-hash-4467c67dc8bf17c67c70985c0d0ea64636884f9f
Comment 5 m_a_riosv 2015-11-17 14:49:16 UTC
Maybe a duplicate of:
https://bugs.documentfoundation.org/show_bug.cgi?id=88963
Comment 6 Robinson Tryon (qubit) 2015-12-13 11:13:24 UTC Comment hidden (obsolete)
Comment 7 m_a_riosv 2016-03-29 23:50:52 UTC
*** Bug 98970 has been marked as a duplicate of this bug. ***
Comment 8 Bradley Sepos 2016-04-20 19:14:30 UTC
Is it possible to roll back the offending commit? It seems to be performance related only.
Comment 9 Commit Notification 2016-10-04 03:52:58 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7da2f3ce9f7b049c177a735a146dae84a764d3f7

tdf#93894: Get column labels to work with formula groups.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-10-04 03:53:45 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=958827673309a80a710a86a9b115945547f520a0

tdf#93894: Add unit test for this.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Michael Meeks 2016-10-04 09:24:48 UTC
Bradley - any chance of testing a recent master build hard that includes the fix ? then we can back-port to -5-2 and -5-1 for their next releases.

Thanks ! =)
Comment 12 Kohei Yoshida 2016-10-05 00:14:00 UTC
This fix also fixes Bug 88963 as well.
Comment 13 Michael Meeks 2016-10-05 08:14:36 UTC
*** Bug 88963 has been marked as a duplicate of this bug. ***
Comment 14 Kohei Yoshida 2016-10-11 21:24:15 UTC
I'll take this for now.

Backport request for 5.2 sent
https://gerrit.libreoffice.org/#/c/29717/
Comment 15 m_a_riosv 2016-10-11 22:43:42 UTC
Verified
Version: 5.3.0.0.alpha0+
Build ID: ed5ca17dce1d088ce3fbbb3a30f748ba92cd07d9
CPU Threads: 4; OS Version: Windows 6.19; UI Render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-10-09_05:40:51
Locale: es-ES (es_ES); Calc: CL
Comment 16 Kohei Yoshida 2016-10-12 00:44:03 UTC
Thanks for the verification.  I'll mark it fixed.
Comment 17 Bradley Sepos 2016-10-12 03:09:38 UTC
Apologies for my delay. Does master still need testing?
Comment 18 m_a_riosv 2016-10-12 10:06:46 UTC
Test are never enough so it's fine test it again. Please only report for a not already tested OS or if you find some issue.
Comment 19 Commit Notification 2016-10-13 05:24:54 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4d124e13abb7445f5b7f5f73556bc91ae867ab8&h=libreoffice-5-2

tdf#93894: Get column labels to work with formula groups.

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Kohei Yoshida 2016-10-17 21:24:04 UTC
I'm re-opening this, since it's been discovered that a use case where both column and row labels are used is not working.
Comment 21 Commit Notification 2016-10-19 00:29:32 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e944d9510404d8c67b3867d7cd9f313fd5091004

tdf#93894: Prohibit grouping when certain token types are present.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2016-10-19 00:29:38 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2b32042294a497f9e387348faf20fcdcb0c0fd7a

tdf#93894: These assumptions no longer hold.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2016-10-19 00:29:46 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=42062d99f171196778685e655e4edafd33ac159f

tdf#93894: Write a new test case for column and row labels combined.

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Kohei Yoshida 2016-10-19 00:37:12 UTC
Another backport request for 5.2 sent:

https://gerrit.libreoffice.org/#/c/30027/
Comment 25 Commit Notification 2016-10-19 23:22:03 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3789123da397c82109a5fcead3d49f803ba6aad&h=libreoffice-5-2

tdf#93894: Prohibit grouping when certain token types are present.

It will be available in 5.2.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Kohei Yoshida 2016-10-19 23:25:05 UTC
I'll mark this fixed again.