Bug 116215 - Sum button: Calc adds wrong sum formulas if you select more than one row or column
Summary: Sum button: Calc adds wrong sum formulas if you select more than one row or c...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:6.1.0 target:6.0.3 target:5.4.7
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Function-Sum
  Show dependency treegraph
 
Reported: 2018-03-05 19:49 UTC by Alois Klotz
Modified: 2018-05-12 21:24 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
shows the wrong sum formulas (17.01 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-03-05 19:55 UTC, Alois Klotz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alois Klotz 2018-03-05 19:49:43 UTC
Description:
Select more than one row or column and then press the sum button.
Calc inserts wrong formulas.

Steps to Reproduce:
1.produce a table with e.g. 4 cells from A1 to B2 - each with the value 1
2.select the 4 cells
3.press the sum button

Actual Results:  
the produced formulas are wrong:
formula in A3 is correct: =SUMME(A1:A2)
formula in B3 is wrong: =SUMME(A1:A2;B1:B2)

Expected Results:
the formular should be the sum of the column above.


Reproducible: Always


User Profile Reset: Yes



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Comment 1 Alois Klotz 2018-03-05 19:55:01 UTC
Created attachment 140365 [details]
shows the wrong sum formulas
Comment 2 Gilward Kukel 2018-03-06 00:58:51 UTC
You get the desired result when you select A3:B3 and press the sum button.
Comment 3 Kevin Suo 2018-03-06 02:09:39 UTC
Do not reproduce in linux

Version: 6.0.2.1
Build ID:f7f06a8f319e4b62f9bc5095aa112a65d2f3ac89
CPU 线程:4; 操作系统:Linux 4.15; UI 渲染:默认; VCL: gtk2; 
区域语言:zh-CN (zh_CN.UTF-8); Calc: group threaded [or not threaded]

Fedora 27
Comment 4 Alois Klotz 2018-03-06 07:11:59 UTC
Tested also with Linux Mint and LO 5.4.3.2 - wrong formulas
ok in LO 5.3.4.2 under Windows 10
Comment 5 Alois Klotz 2018-03-06 07:17:50 UTC
(In reply to Gilward Kukel from comment #2)
> You get the desired result when you select A3:B3 and press the sum button.

Thank you for your comment!
But LO changed his behavior since (i think) 5.4.3.2
In older versions e.g. 5.3.4.2 it works ok if you select A1:C3
Comment 6 Xavier Van Wijmeersch 2018-03-06 09:07:41 UTC
can reproduce with

Version: 5.4.4.2
Build ID: 2524958677847fb3bb44820e40380acbe820f960
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group

Version: 5.4.7.0.0+
Build ID: 506d4cbc2f0dbef6f20f1199efcda805c9901d09
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.0.3.0.0+
Build ID: bab7cef648025038055d3284773d33f102d42f13
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.1.0.0.alpha0+
Build ID: ab63510e104c4b8e42982390357af1281c4b11a7
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-03-05_01:01:02
Locale: nl-BE (en_US.UTF-8); Calc: group

but not with

Version: 5.3.8.0.0+
Build ID: 7f1297d9b4f449eb9ada8008fb21b7046d1a8f19
CPU Threads: 8; OS Version: Linux 4.14; UI Render: default; VCL: kde4; Layout Engine: new; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-3, Time: 2017-11-10_15:56:34
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 7 Xisco Faulí 2018-03-06 14:30:21 UTC
Regression introduced by:

author	Eike Rathke <erack@redhat.com>	2017-06-16 17:08:09 +0200
committer	Eike Rathke <erack@redhat.com>	2017-06-16 17:08:40 +0200
commit	f83d8ae84584c0967e2346566d21d65d6d7a432f (patch)
tree	8400adf638519e4444628cdb7bc26ea5a281bcb8
parent	3f405b1af38b810a6ae1089138637d7947ce4f82 (diff)
For AutoSum up to next sum mark/select the resulting range, tdf#71339

Bisected with: bibisect-linux64-6.0

Adding Cc: to Eike Rathke
Comment 8 Commit Notification 2018-03-06 18:00:18 UTC Comment hidden (obsolete)
Comment 9 Eike Rathke 2018-03-06 18:04:21 UTC Comment hidden (obsolete)
Comment 10 Eike Rathke 2018-03-06 18:50:13 UTC
Taking.
Comment 11 Commit Notification 2018-03-06 20:28:10 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

It will be available in 6.1.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 12 Eike Rathke 2018-03-06 21:05:01 UTC
Pending review
https://gerrit.libreoffice.org/50845 for 6-0
https://gerrit.libreoffice.org/50846 for 5-4
Comment 13 Xavier Van Wijmeersch 2018-03-07 11:15:03 UTC
tested and its working

Version: 6.1.0.0.alpha0+
Build ID: a790ee54319583897d82d4372243df870d4452a6
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group
Comment 14 Commit Notification 2018-03-21 11:33:15 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f504da556cb091db0ad7c47f1bb90220d890c66&h=libreoffice-6-0

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

It will be available in 6.0.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 15 Commit Notification 2018-03-21 11:34:49 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

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

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

It will be available in 5.4.7.

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 16 Commit Notification 2018-03-28 21:49:14 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

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

uitests for bugs tdf#71339 tdf#116215 tdf#116421

It will be available in 6.1.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 17 Commit Notification 2018-03-28 21:53:22 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-6-0-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5116f74a2fdf8f444cf60f88db042f4b87c25748&h=libreoffice-6-0-3

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

It will be available in 6.0.3.

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 18 Gerhard Weydt 2018-05-12 21:24:24 UTC
Verified in

Version: 6.0.3.2
Build-ID: 8f48d515416608e3a835360314dac7e47fd0b821
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

and
Version: 6.0.4.1
Build-ID: a63363f6506b8bdc5222481ce79ef33b2d13c741
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group

Setting status to VERIFIED.