Bug 125872 - Text blocks and images are misplaced opening DOC with diseases
Summary: Text blocks and images are misplaced opening DOC with diseases
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.6.3 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: OOXML-Shapes DOCX-Textbox
  Show dependency treegraph
 
Reported: 2019-06-12 08:18 UTC by Mark Palmos
Modified: 2023-06-08 15:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
MSOffice document and screen shot in a zip file (155.86 KB, application/x-zip-compressed)
2019-06-12 08:20 UTC, Mark Palmos
Details
DOCX compared in MSO and older LO (184.76 KB, image/png)
2020-03-20 14:18 UTC, Timur
Details
The example file (54.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-03 12:52 UTC, NISZ LibreOffice Team
Details
Minimized test document in docx format (22.14 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-09-03 13:27 UTC, NISZ LibreOffice Team
Details
The minimized example file in Word and Writer (103.00 KB, image/png)
2020-09-03 13:33 UTC, NISZ LibreOffice Team
Details
The minimized example file in Word and Writer (69.50 KB, image/png)
2020-09-28 12:51 UTC, Balázs Regényi
Details
The minimized document with line shapes in current Writer and Word (98.66 KB, image/png)
2021-06-15 12:11 UTC, NISZ LibreOffice Team
Details
The original document in current Writer and Word (158.80 KB, image/png)
2021-06-15 12:19 UTC, NISZ LibreOffice Team
Details
Example file with images aligned to line (123.14 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-06-15 12:22 UTC, NISZ LibreOffice Team
Details
The example file in Word and Writer (258.66 KB, image/png)
2021-06-15 12:29 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Palmos 2019-06-12 08:18:10 UTC
Description:
See the image and document at https://videoblurb.com/temp/MSWord_text_box_NG.zip

The image shows the problem where text boxes and associated arrows are rendered on page 2, completely away from the main image they are meant to be annotating... This happens every time, and works fine with MS Word and Google Docs.

Steps to Reproduce:
1. open the document

Actual Results:
Arrows and text boxes are moved to page 2 but should be on page 1 to annotate the main drawing of the man.

Expected Results:
arrows are as seen in Google Docs on RH side of image.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-GB
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes
Comment 1 Mark Palmos 2019-06-12 08:20:52 UTC
Created attachment 152122 [details]
MSOffice document and screen shot in a zip file

Thank you.
Comment 2 Dieter 2019-06-12 14:25:58 UTC
I confirm it with

Version: 6.2.4.2 (x64)
Build-ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded

and

Version: 6.4.0.0.alpha0+ (x64)
Build ID: b170256fb6ebaf774b02b89835b19d9f3a1afb89
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-06-07_03:30:35
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

in comparison with MS Word 2016

Problems with arows are related to or are perhaps duplicates of bug 114975 and bug 123615.

Problem with textboxes is perhaps related to or is a duplicate of bug 78671
Comment 3 Timur 2020-03-20 14:18:05 UTC
Created attachment 158836 [details]
DOCX compared in MSO and older LO

When reporting, it's bad practice to attach zip.

This was never OK from OO to 7.0+, but was changed few times.
Comment 4 NISZ LibreOffice Team 2020-09-03 12:52:09 UTC
Created attachment 165088 [details]
The example file

The arrows on the first page are positioned horizontally with absolute position value from margin (this looks imported correctly) and vertically with absolute position value "below line". This looks incorrectly imported.
Comment 5 NISZ LibreOffice Team 2020-09-03 13:27:09 UTC
Created attachment 165090 [details]
Minimized test document in docx format
Comment 6 NISZ LibreOffice Team 2020-09-03 13:33:16 UTC
Created attachment 165092 [details]
The minimized example file in Word and Writer

Version: 7.1.0.0.alpha0+ (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

Positioning values seem to be imported correctly, but the actual placing that happens looks quite different from Word.
Comment 7 Balázs Regényi 2020-09-28 12:51:05 UTC Comment hidden (off-topic)
Comment 8 NISZ LibreOffice Team 2021-06-15 12:11:21 UTC
Created attachment 172912 [details]
The minimized document with line shapes in current Writer and Word

The minimized document looks good now in:

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 93a3e2f86c27b06062708fe788963a0e49f3a90b
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

The original still has some problems.
Comment 9 NISZ LibreOffice Team 2021-06-15 12:19:32 UTC
Created attachment 172913 [details]
The original document in current Writer and Word

The human body outline is an image, also vertically aligned to the line.
The shapes position got better, the images did not yet.
Comment 10 NISZ LibreOffice Team 2021-06-15 12:22:22 UTC
Created attachment 172914 [details]
Example file with images aligned to line
Comment 11 NISZ LibreOffice Team 2021-06-15 12:29:55 UTC
Created attachment 172915 [details]
The example file in Word and Writer

The top ship image is aligned to Top relative to line, this is imported correctly.
The cat image is aligned Centered relative to line, this is imported as Top to Line of text.
The dog image is aligned Bottom relative to line, this is imported as Top to Line of text.
The bottom ship image is aligned as 1 cm below line, this is imported as From bottom by 1 cm to Line of text. 

This is similar to the human body outline images layout in the original document and should be imported as -1 cm to Line of text to get a placement macthing Words.

This was implemented for shapes - but not for images - in commit:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=2f21e4f357ec60450df84ddd858c3cf0a4711b02

tdf#139915 DOCX import: fix anchored obj position with to-char and TEXT_LINE
Comment 12 Justin L 2023-06-08 15:37:34 UTC
repro 7.6