Bug 139681 - CALC AUTOFILL EDIT When the source cell range contents contain formulae, the existing pattern is applied inconsistently
Summary: CALC AUTOFILL EDIT When the source cell range contents contain formulae, the ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 157466 (view as bug list)
Depends on:
Blocks: AutoFill
  Show dependency treegraph
 
Reported: 2021-01-16 16:42 UTC by Colin
Modified: 2023-09-27 06:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple example spreadsheet (12.62 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-01-16 16:43 UTC, Colin
Details
second example spreadsheet demonstrating this bug (12.67 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-09-27 06:00 UTC, antifascist
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Colin 2021-01-16 16:42:39 UTC
Description:
When a predefined incremental pattern is used as a template with simple numbers it fills according to the template but if the predefined pattern is cell references then the autofill produces two patterns.
One pattern increments the first cell in the range + count of intervening cells to the first empty cell, the second pattern then increments the subsequent predefined values to the following relative number of empty cells also incremented by three. The pattern persists and cells are auto-filled in blocks of three.
I imagine the "offset" is consistently defined by the number of "filled" cells in the selection.

Steps to Reproduce:
Sample sheet attached.
Column A has been auto-filled from 1 - 70 to identify the target "count" for the formulae in Column C.
Initially, columns C & D only had the first three rows manually entered
Column C: observe the formulae in the first three rows increment the preceding cell by 8 rows
Column D observe the numbers in the first three rows increment the preceding cell by 8
Observe the subsequent formulae and values in cells C9 to D14
The auto-fill was the result of selecting the range C6:D8 and auto-filling down to D14.
To recreate, either erase C9:D14 or simply reselect C6:D8 and autofill to D14 overwriting the existing entries.
Observe column D correctly increments by 8
Observe the formulae in column C where all the cells are incremented by three RELATIVE to the original source cells.
I'm convinced the rationale for following the predefined pattern is far more logical than an inconsistency that will vary depending upon the number of filled cells encountered before the available target range.
Obviously, there's no problem when a single cell is replicated by auto-fill as it logically increments by one.

Actual Results:
Formulae cells are not incremented according to the selected "template" cells

Expected Results:
Formulae incremented according to the selected "template" cells.



Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: no
Comment 1 Colin 2021-01-16 16:43:11 UTC
Created attachment 168939 [details]
Simple example spreadsheet
Comment 2 b. 2021-04-05 07:45:05 UTC
confirmed, ver. 6.1.6.3, number series apply the step factor to the drag expansion producing a continuous filed, while formula series start with the same relative relation as the source block and produce a series of formula blocks
Comment 3 QA Administrators 2023-04-07 03:27:46 UTC Comment hidden (obsolete)
Comment 4 Colin 2023-04-07 06:16:44 UTC
Version: 7.4.6.2 (x64) / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded

Still a bug
Comment 5 antifascist 2023-09-27 06:00:01 UTC
Created attachment 189843 [details]
second example spreadsheet demonstrating this bug

second example spreadsheet demonstrating this bug
Comment 6 antifascist 2023-09-27 06:01:10 UTC
I accidentally added a duplicate of this bug as bug 157466 - autofill of ascending references fails with non-sequential cell references.

In case my different wording of this bug is helpful, here it is, copied from my duplicate bug:

Description:
Working example, followed by non-working example:

Autofill function works correctly with sequential ascending cell references.
Example:
Create spreadsheet as follows:
A1: meow
A2: woof
A3: cluck
A4: moo
A5: bark

B1: =A1
B2: =A2

You may now select B1 and B2, and then you may drag the the fill handle in the bottom right corner of the selection across the cells B3, B4, and B5, and release the mouse button.

Result:  The cells B3, B4, and B5 will auto-fill correctly, showing values of "cluck", "moo", and "bark" respectively.  Column B now contains these cell references:

B1: =A1
B2: =A2
B3: =A3
B4: =A4
B5: =A5

Autofill of ascending references fails with non-sequential cell references.
Example:
Creat spreadsheet as follows:

A1: cat says
A2: meow
A3: dog says
A4: woof
A5: chicken says
A6: cluck
A7: cow says 
A8: moo
A9: dog says
A10: bark

B1: =A2
B2: =A4

You may now select B1 and B2, and then you may drag the the fill handle in the bottom right corner of the selection across the cells B3, B4, and B5, and release the mouse button.

Result:  The cells B3, B4, and B5 will auto-fill incorrectly, showing values of "woof", "cluck", and "cluck" respectively.  Column B now contains these cell references:

B1: =A2
B2: =A4
B3: =A4
B4: =A6
B5: =A6

The expected behavior would have been for column B to instead contain these cell references:

B1: =A2
B2: =A4
B3: =A6
B4: =A8
B5: =A10
Comment 7 antifascist 2023-09-27 06:05:51 UTC
*** Bug 157466 has been marked as a duplicate of this bug. ***