Bug 161621 - Calc : Not repeating loop of data in a column with drag and drop
Summary: Calc : Not repeating loop of data in a column with drag and drop
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.4.2 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-17 17:16 UTC by renoub51@gmail.com
Modified: 2024-06-19 05:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
calc drag repeated loop failed (15.09 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-06-17 17:17 UTC, renoub51@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description renoub51@gmail.com 2024-06-17 17:16:55 UTC
Description:
let's have two columns :
* data 1 to 7 twice (14 datas)
* data A to G twice (14 datas)
select 14 datas from the column, drag :
* A to G is repeating -> ok
* 1 to 7 is not repeating next is starting with 2 goes to 8 twice and next goes from 3 to 9 twcie and so on. not possibilities to repeat the loop. 

Steps to Reproduce:
1.create 2 columns
2.column one data 1 to 7 twice (14 datas)
3.column two data A to G twice (14 datas)
4.select 14 datas in the column.
5.drag to the bottom.
6.A to G is repeating ok infinitly.
7.1 to 7 is not repeating1 to 7, but 2 to 8 twice, 3 to 9 twice...

Actual Results:
6.A to G is repeating ok infinitly.
7.1 to 7 is not repeating1 to 7, but 2 to 8 twice, 3 to 9 twice...

Expected Results:
6.A to G is repeating ok infinitly.
7.1 to 7 is repeating ok infinitly.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: fr-FR (fr_FR); UI: fr-FR
Calc: CL threaded
Comment 1 renoub51@gmail.com 2024-06-17 17:17:55 UTC
Created attachment 194784 [details]
calc drag repeated loop failed
Comment 2 ady 2024-06-18 15:02:11 UTC
While I can replicate the reported behavior with the "fill handle", I am not sure whether to qualify this as a bug, or a (strange?) consequence of an expected behavior. IOW, let me doubt that the "Expected Results" mentioned in comment 0 is correct; it might be the expected behavior by some users, but I am not sure what exactly _should_ be expected.

At any rate, the intended result can be achieved by the following procedure:

1. Open attachment 194784 [details].
2. Select the range A2:A8.
3. Press-and-hold the main button of the mouse on the "fill handle" (i.e. the bottom-right corner of the selected area).
4. Without releasing the button, drag the mouse down until the desired area is covered. For example, drag the mouse from the initial A2:A8 selection until the selection covers the range A2:A29.
5. Without releasing the mouse's button, press the [CTRL] key on the keyboard.
6. Now release the mouse's button, and then the [CTRL] key.

The original 1-7 values are repeated: A2:A8, A9:A15, A16:A22, A23:A29.

IOW, adding [CTRL] repeats the values, as expected.

Without [CTRL], the filling values should be increased progressively, but I am not sure how this progression should be implemented for this numeric case/example. If the current behavior (without [CTRL]) is really wrong/unexpected, then I guess we could open a new enhancement request in order to improve that behavior.

Additionally, there might also be some possible (independent) enhancement regarding the alphabet/string/text case. With [CTRL], the text repeats; without [CTRL], maybe the alphabet could continue-on, as if it was a known list. This would also be a new enhancement request.
Comment 3 Stéphane Guillou (stragu) 2024-06-19 05:12:47 UTC
Thank you both.

(In reply to ady from comment #2)
> IOW, adding [CTRL] repeats the values, as expected.
Yes, using Ctrl stops the autofill from auto-incrementing, see corresponding help page[1]. The default behaviour (without Ctrl) is to increment, which is why each number gets +1 every time you reach an extra 14 rows.

> Additionally, there might also be some possible (independent) enhancement
> regarding the alphabet/string/text case. With [CTRL], the text repeats;
> without [CTRL], maybe the alphabet could continue-on, as if it was a known
> list. This would also be a new enhancement request.
Yes, that's the reason there is an apparent discrepancy between the autofill of numbers and letters. Because there is no built-in alphabet sequence to use, autofill will only repeat letters and will never increment, regardless of Ctrl or not. A workaround is to add you own alphabet Sort List (see Tools > Options > LibreOffice Calc > Sort Lists).

An enhancement request exists: bug 65198.

So, in essence, this is "not a bug". If you don't want an increment in numeric values (or anything that matches a sort list), use Ctrl.
If you think autofill could be improved, see what existing requests there are and open a new ticket if needed: https://bugs.documentfoundation.org/showdependencytree.cgi?id=113499&hide_resolved=1
For example, you might find bug 130570 interesting (request to allow some configuration to this feature).

[1]: https://help.libreoffice.org/latest/lo/text/scalc/guide/calc_series.html