Bug 139858 - Paste Special > Comments must not overwrite cell content
Summary: Paste Special > Comments must not overwrite cell content
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords:
: 142098 143018 143995 155929 (view as bug list)
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2021-01-23 11:43 UTC by Jon
Modified: 2024-04-30 04:51 UTC (History)
10 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 Jon 2021-01-23 11:43:53 UTC
Description:
When pasting special comments only text is deleted / cleared.  When pasting special text only comments are deleted / cleared.  Pasting special only comments or only text should have no impact on existing values or the other "field"

Actual Results:
existing comments or text cleared / deleted

Expected Results:
existing comments or text should remain


Reproducible: Always


User Profile Reset: No



Additional Info:
no other info
Comment 1 Louis Steinberg 2021-02-22 03:04:43 UTC
Hello Jon,

Thank you for reporting the bug. I can confirm that the bug is present in

Version: 7.1.0.3 / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

and also in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: 3a1e3bd2bb71d084233dfb791c1d0c3dd81b43e5
CPU threads: 4; OS: Mac OS X 10.15.7; UI render: default; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded


- Lou
Comment 2 m_a_riosv 2021-06-25 00:44:31 UTC
*** Bug 143018 has been marked as a duplicate of this bug. ***
Comment 3 m_a_riosv 2021-06-25 00:45:21 UTC
Still
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 5fb7f66d240fec32a4751d331a215307ad994cbb
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: threaded
Comment 4 Timur 2021-09-27 14:03:58 UTC
*** Bug 142098 has been marked as a duplicate of this bug. ***
Comment 5 Timur 2021-09-27 14:08:36 UTC
This is not a bug, because as explained in duplicate bug 142098 it works as documented. 
It's an enhancement request for a change that needs UX before confirming. 
Low priority because it just takes attention so get desired result.
Comment 6 Heiko Tietze 2021-09-28 08:05:26 UTC
You can paste special comments only and keep the cell content by checking the Add option (it adds nothing since you paste only the comment). But for the other way around, pasting content into a cell with comment, I don't see a workaround.

And actually I wonder if that's needed. Why would you want to create an empty cell with a comment (empty because you know the content will be overwritten) and paste something into it? Guided workflow perhaps but then you could comment directly within the cell.

I hesitate to agree with the issue because of the implication, namely to add more options "Keep comment" and "Don't overwrite content". Without a really good use case I recommend to keep the UI as simple as possible.
Comment 7 Jon 2021-09-28 13:24:02 UTC
Heiko - I appreciate the workaround; but, clicking the Add function when pasting comments only isn't intuitive.  Pasting is inherently an additive process, your are adding text, comments, formatting etc.  The add / subtract / multiply / divide seem to be mathematical functions.  By having to click the add option after already selecting to paste only the comments, is unnecessary and no keeping with the simplicity principle you mention in your other comment.  I may indeed have cells that already have comments but I only want to paste in text or formats and NOT clear or overwrite the comments.

While this may be working as documented, I argue this is a design defect and should be fixed to function as outlined above.  I tested this capability in MS Excel and it works as described and as one would expect.
Comment 8 Heiko Tietze 2021-09-30 09:17:43 UTC
The paste special options /formats and /objects (when anchored to cell) do exactly what is requested. The content becomes bold, for example, while numbers and comment remains intact. The same happens the other way around when pasting numbers only into a cell with formatting.

So let's treat comments similarly and keep the cell content.
Comment 9 Timur 2022-02-19 16:41:34 UTC
*** Bug 143995 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2023-05-12 07:02:53 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/28bcb35b12f19858eca3d08559d7914e36ad1d2b

tdf#139858 - Do not delete existing cell contents when pasting notes

It will be available in 7.6.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 11 Commit Notification 2023-05-14 11:06:08 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/f2535c6ff09e2afaa4c5db0a7fb6ee594a417732

tdf#139858 - Adapt documentation for paste special
Comment 12 ady 2023-06-19 17:10:50 UTC
*** Bug 155929 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2024-04-22 02:48:23 UTC
Verified in:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: bdf3b5ce49b0e4ee1b4525d344cfb037ef473059
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded