Bug 95554 - Copy&paste of multiple cells in a column only copies the first cell
Summary: Copy&paste of multiple cells in a column only copies the first cell
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium minor
Assignee: Roland Kurmann
URL:
Whiteboard: target:7.2.0 target:7.1.4
Keywords:
Depends on:
Blocks: Cut-Copy
  Show dependency treegraph
 
Reported: 2015-11-03 22:25 UTC by Larsen
Modified: 2021-04-26 09:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Larsen 2015-11-03 22:25:17 UTC
Steps to reproduce (on Windows):
- Open a new Calc document
- In any column, enter anything in six different cells
- While holding the Ctrl-key, select some of those cells
- Press Ctrl+C and paste this into any text editor

Result:
Only the cell with the lowest row number will have been copied.

Related tests:
- Copying multiple cells within one row works as expected
- Trying to copy cells from different rows/columns gives "This function cannot be applied to a multiple selection" (translated from the German text I get)


I first noticed this problem with 5.0.0.5 (x86). Problem persists with 5.0.3.2 (x64). Windows 7, SP1.
Comment 1 raal 2015-11-06 16:15:01 UTC
I can confirm with Version: 5.1.0.0.alpha1+ (x64)
Build ID: b35e797ca0e2c7e7ad6dbccea6b92208b209677c
TinderBox: Win-x86_64@62-TDF, Branch:MASTER, Time: 2015-11-02_22:21:21
and Verze: 4.1.5.3
ID sestavení: 1c1366bba2ba2b554cd2ca4d87c06da81c05d24
Comment 2 QA Administrators 2016-11-08 11:56:48 UTC Comment hidden (obsolete)
Comment 3 Larsen 2016-11-09 14:30:44 UTC
Still the very same problem as in my initial report.
LibreOffice 5.1.6.2 (x64)
Windows 10 (1607), 64-bit
Comment 4 Buovjaga 2018-04-22 15:09:21 UTC
I repro, but the cell with the highest row number is pasted.

Version: 6.1.0.0.alpha0+
Build ID: 104b26b246c94c8c66864b20d00e419d96b15961
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@39, Branch:master, Time: 2018-04-16_08:30:15
Locale: fi-FI (fi_FI); Calc: group
Comment 5 QA Administrators 2019-04-23 02:48:44 UTC Comment hidden (obsolete)
Comment 6 Larsen 2019-04-23 07:38:59 UTC
Bug no longer present in...

LibreOffice 6.1.5.2 (x64)
Windows 10 (1809), 64-bit

Build-ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard;
Gebietsschema: de-DE (de_DE); Calc: group threaded
Comment 7 Buovjaga 2019-04-23 10:18:53 UTC
(In reply to Larsen from comment #6)
> Bug no longer present in...
> 
> LibreOffice 6.1.5.2 (x64)
> Windows 10 (1809), 64-bit
> 
> Build-ID: 90f8dcf33c87b3705e78202e3df5142b201bd805
> CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard;
> Gebietsschema: de-DE (de_DE); Calc: group threaded

Bug still present in

Arch Linux 64-bit
Version: 6.3.0.0.alpha0+
Build ID: b8f33d053c2cbf05872cf9ddfeff4cc302ee281f
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); UI-Language: en-US
Calc: threaded
Built on 20 April 2019

and also 3.3.0
Comment 8 QA Administrators 2021-04-23 04:00:57 UTC Comment hidden (obsolete)
Comment 9 Roland Kurmann 2021-04-23 04:44:53 UTC
Still reproducible in 

Version: 7.1.1.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.3; UI render: GL; VCL: kf5
Locale: de-CH (en_US.UTF-8); UI: de-DE
Calc: threaded

and

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 1c1226709c6be39c5462f5e6e1262ca630b30b34
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


The cell with the highest row number is pasted, or more if they were consecutive, but not others
Comment 10 Roland Kurmann 2021-04-23 05:33:20 UTC
I've found the problem.
Comment 11 Roland Kurmann 2021-04-23 09:14:51 UTC
I've submitted a patch:
https://gerrit.libreoffice.org/c/core/+/114534

Waiting for review

I think the behavior to copying to system clipboard is still not correct. I created bug 141847.
Comment 12 Commit Notification 2021-04-23 10:35:10 UTC
scito committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7c1e22152ed1a1837782a55fc9997f8e7801681b

tdf#95554 fix ScDocument::GetClipArea() for rows: use > instead of <

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 13 Buovjaga 2021-04-23 14:53:05 UTC
Verified, thanks

Arch Linux 64-bit
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 3199182588fecac8a1c1fe202ca55702a3aab6ab
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 23 April 2021
Comment 14 Commit Notification 2021-04-26 00:31:50 UTC
scito committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/06d5d625e1dc8489e51b962353ac423669e61fed

tdf#95554 fix ScDocument::GetClipArea() for rows: use > instead of <

It will be available in 7.1.4.

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 15 Larsen 2021-04-26 07:13:34 UTC
First problem looks good in 7.1.4.0.0+ (x64).

Should I open a separate bug report for the related problem (see above)?
Comment 16 Buovjaga 2021-04-26 09:04:30 UTC
(In reply to Larsen from comment #15)
> First problem looks good in 7.1.4.0.0+ (x64).
> 
> Should I open a separate bug report for the related problem (see above)?

I don't know what related problem you are referring to (too vague), but please do.
Comment 17 Larsen 2021-04-26 09:28:13 UTC
'Trying to copy cells from different rows/columns gives "This function cannot be applied to a multiple selection"'

Ok, see bug 141907.