Bug 77379 - EDITING: Paste special (with Comments option selected) of text cell with comment loses comment
Summary: EDITING: Paste special (with Comments option selected) of text cell with comm...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0 target:4.2.5
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-04-13 01:39 UTC by Owen Genat (retired)
Modified: 2014-05-27 01:50 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODS saved under v4142 and v4221 showing expected and erroneous results. (41.54 KB, application/zip)
2014-04-13 01:39 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Genat (retired) 2014-04-13 01:39:32 UTC
Created attachment 97290 [details]
ODS saved under v4142 and v4221 showing expected and erroneous results.

Problem description: At some point between v4.1.4.2 Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72 and v4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f the behaviour of paste special of a cell containing text with a comment has changed. Using these paste special options:

- Comments
- Comments + Numbers
- Comments + Date & time
- Comments + Formulas
- Comments + Objects

... the comment against a cell containing text is lost. Using the Comments + Text option retains the comment. Example files for the two indicated versions are attached.

Steps to reproduce:
1. Open the v4221 file.
2. Select B3:B11 (cells of various format, each containing a comment).
3. Copy (CTRL+C).
4. Paste the copied cells to another location using variously:
   - Normal paste (CTRL+V);
   - Paste special selecting Comments only;
   - Paste special selecting Comments + Text;
   - Paste special selecting Comments + Numbers;
   - Paste special selecting Comments + Date & time;
   - Paste special selecting Comments + Formulas;
   - Paste special selecting Comments + Objects;
5. Repeat test using earlier version of Calc.

Current behavior: v4221 drops the comment against a cell contain text for all tests except Normal paste and paste special using Comments + Text.

Expected behavior: Comment should be retained when the Comments option is selected in the paste special options dialog.

              
Operating System: All
Version: 4.2.2.1 release
Last worked in: 4.1.4.2 release
Comment 1 m.a.riosv 2014-04-13 15:07:42 UTC
Hi Oweng,

Reproducible with:
Win7x64Ultimate
from
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
all until
Version: 4.3.0.0.alpha0+ Build ID: f9cc0daec26016722bf5260e4e2634e6dcfe25a2
TinderBox: Win-x86@39, Branch:master, Time: 2014-04-12_01:41:16

Last working for me:
Version: 4.1.6.1 Build ID: a59c-e81388f477fc89db57f0c27f222f31884eb

Maybe we must set up the version with 4.2.0.4, the first with the issue.
Comment 2 Owen Genat (retired) 2014-04-14 06:04:23 UTC
Thanks Miguel. Version set to v4.2.0.4 release as a result of comment 1. Problem would appear to be restricted to the v4.2 series.
Comment 3 Kohei Yoshida 2014-05-09 18:01:56 UTC
On it.
Comment 4 Commit Notification 2014-05-09 18:06:35 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=71cd1ca57faf423fb607fab64914719238bc1e4f

fdo#77379: Write test for this.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2014-05-09 18:06:49 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f4673ccd5e26d38a28f297d64ed70ba719d21ef2

fdo#77379: Don't return from the call. Notes are handled at the end.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Kohei Yoshida 2014-05-09 18:07:12 UTC
4.2 backport: https://gerrit.libreoffice.org/9295
Comment 7 Kohei Yoshida 2014-05-09 18:08:04 UTC
The problem was exactly with notes with text cells.  The code never lies.
Comment 8 Commit Notification 2014-05-09 18:54:02 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e4f500934e51946cd1fbfa8b8dc6f6fb26a7779b&h=libreoffice-4-2

fdo#77379: Don't return from the call. Notes are handled at the end.


It will be available in LibreOffice 4.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Kohei Yoshida 2014-05-09 18:54:43 UTC
Fixed.
Comment 10 m.a.riosv 2014-05-27 01:50:45 UTC
Thanks Kohei.
Verified.
Version: 4.2.5.0.0+ Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-25_19:53:59

Reported a bug https://bugs.freedesktop.org/show_bug.cgi?id=79284

because sample file crash for me with:
Win7x64
Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Version: 4.4.0.0.alpha0+ Win-x86@39, Branch:master, Time: 2014-05-26_01:36:09