Bug 143591 - Image frame anchor changes from 'to character' to 'to paragraph' on DOCX export
Summary: Image frame anchor changes from 'to character' to 'to paragraph' on DOCX export
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: bibisected, bisected, filter:docx, regression
: 144568 (view as bug list)
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2021-07-28 17:57 UTC by Telesto
Modified: 2022-02-25 23:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (52.87 KB, application/vnd.oasis.opendocument.text)
2021-07-28 17:57 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-07-28 17:57:14 UTC
Description:
Image frame anchor changes from 'to character' to "to paragraph anchoring'.. which weird because Word doesn't even support 'to paragraph' anchoring..

It's fine with DOC

Steps to Reproduce:
1. open the attached file
2. Select the frame
3. Right click -> Look at the anchor ('to character')
4. Save as DOCX
5. File reload
7. Right click the image frame: Look at the anchor -> To paragraph. 
Anchor is also be seen at the start of the page when selecting the frame 

Actual Results:
To paragraph achoring

Expected Results:
To character anchoring


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2a151d1d5bc055d5e0011460b6ec42ea9f34f880
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
4.4.7.2

and in
4.3

not in 
4.2
Comment 1 Telesto 2021-07-28 17:57:29 UTC
Created attachment 173932 [details]
Example file
Comment 2 Nina_Shtygailo 2021-08-04 07:35:52 UTC
I have it the other way around: with the file format odt the anchor is "paragraph", with the format doсx the anchor is "character".


no repro in

Version: 7.1.5.2 (x64) / LibreOffice Community
Build ID: 85f04e9f809797b8199d13c421bd8a2b025d52b5
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: CL
Comment 3 Buovjaga 2021-09-11 09:47:06 UTC
Tester in comment 2 was looking at the image, not the frame.

I reproduce.

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: e6a8d312d3d7e5d81c56d5ccc0508116dd283f1f
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded

This was a bit of a rabbit hole.

At first, I bibisected with Linux 43max to 
https://git.libreoffice.org/core/commit/41927dce4217d60808a889f8dac546f55848eead
sw: enable drawingml export of textframes by default

...but this just means I should have had experimental mode on!

Then I bibisected in 43max with experimental mode turned on to https://git.libreoffice.org/core/commit/8a0fc37a3714752b764d9d9b752913734412d46c
DOCX textframe export: when in experimental mode, use DML instead of VML

I'm not even sure, if this is a regression, but:
Adding Cc: to Miklos Vajna

Due do crashing in 43max, I had to do a lot of skipping, but fortunately it pinpointed the exact commit in the end. I also had to run with gen backend as otherwise the saving didn't work properly.
Comment 4 Commit Notification 2021-09-21 06:19:54 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7246e57216bb20c15af0ecf6a0183f5ffa81e780

tdf#143591 DOCX import: handle anchored objects as at-char

It will be available in 7.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Buovjaga 2021-09-21 07:13:48 UTC
Verified, thanks

Arch Linux 64-bit
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 504d2209e47ffeb223b2bcde9fc24e828cc5cd6f
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 21 September 2021
Comment 6 Telesto 2021-09-21 09:21:18 UTC
*** Bug 144568 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2021-09-21 09:34:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/c0b951024c2ec815f1ef70d59d31860df2434d28

tdf#143591 DOCX import: handle anchored objects as at-char

It will be available in 7.2.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.