Bug 148710 - Layout of an image in docx file is different from the layout in odt file, even when the anchorings used are docx-compatible ones (i.e., "as char" and "to char" anchorings)
Summary: Layout of an image in docx file is different from the layout in odt file, eve...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: WPSShapeTextImport-Change
  Show dependency treegraph
 
Reported: 2022-04-21 14:10 UTC by Jambunathan K
Modified: 2024-05-24 03:17 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
frames.odt: This file uses only "as-char" and "to char" anchorings (30.21 KB, application/vnd.oasis.opendocument.text)
2022-04-21 14:11 UTC, Jambunathan K
Details
frames.docx: This is what you get when you save `frames.odt` to `docx` format (20.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2022-04-21 14:12 UTC, Jambunathan K
Details
to-char-anchoring: difference-in-layout-between-odt-and-docx.png: Note the difference in layout between ODT and DOCX version (204.08 KB, image/png)
2022-04-21 14:17 UTC, Jambunathan K
Details
Outer Frame Config.png: This frame limits the paragraph width to 7.1cm or so (158.02 KB, image/png)
2022-04-21 14:18 UTC, Jambunathan K
Details
Config of Frame Containing Text "(1)".png: This frame is positioned to the "right" of "paragraph text area" (162.17 KB, image/png)
2022-04-21 14:23 UTC, Jambunathan K
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2022-04-21 14:10:42 UTC
Description:
Layout of an image in docx file is different from the layout in odt file. This is even when the anchoring used are docx-compatible.  In other words, the ODT file uses ony "as character" and "to character" anchorings which are translatable to docx (and deliberately avoids the "to paragraph" anchoring which is NOT translateable to docx format)

Steps to Reproduce:
1. `frames.odt`: This file uses anchoring which are "docx" compatible i.e., it uses only "as character" and "to character" anchoring.
2. `frames.docx`:  This is the docx version of `frames.odt`


Actual Results:
The `frames.odt` and `frames.docx` should be laid out the same way.

Expected Results:
The `frames.odt` and `frames.docx` are laid out differently.  See the attached annotation in attached screenshot for details.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.2.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.16; UI render: default; VCL: x11
Locale: en-IN (en_IN); UI: en-US
Debian package version: 1:7.3.1-1
Calc: threaded


$ dpkg -l | grep writer
ii  libreoffice-writer                                 1:7.3.1-1                          amd64        office productivity suite -- word processor
Comment 1 Jambunathan K 2022-04-21 14:11:48 UTC
Created attachment 179709 [details]
frames.odt:  This file uses only "as-char" and "to char" anchorings
Comment 2 Jambunathan K 2022-04-21 14:12:43 UTC
Created attachment 179710 [details]
frames.docx:  This is what you get when you save `frames.odt` to `docx` format
Comment 3 Jambunathan K 2022-04-21 14:17:26 UTC
Created attachment 179711 [details]
to-char-anchoring: difference-in-layout-between-odt-and-docx.png:  Note the difference in layout between ODT and DOCX version

to-char-anchoring: difference-in-layout-between-odt-and-docx.png:  Note the difference in layout between ODT and DOCX version.  

The ODT and DOCX files are shown side-by-side using a tiling window manager `EXWM` in this case. 

See image annotations for more details.
Comment 4 Jambunathan K 2022-04-21 14:18:39 UTC
Created attachment 179712 [details]
Outer Frame Config.png:  This frame limits the paragraph width to 7.1cm or so
Comment 5 Jambunathan K 2022-04-21 14:23:55 UTC
Created attachment 179713 [details]
Config of Frame Containing Text "(1)".png:  This frame is positioned to the "right" of "paragraph text area"

Config of Frame Containing Text "(1)".png:  This frame is positioned to the "right" of "paragraph text area".

This frame gets pushed to the extreme right in the DOCX file.  Note the position of this frame in ODT and DOCX files.
Comment 6 Jambunathan K 2022-04-21 14:29:59 UTC
Link for submitter's eyes only: https://github.com/kjambunathan/org-mode-ox-odt/issues/177
Comment 7 Jambunathan K 2022-04-23 02:12:19 UTC Comment hidden (obsolete)
Comment 8 Timur 2022-05-04 14:52:02 UTC
Repro 7.4+. 
It is a result of 2 commits, in 4.3 and in 4.4. Now, I can bibisect 4.4.

In 4.4: 
commit 64c8b13f248fe7ea3808c7f8e62d0d656f170378
    commit d379d18666aa42031359ca8eb34b0021960347ae  (known commit with Meta bug) 
    pre source-hash-8e67a7796f598de2f11b694542bccb48343f0d9a
    Author:     Miklos Vajna <vmiklos@collabora.co.uk>
    oox: import WPS shape with text as shape with textbox
Comment 9 QA Administrators 2024-05-24 03:17:21 UTC
Dear Jambunathan K,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug