Bug 89998 - Fill series should be the minimal increment for the given value, rather than always be added by 1
Summary: Fill series should be the minimal increment for the given value, rather than ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Martin van Zijl
URL:
Whiteboard: target:6.3.0 target:7.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-14 03:20 UTC by Kevin Suo
Modified: 2021-08-08 01:38 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Video demo of patch. (190.66 KB, image/gif)
2019-01-09 20:55 UTC, Martin van Zijl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2015-03-14 03:20:35 UTC
Steps to reproduce:
1. A1=1%;
2. Drag the "+" handle at the bottom-right corner of A1, to fill series down side.

Current Behaviour:
1%, 101%, 201%, 301%, 401%....

Expected Behabiour:
1%, 2%, 3%, 4%...

This is an enhancement request.

Version: 4.4.2.1
Build ID: 93fc8832889bf050a10ec6d0171dae213adc9b55
Locale: zh_CN
Win7 X86
Comment 1 A (Andy) 2015-03-14 07:32:36 UTC
Reproducible with LO 4.4.1.2, Win 8.1

This enhancement request sounds reasonable for me.  I don't see why it would be good to add always 100% by default.
Comment 2 A (Andy) 2015-03-14 07:44:16 UTC
I thought a litte bit more about it and maybe the reason why it works currently that way is the following:

If you have in A1 = 1
then you will get 1; 2; 3; 4 ...

If you have in A1 = 0.01
then you will get 0.01; 1.01; 2.01; 3.01 ...
-> +1 is always added

and because 1% can also be written as 0.01 it is probably currently extended that way with +1 (each time) which can also be written as +100%, but for 1% I personally would prefer the expected behaviour suggested by Kevin (equivalent to 1; 2; 3; 4 ...)
Comment 3 m_a_riosv 2015-03-14 15:06:32 UTC
We have two ways:

1) Menu/Edit/Fill/Series, and set up the increment option properly.

2) With A1: =1% and A2: =2%, selecting both at the same time and drag, works properly, LibreOffice knows what increment use.
Comment 4 Kevin Suo 2015-03-14 15:42:18 UTC
I am aware that Calc is smart, but I am requesting to make it much smarter:
When A1=1 then fill down, it should know that we expect 1, 2, 3, 4...
When A1=0.1 then fill down, it should know that we expect 0.1, 0.2, 0.3, 0.4...
When A1=1% then fill down, it should know that we expect 1%, 2%, 3%, 4%...
(The last digit should be detected and incremented accordingly, rather than always increment by 1)

Also, when A1 is like "I have 2 cats" then the fill down should be also "I have 2 cats" (copy rather than incremental, because it's text not number)
Comment 5 m_a_riosv 2015-03-14 16:57:43 UTC
The pattern of what you like seems to be that the increment must be the minimal increment for the given value.

If so, maybe a clearer title could help to get the improvement.
Comment 6 Kevin Suo 2015-03-15 05:22:39 UTC
(In reply to m.a.riosv from comment #5)
Title has been revised.
Comment 7 Martin van Zijl 2019-01-09 20:55:42 UTC
Created attachment 148184 [details]
Video demo of patch.
Comment 8 Martin van Zijl 2019-01-09 21:00:03 UTC
I have create a patch for percentage values, i.e.:

1%, 2%, 3%, 4%...

I attached a video demo above. I hope to discuss it with the design team and submit my code for review later today.

NOTE: This does not affect other numeric values such as 0.01. I may look at that later.
Comment 9 Commit Notification 2019-01-29 17:32:43 UTC
Martin van Zijl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3931e7c05d38ee7805e2f7898d92a44c037900b5%5E%21

tdf#89998 set increment for percent values to 1%

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2021-03-16 10:02:29 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d2392723e1db63e31aa31fb4531a368b349fcd88

tdf#89998: sc_ucalc: Add unittest

It will be available in 7.2.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Stéphane Guillou (stragu) 2021-08-08 01:38:19 UTC
verified as fixed in:

Version: 7.2.0.2 / LibreOffice Community
Build ID: 614be4f5c67816389257027dc5e56c801a547089
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded