Bug 141440 - Comment deleted when pasting special Formula, Number or Text
Summary: Comment deleted when pasting special Formula, Number or Text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.2.2 release
Hardware: All All
: medium normal
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2021-04-01 20:43 UTC by romain2boss
Modified: 2024-05-21 07:38 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 romain2boss 2021-04-01 20:43:32 UTC
Steps to reproduce:
1. Open a new workbook
2. Type '=1+1' in A1
3. Create a comment 'My comment' in B1
4. Copy cell A1
5. Select B1
6. Do one of the following:
- Go into Edit > Paste special > Formula only
- Go into Edit > Paste special > Number only
- Go into Edit > Paste special > Text only
- Go into Edit > Paste special > Paste special..., uncheck everything and check ONLY formula or Number or Text

Observed: The formula/number/text got pasted in B1 (ok) but deleting the comment (ko).

Expected: The formula/number/text got pasted in B1 not changing/deleting the comment.

Nota: Similar to comments, merged cell also disappear when pasting formula only, see bug 106177
Comment 1 Peter S Anderson 2021-04-07 11:53:31 UTC
I have duplicated this bug in numerous versions including 4.5.0.0.alpha0, 5.4.0.0.alpha1, 7.0.5.2 and 7.2.0.0.alpha+, ie. I suspect Calc had always behaved this way.
I must admit that I personally find this behaviour really frustrating and should have raised the bug myself. I import data from CSV files all the time and use the paste values feature to retain formats but always lose any comments. Apart from being annoying, the behaviour is inconsistent with Excel and the fact that the Paste Special Popup includes a Selection box for Comments which implies that comments will NOT be copied if the box is not selected.
Comment 2 Commit Notification 2023-05-16 09:05:33 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/535f8fde0c33c435e4a8e9f768003516ce933666

tdf#141440 - Do not delete notes when pasting contents

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.