Bug 124423 - FILEOPEN DOCX Text frame content appears on the left side of document
Summary: FILEOPEN DOCX Text frame content appears on the left side of document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.3 release
Hardware: All All
: medium normal
Assignee: Attila Szűcs
URL:
Whiteboard: target:7.1.0
Keywords: filter:docx
Depends on:
Blocks: DOCX-Frames
  Show dependency treegraph
 
Reported: 2019-03-29 12:53 UTC by NISZ LibreOffice Team
Modified: 2020-07-22 06:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file (30.07 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-03-29 12:55 UTC, NISZ LibreOffice Team
Details
Screenshot (75.20 KB, image/png)
2019-03-29 12:56 UTC, NISZ LibreOffice Team
Details
More exploratory example doc from Word 13 (12.29 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-07-01 12:35 UTC, NISZ LibreOffice Team
Details
Screenshot of the exploratory document in Word (101.99 KB, image/png)
2020-07-01 12:36 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-03-29 12:53:26 UTC
Description:
In Microsoft Word there is a text frame located margin to margin. In Writer the position of left edge is the same, but the right edge moves to left. The frame fits to content.

Steps to Reproduce:
    1. Open the attached DOCX file in LibreOffice Writer.
    2. Open a copy in Microsoft Word.
    3. Compare the original file opened in Writer and Word.
    4. View the attached screenshot.
    5. Notice, that text frame content appears on the left side of document

Actual Results:
Text frame content appears on the left side of document when the document is opened in LibreOffice Writer 6.3.0.0.alpha0+.

Expected Results:
Text frame content  should have the same position as the original file when the document is opened in Microsoft Word.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.3.0.0.alpha0+
Build ID: ade1df0948563b532a5d293c31d46a4f042559ee
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735 

Verzió: 4.0.0.3 (Build az.: 7545bee9c2a0782548772a21bc84a9dcc583b89) 

Verzió: 4.4.7.2
Build az.: f3153a8b245191196a4b6b9abd1d0da16eead600
Területi beállítások: hu_HU 

Verzió: 5.2.0.4
Build az.: 066b007f5ebcc236395c7d282ba488bca6720265
CPU szálak: 4; Rendszer verziója: Windows 6.2; Felületmegjelenítés: GL; 
Területi beállítások: hu-HU (hu_HU)
Comment 1 NISZ LibreOffice Team 2019-03-29 12:55:51 UTC
Created attachment 150392 [details]
Test file
Comment 2 NISZ LibreOffice Team 2019-03-29 12:56:22 UTC
Created attachment 150393 [details]
Screenshot
Comment 3 mulla.tasanim 2019-03-30 07:56:54 UTC
Thank you for reporting the bug.

I can confirm that the bug is present in

Version: 6.2.1.2 (x64)
Build ID: 7bcb35dc3024a62dea0caee87020152d1ee96e71
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: en-US (en_US); UI-Language: en-US
Calc: CL


Version: 6.3.0.0.alpha0+ (x64)
Build ID: 91cdf22b88a4f7bec243c8fb187627e766d3294c
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-03-08_00:38:10
Locale: en-US (en_US); UI-Language: en-US
Calc: CL
Comment 4 Xisco Faulí 2019-10-22 10:37:16 UTC
Still reproducible in

Version: 6.4.0.0.alpha1+
Build ID: de4839e66d3d195315729b95cc144cdab96b6e74
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 NISZ LibreOffice Team 2020-06-05 12:02:48 UTC
Looks like the frame here has both its horizontal and vertical size set as automatic, which is imported correctly as seen in the properties dialog.

However Writer tries to minimize the horizontal size of the automatic width frame, while Word seems to maximize it.
Comment 6 NISZ LibreOffice Team 2020-07-01 12:35:31 UTC
Created attachment 162557 [details]
More exploratory example doc from Word 13

More cases...
Auto width is maximized to column width, if the text is multiple paragraphs long or one paragraph that is longer than column width.
If the text is 1 paragraph and shorter than column width, then auto width is minimized to the text length.

This is shown here with 3, 2 and 1 column sections.
Comment 7 NISZ LibreOffice Team 2020-07-01 12:36:50 UTC
Created attachment 162558 [details]
Screenshot of the exploratory document in Word
Comment 8 Commit Notification 2020-07-15 09:56:49 UTC
Attila Szűcs committed a patch related to this issue.
It has been pushed to "master":

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

tdf#124423 sw: fix AutoSize width frames of DOCX

It will be available in 7.1.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 9 László Németh 2020-07-15 09:58:15 UTC
Note: it doesn't need to add compatibility option to the UI, because AutoSize width frames created in Writer always exported as fixed width text boxes, i.e. their width don't change in Word.