Bug 74414 - EDITING: New line in a cell causes that cell content to move one row when copy pasting of that sheet
Summary: EDITING: New line in a cell causes that cell content to move one row when cop...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: x86-64 (AMD64) All
: medium critical
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.1
Keywords: regression
: 74264 74994 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-02 20:12 UTC by catalin
Modified: 2015-01-08 11:07 UTC (History)
4 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 catalin 2014-02-02 20:12:41 UTC
Problem description: 
I copied one page before the first one in the document. The cells have different heights, some contain at least a new-line. Some cell contents are moved one or two rows downwards.

Steps to reproduce:
1. put "X\nY" in cell A1 ('\n' is a new-line character);
2. right-click the page label (i.e. "Sheet1") and make a copy of this page;
3. verify cells A1 and A2 on the last created page;

Current behavior:
Cell A2 has the contents from A1 in the original page.

Expected behavior:
Cell A1 has the contents from A1 in the original page.

Operating System: Windows 7
Version: 4.2.0.4 release
Last worked in: 4.1.4.2 release
Comment 1 Cor Nouws 2014-02-03 09:22:49 UTC
Hi catalinraceanu

thanks for the report.
I can confirm this.

In my situation, after copying the sheet
 A1 is empty, but the row double high
 A2 at first sight only has the Y
    but after refresh (print preview) it shows the content of A1

The same happens with;
 - X\nY in A2
 - with "foo" in A1 and X\nY in A2
 - etc.


Set to new > regression
Was OK in 4.1.4.x

regards,
Cor
Comment 2 catalin 2014-02-03 09:46:16 UTC
(In reply to comment #1)
> In my situation, after copying the sheet
>  A1 is empty, but the row double high
Yes, I've also seen that sometimes the height of the original row is copied and only the contents are moved to the next row.

>  A2 at first sight only has the Y
>     but after refresh (print preview) it shows the content of A1
I guess this is because the height of row 2 is enough for only one row in the cell; if increased it should display all text.

Regards,
C
Comment 3 Kohei Yoshida 2014-02-08 14:05:29 UTC
I'm on it.
Comment 4 Commit Notification 2014-02-08 14:41:28 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#74414: Add a bit more check in existing test to catch 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-02-08 14:41:42 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#74414: No need to incremenet nRow here... It's just plain wrong.



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-02-08 14:42:16 UTC
4.2 backport request: https://gerrit.libreoffice.org/7944
Comment 7 Commit Notification 2014-02-08 17:25:44 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=c565eba9ef96798c3b584c7c0f887f92cf9ae572&h=libreoffice-4-2

fdo#74414: No need to incremenet nRow here... It's just plain wrong.


It will be available in LibreOffice 4.2.1.

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 8 Kohei Yoshida 2014-02-08 17:50:33 UTC
Fixed.
Comment 9 Kohei Yoshida 2014-02-15 04:07:28 UTC
*** Bug 74994 has been marked as a duplicate of this bug. ***
Comment 10 Matthew Francis 2015-01-08 11:07:21 UTC
*** Bug 74264 has been marked as a duplicate of this bug. ***