Bug 166650 - Image frame and image are out of sync on redo of anchoring the frame 'as character' in case of DOCX
Summary: Image frame and image are out of sync on redo of anchoring the frame 'as char...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks: DOCX-Textbox Undo-Redo
  Show dependency treegraph
 
Reported: 2025-05-19 18:34 UTC by Telesto
Modified: 2025-12-27 19:00 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample (61.00 KB, application/vnd.oasis.opendocument.text)
2025-05-19 18:34 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2025-05-19 18:34:07 UTC
Description:
Image frame and image are out of sync on redo of anchoring the frame 'as character' in case of DOCX

Steps to Reproduce:
1. Open the attached file
2. Save as DOCX
3. File -> Reload
4. Right Click the image frame -> Anchor as character
5. CTRL+Z
6. CTRL+Y
7. Save and reload

Actual Results:
1. CTRL+Z isn't position the image properly
2. Frame and image get out of sync after CTRL+Y
3. Save and reload puts the image again on different spot


Expected Results:
No weird behaviour


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9bc5b89c149497a83117edfadc3fb0b96d2f9899
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL threaded
Comment 1 Telesto 2025-05-19 18:34:18 UTC
Created attachment 200875 [details]
Sample
Comment 2 Telesto 2025-05-19 18:41:22 UTC
Also in
Version: 7.3.8.0.0+ (x64) / LibreOffice Community
Build ID: e1ad83ddb2f39419fb5d7c69eba51e2b9f49c788
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 3 Jeremy Norvell 2025-05-31 21:42:13 UTC
Thank you for reporting the bug. I can not reproduce the bug in the versions of LibreOffice listed below:

I do see the image move very slightly lower on step 3 of the reproduction directions below, but this seems to be different than the reported behavior.

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 9bc5b89c149497a83117edfadc3fb0b96d2f9899
CPU threads: 2; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 4 Buovjaga 2025-12-27 19:00:11 UTC
(In reply to Telesto from comment #0)
> 2. Frame and image get out of sync after CTRL+Y

Focusing on this in particular, using linux-64-7.1 I landed on commit d84e590486e2c26212931de80a84181d7aca7bbe
sw: DOCX export: don't export text frames as transparent

I see the commit is also referenced (as not an actual regression) in bug 140123.

Let's ask Michael what he thinks.

I had to recreate the document (did it in 7.0 as .odt) as the attachment did not open properly in older versions. To speed up bibisecting I used this incantation:

SAL_USE_VCLPLUGIN=gen instdir/program/soffice --headless --convert-to docx --outdir ../libobugs ../libobugs/Demo1_recreation_70.odt && SAL_USE_VCLPLUGIN=gen instdir/program/soffice ../libobugs/Demo1_recreation_70.docx