Bug 121443 - Objects anchored to cell are not duplicated when copy-pasting to range larger than source (comment 16)
Summary: Objects anchored to cell are not duplicated when copy-pasting to range larger...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: high normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste Object Cut-Copy
  Show dependency treegraph
 
Reported: 2018-11-15 10:59 UTC by .
Modified: 2023-12-08 15:22 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file for Bugs 121443 and 121446. (9.68 KB, application/Calc)
2018-11-20 11:23 UTC, .
Details
Test File for bugs 121443 and 121446 (how result should be) (10.48 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-11-28 11:50 UTC, .
Details
sample ODS with shapes, form control buttons and raster images (16.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2023-12-08 10:49 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description . 2018-11-15 10:59:46 UTC
Description:
When I try to copy a row with a form control (check box) that is anchored to a cell to multiple selected rows the form control is only inserted once and the size of the form control is changed.

Steps to Reproduce:
1. Insert a check box form control on a new spreadsheet
2. Reduce height so to fit in a row
3. Move the check box to the cell A1
4. Disable design mode
5. Mark the first row and right click it then select copy
6. Mark rows 2 to 5 and right click then select insert


Actual Results:
In LibreOffice 5.4 no check box is inserted, in version 6.1 and 6.2 only one is inserted and the size of the inserted is wrong (when clicking in design mode you can see that the height has grown)

Expected Results:
Four check boxes should be inserted in rows 2 to 5 with the same size as the original


Reproducible: Always


User Profile Reset: No



Additional Info:
Tested first with version 5.4.7 (64 Bit) then with a new installation of version 6.0.7 (32 Bit) on another system and then also with new installations of versions 6.1.3 an 6.2.0.0alpha1 (both 32 Bit).

If you mark two rows (version 5.4) or three rows (version 6.1) with the check box for copy the insert works but in version 6.1 the size is wrong for some of the inserted check boxes and when i tried to insert to ten rows the check box was inserted to eleven rows.
Comment 1 Joel Madero 2018-11-20 09:23:10 UTC
Please attach a sample document that gets us through step 4 as that seems pretty simple to do. Our team is way too small to create sample documents for features that we're way less familiar with than you are.

Set to UNCONFIRMED once attachment is made. Thanks!

If you wish to help more please test against version 3.3 ("inherited from OOo) to find out if this is a regression: https://downloadarchive.documentfoundation.org/libreoffice/old/
Comment 2 . 2018-11-20 11:23:07 UTC
Created attachment 146821 [details]
Test file for Bugs 121443 and 121446.
Comment 3 . 2018-11-20 11:26:35 UTC
Attached Test file. Included reference values in form control to show usage.
Comment 4 . 2018-11-20 12:35:45 UTC
Tested with LibreOffice 3.3. Here the bug is not present.
Comment 5 . 2018-11-20 13:47:36 UTC
Tested older versions of LibreOffice:

In version 4.3.7.2 the bug is not present.

In version 4.4.0.1 the bug is present.

So version 4.4.0.1 introduced the bug.
Comment 6 raal 2018-11-20 15:30:11 UTC
This seems to have begun at the below commit.
Adding Cc: to Kohei Yoshida ; Could you possibly take a look at this one?
Thanks
 41597bab6e54abeafeca5130c60a064bf7b7f72d is the first bad commit
commit 41597bab6e54abeafeca5130c60a064bf7b7f72d
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Sun Mar 15 06:03:44 2015 +0800

    source-hash-ff5aad0a26aac46a3a540ac6ed2b7eca4a8cd23d
    
    commit ff5aad0a26aac46a3a540ac6ed2b7eca4a8cd23d
    Author:     Kohei Yoshida <kohei.yoshida@collabora.com>
    AuthorDate: Mon Nov 10 18:45:21 2014 -0500
    Commit:     Kohei Yoshida <kohei.yoshida@collabora.com>
    CommitDate: Tue Nov 18 08:31:53 2014 -0500
    
        Speed up pasting of single row onto multiple destination rows.
    
        This is an extension of the earlier paste optimization of a single cell
        across multiple destination cells.
bibisect-44max
Comment 7 QA Administrators 2019-11-21 03:32:51 UTC Comment hidden (obsolete)
Comment 8 . 2019-11-21 17:17:27 UTC
Tested with LibreOffice 6.2.8. The bug is still present.
Comment 9 QA Administrators 2021-11-21 03:58:19 UTC Comment hidden (obsolete)
Comment 10 . 2021-11-21 10:54:11 UTC
Tested with LibreOffice 7.1.7. The bug is still present.
Comment 11 . 2021-11-26 11:58:16 UTC
Tested with LibreOffice 7.2.3. The bug is still present.
Comment 12 . 2021-11-28 11:50:41 UTC
Created attachment 176545 [details]
Test File for bugs 121443 and 121446 (how result should be)
Comment 13 . 2021-11-28 11:53:27 UTC
Tested with OpenOffice 4.1.11. Here the bug is not present.
Comment 14 Justin L 2022-02-24 09:17:37 UTC
I used LO 3.5 to copy/paste A1 to A2:A5. Yes, each destination cell got a checkbox, but they are all tied together. I.E. if you uncheck one, they all uncheck. I assume the same is true for OpenOffice.

Well, that is pointless, but I guess the bug itself still stands and likely applies to other controls etc (although I couldn't reproduce with a textbox - which didn't copy at all).
Comment 15 . 2023-08-20 10:35:58 UTC
Tested with LibreOffice 7.5.5. The bug is still there.
Comment 16 Stéphane Guillou (stragu) 2023-12-08 10:49:04 UTC
Created attachment 191310 [details]
sample ODS with shapes, form control buttons and raster images

I used the linux-64-releases bibisect repository to compare libreoffice-4.3.7.1 to libreoffice-4.4.0.0.beta1.

With the sample document:
1. Copy row 3 (which contains shapes, form controls and images)
2. Paste it to a single row
3. Paste it to several rows

(same can be tested with a cell range instead)

Results:
* libreoffice-4.3.7.1: shape and form control (that are smaller than the cell) are pasted to the range.
* libreoffice-4.4.0.0.beta1: nothing pasted anymore.

So I am expanding the scope of this report to more than form controls, and upping the priority as it's a regression that affects basic copy-paste operations (see for example bug 158273 comment 1).
Regardless of what settings the duplicate form controls have, objects anchored to cell should be copied and duplicated when copy-pasting (or even filling down, but this enhancement is not part of the regression and should be tracked separately).

How things changed since then:
* libreoffice-6.1.0.0.alpha1: paste works again (including images, and objects fitted to cell), but pasting to several rows changes the size of the objects instead of duplicating them
* LO 7.6: objects are not stretched anymore, but there's only one copy in first row. That was Regina's fix dfb0d118f6b23730bc632885eb4703a37eeaec16 for bug 139083.

We still need to restore the ability to duplicate objects anchored to cell when pasting to a range bigger than the source, just like cell data and formatting are.