Bug 63368 - FORMATTING: Images attached to cell get mispositioned when spreadsheet is edited
Summary: FORMATTING: Images attached to cell get mispositioned when spreadsheet is edited
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks: Paste Calc-Images
  Show dependency treegraph
 
Reported: 2013-04-10 09:58 UTC by sergio.callegari
Modified: 2018-12-31 16:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case (9.12 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-05-30 08:01 UTC, sergio.callegari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sergio.callegari 2013-04-10 09:58:16 UTC
Problem description: 

Say that you have a spreadsheet and that you insert an image and attach it to a cell.

Now, say that in an upper cell you select a format such that the text can wrap.

When you put text in this upper cell, and the text wraps, the image does not anymore stay aligned with the cell it is anchored to.


Operating System: Ubuntu
Version: 4.0.2.2 release
Comment 1 Joel Madero 2013-05-29 21:55:11 UTC
Please attach a document and describe what steps to take on that document to see bad behavior.


Marking as NEEDINFO - once you attach document and explain steps mark as UNCONFIRMED and we will verify the problem.


Thanks!
Comment 2 sergio.callegari 2013-05-30 08:01:49 UTC
Created attachment 80018 [details]
Test case

Test case.

1) Open attached document
2) Note that the cloud image is anchored to cell B2, and placed in such a way that the top of the cloud is about half-way in row 2.
3) Now, select row 1 and insert a row before row 1. This works: the cloud correctly moves down, since it remains still relative to its anchor point (now cell B3). Now the top of the cloud is about half-way in row 3.
4) Put your cursor in cell A2 at the end of the world "Foo", press CTRL-ENTER to insert a line break and type "Bar". Note that this is not handled properly. The height of cell A2 is increased in order to accomodate the two lines of text. This means that cell B3, to which the cloud image is anchored moves down. However, the cloud image does not move down, so that its relative position with respect to the anchor point is changed. The top of the cloud should have remained about half-way in row 3, but now it is at the bottom of row 2.
Comment 3 Joel Madero 2013-05-30 13:55:37 UTC
In the future please read the instructions in their entirety:

"Marking as NEEDINFO - once you attach document and explain steps mark as UNCONFIRMED and we will verify the problem."

In general QA doesn't look at NEEDINFO bugs at all as we assume the reporter needs to add details, the bug must be in UNCONFIRMED status to get triaged
Comment 4 ign_christian 2013-06-09 02:34:04 UTC
I can confirm same behavior as comment 2 on LO 4.0.4.1 (Win7 32bit)
Comment 5 QA Administrators 2015-12-20 16:17:59 UTC Comment hidden (obsolete)
Comment 6 sergio.callegari 2015-12-21 14:29:43 UTC
Still present as of 5.1.0.1
Comment 7 QA Administrators 2017-01-03 19:55:37 UTC Comment hidden (obsolete)
Comment 8 Thomas Lendo 2017-03-06 00:29:00 UTC
Bug still present in 5.3.0.3.

I created Bug 106336 for the same behavior especially for columns before I found this bug. I didn't notice that the image positioning problem (if anchored to cell) not only exists with columns but also with rows.

But this bug is cluttered with meaningless comments, the other bug has a too special summary (up to now). A LibO bugzilla expert should decide what to do.
Comment 9 sergio.callegari 2017-03-07 13:25:07 UTC
Issue is still present as of 5.3.1 RC 1
Comment 10 Regina Henschel 2017-12-19 17:41:08 UTC
I do not see the problem in Version: 5.4.3.2 (x64)
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
Locale: de-DE (de_DE); Calc: CL
Comment 11 Thomas Lendo 2017-12-30 01:05:57 UTC
The special case described in commend 2 really seems to be fixed.

But copying a column or row with a defined height and inserting it before the column or row with an image, this image isn't correctly repositioned. See also bug 106336.

Version: 6.1.0.0.alpha0+
Build-ID: 38f5e768b0f858f8f990a8f297396821c75d45dc
CPU-Threads: 4; BS: Linux 4.10; UI-Render: Standard; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-12-29_01:09:09
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group threaded
Comment 12 QA Administrators 2018-12-31 03:42:25 UTC Comment hidden (obsolete)
Comment 13 sergio.callegari 2018-12-31 16:24:16 UTC
Improved, but still a bit buggy in LibO 6.2.0 RC 1.

Test case to have an issue needs to be slightly changed to still show the buggy behaviour

Test case (again with attachment 80018 [details])

1) Open attached document

2) Note that the cloud image is anchored to cell B2, and placed in such a way that the top of the cloud is about half-way in row 2.

3) Now, select row 1 and insert a row before row 1. This works: the cloud correctly moves down, since it remains still relative to its anchor point (now cell B3). Now the top of the cloud is about half-way in row 3.

4) Put your cursor in cell A2 at the end of the world "Foo", press CTRL-ENTER to insert a line break and type "Bar". This is broken in LibO < 6.2 and working (sort of) in LibO 6.2. In LibO 6.2 the cloud correctly moves down, since it remains (almost) still relative to its anchor point (now cell B3). Now the top of the cloud is about half-way in row 3. Actually, the behavior is still buggy, because there must be some miscalculation and the image moves /slightly/ up relative to its anchor point.

5) Put your cursor in cell A2 at the end of the world "Bar" and press CTRL-ENTER 10 times. This adds 10 empty lines to cell A2 and makes evident the miscalculation reported at the previous point 4). Now the top of the cloud is not anymore half-way in row 3.



 Note that this is not handled properly. The height of cell A2 is increased in order to accomodate the two lines of text. This means that cell B3, to which the cloud image is anchored moves down. However, the cloud image does not move down, so that its relative position with respect to the anchor point is changed. The top of the cloud should have remained about half-way in row 3, but now it is at the bottom of row 2.
Comment 14 sergio.callegari 2018-12-31 16:25:52 UTC
Sorry for the editing mistake in the previous comment, please ignore the last 6 lines.