Bug 133781 - [EDITING] Anchored image move when columns pasted before
Summary: [EDITING] Anchored image move when columns pasted before
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Images
  Show dependency treegraph
 
Reported: 2020-06-08 07:20 UTC by zzz
Modified: 2022-10-08 09:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Anchored image bug test data. 01=before, 02=after (38.45 KB, application/x-zip-compressed)
2020-06-08 07:20 UTC, zzz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zzz 2020-06-08 07:20:50 UTC
Created attachment 161751 [details]
Anchored image bug test data. 01=before, 02=after

Reproduction procedure (attached ImageAnchorTest01.ods is a readymade sample):
(1)In the middle of an .ods sheet, paste an image.
  Set its anchor mode to "To Cell".
(2)Choose a destination column which is in the lefhand side from the image. We'll call this "Destination".
(3)Resize the source or destination column's width to make their width's different from each other.
(4)Select another column(s) and copy or cut it. We'll call this "Source".
(5)Select the destination column and paste into it.

Result:
Calc does adjust the destination column width to the source width.
The images on the righthand side of the destination column should shift their X-coordinate for the same amount. But the current version has a bug that they stay on the same X-coordinate, which means they now anchor to a different position inside the cell, or worse, stuck to another cell.
Attached ImageAnchorTest02.ods demonstrates how it moves (or rather, "fail to move when it should").

Reprducibility: 100%
Comment 1 Regina Henschel 2020-09-26 17:24:30 UTC
I can confirm the error. I make column B must wider than usual. Then I copy column K to B. The column width of B shrinks to adapt to the content. The image is not moved and is in an inconsistent state. The anchor of the image is still at E2 but the image is drawn at cell I2.

I have tested it with Version: 7.0.0.2 (x64)
Build ID: c01aa64b6c3d89ebe5fe69c28c7adb24eb85249c
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 2 QA Administrators 2022-09-28 03:32:42 UTC Comment hidden (obsolete)
Comment 3 zzz 2022-10-08 09:59:34 UTC
Tested with
Version: 7.4.1.2 (x64) / LibreOffice Community
Build ID: 3c58a8f3a960df8bc8fd77b461821e42c061c5f0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL

Result: Problem remains with same symptom.

Additional observation:
(A). After step (5), if you immediately perform another width change on any column (for example, make column M wider), then the image will jump to the "correct" (expected) position.
(A-2). Same "jump" is observed if you change the height of any row (for example, make row 9 wider).
(B). But if you save the file immediately after step (5), the "wrong" position will be saved. So when you re-open that saved file, the image is still on the "wrong" position. The image stays there even if you make column M wider; unlike above test (A), it will not "jump back" to the expected position no more.