Bug 158110 - Copy/paste of Calc comments fails when more than one cell is copied
Summary: Copy/paste of Calc comments fails when more than one cell is copied
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) alpha1+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Andreas Heinisch
Whiteboard: target:24.8.0
Keywords: bibisected, bisected, regression
: 160859 (view as bug list)
Depends on:
Blocks: Calc-Comments Paste-Special
  Show dependency treegraph
Reported: 2023-11-08 08:15 UTC by Seppi
Modified: 2024-05-22 05:29 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Seppi 2023-11-08 08:15:50 UTC
Add comments in two different cells.  Mark and copy them.  Go to another cell an paste the comments selectively using options "comments" and "adding".  After pasting that way the comments doesn't appear.  By copy/paste the comments one by one it works.  Same behaviour in versions and  Version worked fine.

Steps to Reproduce:
1.Open a new empty calc document.
2.Go to an arbitrary cell, for example B2.
3.Create there a new comment, for example "Test 1".
4.Go to an other cell, for example B3 and create here a new comment "Test 2".
5.Mark both cells B2 and B3 and copy them (Ctrl-c).
6.Go to an other cell, for example D2 and insert the comments selectively by adding them: german menu Bearbeiten → Inhalte einfügen.  Choose there the options comments and add.  Click on "OK".
7.Do the same with both comments but one by one and it works as expected.

Actual Results:
to 6.: Result is that the cells D2 and D3 are marked but the comments are missing.  If you do the paste step again, the option "comments" isn't marked anymore.
to 7.: The comments are correctly pasted, but it's too much effort for many cells.

Expected Results:
The comments of many cells should be pasted selectively and the other cell contents and properties should be untouched.  This is only the case, if you copy/paste the comments by only one cell at a time.

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 12; OS: Linux 5.6; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 m_a_riosv 2023-11-08 13:08:14 UTC
Version: (X86_64) / LibreOffice Community
Build ID: 026be6f62f183f14b9c0bf2e50cde9ac69856f53
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
Comment 2 m_a_riosv 2024-04-29 22:40:03 UTC
*** Bug 160859 has been marked as a duplicate of this bug. ***
Comment 3 Stéphane Guillou (stragu) 2024-04-30 04:51:07 UTC
From my comment in duplicate:

1. Insert a comment in cell A1
2. Copy range A1:A2
3. Paste special into B1, with only option "Only comments" ticked

Results: no comment pasted in target

Reproduced in:
Version: (X86_64) / LibreOffice Community
Build ID: d4f6534e8870e8f271984c37ce54a6878f372ae1
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3

Same on Windows 11.

Bibisected with linux-64-7.6 repo to first bad commit d82812a13723fc093897c1b27d29ac263c66d0d0 which points to:

commit 28bcb35b12f19858eca3d08559d7914e36ad1d2b
Author: Andreas Heinisch
Date:   Wed May 10 09:08:47 2023 +0200
    tdf#139858 - Do not delete existing cell contents when pasting notes
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151603
Comment 4 Commit Notification 2024-05-22 05:28:03 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":


tdf#158110 - Paste special: Remove special ADDNOTES flag handling

It will be available in 24.8.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:

Affected users are encouraged to test the fix and report feedback.