Bug 90797 - EDITING: Copy/paste and fill down of array formulae breaks if destination >1 column/row
Summary: EDITING: Copy/paste and fill down of array formulae breaks if destination >1 ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-23 00:25 UTC by Chris McKenna
Modified: 2015-04-25 14:36 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Extract from spreadsheet where bug was discovered (22.87 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-04-23 11:21 UTC, Chris McKenna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris McKenna 2015-04-23 00:25:52 UTC

    
Comment 1 Chris McKenna 2015-04-23 00:36:09 UTC
When using copy/paste or fill down to populate two or more rows or columns with array formulae, the filled/destination formulae are all non-array formulae (and thus usually invalid).

Steps to reproduce:
1. Create a spreadsheet with at least one array formula. Use cell C3 for this example, in reality the location is unimportant.
2. Select cells C3 and C4 and fill down.

Expected and actual result:
The array formula is copied and works as an array formula.

3. Select Cells C4 to C6
4. Copy down.

Expected result:
The array formula is copied to cells C5 and C6 as an array formula and works.
Actual result:
The formulas in cells C5 and C6 are copied identically except for the array status and thus break.

Example from spreadsheet I discovered this in
Array formula in cell C50: {=COUNTIF(DAY(Locations.$G50:$X50)=C$1,1)}
Array formula in cell C51 if filled down to Cell C51 only: {=COUNTIF(DAY(Locations.$G51:$X51)=C$1,1)}
Array formula in cell C51 if also copied down to more cells:
=COUNTIF(DAY(Locations.$G51:$X51)=C$1,1)

I'm using version 4.4.1.2 Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: en_GB on 64 bit linux. 
I haven't tested this in any other environment.
Comment 2 Aaron Honeycutt 2015-04-23 00:48:19 UTC
Hello! Can you please provide a sample document? Till then I'll leave this as NEEDINFO. Once you uploaded that just change it back to UNCOFIRMED and we'll give it another look. Thanks!
Comment 3 Chris McKenna 2015-04-23 11:21:39 UTC
Created attachment 115033 [details]
Extract from spreadsheet where bug was discovered

This is an extract from where I discovered the bug. Use copy and paste / fill down on the second sheet ("Day of month") to test.

As an aside, please let me know if there is a way to avoid the need for the hack in column AE of that sheet.
Comment 4 Chris McKenna 2015-04-23 11:22:29 UTC
Uploaded spreadsheet to use as a testcase
Comment 5 Buovjaga 2015-04-25 14:36:02 UTC
Could reproduce with 4.4.1.2, but fortunately it is already fixed in 4.4.2.2!

Setting to WFM.

Win 7 Pro 64-bit, Version: 4.4.3.1
Build ID: b2f347f2ac68821efc00b6f1793cda90af748118
Locale: fi_FI

Ubuntu 15.04 64-bit 
Version: 4.4.2.2
Build ID: 40m0(Build:2)
Locale: en_US

Version: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: en_US