Bug 142098 - Calc: pasting comment clears cell contents
Summary: Calc: pasting comment clears cell contents
Status: RESOLVED DUPLICATE of bug 139858
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: All All
: low enhancement
Assignee: Not Assigned
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
Reported: 2021-05-05 11:40 UTC by Markéta Machová
Modified: 2021-09-27 14:03 UTC (History)
2 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 Markéta Machová 2021-05-05 11:40:21 UTC
Version: / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: x11
Locale: en-US (en_US.utf8); UI: en-US
Calc: threaded

Steps to reproduce:
1 In the attached document, click right on A1 -> "Copy"
2 Right-click on A2 -> Paste Special -> Paste special ...
3 In the pop-up dialog, under "Selection", unselect everything and select "Comments", and click "OK"

Expected: Comment is pasted without clearing target cell content
Actual: text in A2 is deleted

One openSUSE user reported it for LO The problem remains. Looks like a bug to me.
Comment 1 [REDACTED] 2021-05-05 13:20:29 UTC
You need to activate option "[o] Add" under "Operations" as well to have the comment being "added" instead of comment replacing all cell content in A2

From my perspective not a bug but usage error.

Comment 2 [REDACTED] 2021-05-05 13:22:21 UTC Comment hidden (obsolete)
Comment 3 Markéta Machová 2021-05-05 13:26:58 UTC
Thanks for the explanation :) next time I will check the docs.
Comment 4 Martin Wilck 2021-05-05 20:00:04 UTC
(Hi, I'm the person who reported this to Markéta on SUSE bugzilla).

I can see that it's documented to work this way. But it makes no sense to me. Comments aren't cell contents. If nothing except "Comments" is activated below "Selection", why would the user also have to choose "Add", too? The expectation is that the comments and *only* the comments are pasted, otherwise the user would have selected at least one of the other "Selection" options besides "Comments", e.g. "Text" or "Numbers".

And if this really is how "paste special" should behave, why isn't it the case for pasting "Formats"? In that case, users don't have to select "Add" to paste the formats and nothing else. This is inconsistent at least.

Can you provide a rationale for this behavior?

Not sure if this matters, but Excel doesn't require selecting "Add": 


(I can't test with Excel, because the only version I have is Excel/Web in o365, which doesn't have general "Paste special" functionality at all; same for Google Docs).

The screenshot in the 2nd reference above suggests that, in Excel, the "Operation" selection is actually inactive / greyed out when "Comments" are selected only.

I found another equally weird and possibly related issue: When pasting "Text" only into a cell which has a comment, the comment of the target cell (the one pasted into) is deleted. This is highly unexpected, at least by yours truly. Selecting "Add" doesn't change this behavior. Actually, I haven't figured out how to paste anything into a cell in LO 7.2 without destroying the existing comments on that cell (well, pasting "Formats" only seems to work). This definitely differs from the behavior of both Excel and Google Docs. 

If you think this is not a bug, please provide some convincing arguments.
Comment 5 Roland Kurmann 2021-05-06 05:48:31 UTC
I think the "Add"-Operation is rather a workaround. It seems the paste flags are not fully respected. There are similar issues, e.g. bug 142093.
So, for me this is a bug.
Comment 6 Markéta Machová 2021-05-06 08:25:16 UTC
I can confirm Excel does not need to tick "Add" and pasting of comments works as expected.

(I would reopen the corresponding bug on the openSUSE Bugzilla, but it is currently down.)
Comment 7 [REDACTED] 2021-05-06 17:18:52 UTC
(In reply to Roland Kurmann from comment #5)
> I think the "Add"-Operation is rather a workaround. It seems the paste flags
> are not fully respected. There are similar issues, e.g. bug 142093.
> So, for me this is a bug.

A documented bug (https://help.libreoffice.org/7.1/en-US/text/shared/01/02070000.html?System=UNIX&DbPAR=CALC&HID=modules/scalc/ui/pastespecial/dialog-action_area1#bm_id31541011)?

If at all - it is an enhancement request.
Comment 8 Roland Kurmann 2021-05-06 20:27:09 UTC
(In reply to Uwe Auer from comment #7)
> A documented bug
> (https://help.libreoffice.org/7.1/en-US/text/shared/01/02070000.
> html?System=UNIX&DbPAR=CALC&HID=modules/scalc/ui/pastespecial/dialog-
> action_area1#bm_id31541011)?

The documentation is reflecting the current state.
I would expect a different behavior.
Using the add operation is not intuitive.

Currently, I'm working on "Special Paste" issues. After my other changes are solved and merged, I want to have a look at the paste flags in "Special Paste" dialog.
Comment 9 Timur 2021-09-27 14:03:58 UTC
No idea why bug 139858 is just See Also, when this one seems duplicate.

*** This bug has been marked as a duplicate of bug 139858 ***