Bug 87569 - FILEOPEN: Incorrect layout of table in DOCX file
Summary: FILEOPEN: Incorrect layout of table in DOCX file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.6.3 release
Hardware: Other All
: medium normal
Assignee: Bakos Attila (NISZ)
URL:
Whiteboard: target:6.5.0 target:6.4.0.2
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2014-12-21 23:00 UTC by Robert Markowitz
Modified: 2019-12-20 17:00 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Business Cards in a 2 column table (49.32 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-12-24 15:51 UTC, Robert Markowitz
Details
Screen Shot from Word 2010 (140.58 KB, image/jpeg)
2014-12-24 21:58 UTC, Robert Markowitz
Details
Screen Shot from Libre Office (112.68 KB, image/jpeg)
2014-12-24 22:05 UTC, Robert Markowitz
Details
Half Calibri Light and Half original fonts (49.58 KB, application/zip)
2014-12-28 18:11 UTC, Robert Markowitz
Details
Libreoffice 5.0.0.5 (72.99 KB, image/jpeg)
2015-08-19 09:57 UTC, Xisco Faulí
Details
ScreenchotOfTheSampleFileBeforeAndAfterThePatch (238.18 KB, image/png)
2019-12-20 08:00 UTC, Bakos Attila (NISZ)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Markowitz 2014-12-21 23:00:37 UTC

    
Comment 1 Robinson Tryon (qubit) 2014-12-24 04:32:39 UTC
(In reply to Robert Markowitz from comment #0)
> 

Shortest bug report ever! :-)

Robert: Please provide some more information about this problem (and perhaps include an example file), then change status back to UNCONFIRMED.

Thanks!
Comment 2 Robert Markowitz 2014-12-24 15:51:59 UTC
Created attachment 111293 [details]
Business Cards in a 2 column table

The attached is a two column table of business cards. When I try to open it in Libre Office only the left column contains data. The right column is blank. It should be the same as the left column giving me 10 business cards in total.
Comment 3 Robinson Tryon (qubit) 2014-12-24 20:08:36 UTC
Comment on attachment 111293 [details]
Business Cards in a 2 column table

fix mimetype
Comment 4 Robinson Tryon (qubit) 2014-12-24 20:10:23 UTC
(In reply to Robert Markowitz from comment #2)
> 
> The attached is a two column table of business cards. When I try to open it
> in Libre Office only the left column contains data. The right column is
> blank. It should be the same as the left column giving me 10 business cards
> in total.

Hi Robert,
The layout of the given document does look a little off when I test in a 4.5 (master) build. Could you please attach a screenshot of how the document appears in MS-Word? Thanks!

(change status back to UNCONFIRMED after you attach the file, please)

Status -> NEEDINFO
Comment 5 Robert Markowitz 2014-12-24 21:58:40 UTC
Created attachment 111299 [details]
Screen Shot from Word 2010
Comment 6 Robert Markowitz 2014-12-24 22:05:34 UTC
Created attachment 111300 [details]
Screen Shot from Libre Office

I have attached screenshots of the file from both Word 2010 (my wife's computer), and Libre Office (my computer).

Hope this helps.
Comment 7 Robinson Tryon (qubit) 2014-12-25 06:58:00 UTC
(In reply to Robert Markowitz from comment #5)
> Created attachment 111299 [details]
> Screen Shot from Word 2010

(In reply to Robert Markowitz from comment #6)
> Created attachment 111300 [details]
> Screen Shot from Libre Office

Yes, I CONFIRM that the screenshot in LibreOffice looks similar to the layout I saw in LO 4.5 (master), and that the overall layout looks very different in Word 2010.

Status -> NEW
Comment 8 Robert Markowitz 2014-12-25 15:14:37 UTC
I'm not sure where that leaves us. Is it my problem or yours? If it's mine what do I need to do to fix it?
Comment 9 Robinson Tryon (qubit) 2014-12-26 18:21:31 UTC
(In reply to Robert Markowitz from comment #8)
> I'm not sure where that leaves us. Is it my problem or yours? If it's mine
> what do I need to do to fix it?

Robert: My guess is that there is a layout issue in the way that we interpret this document in LibreOffice, and a developer will hopefully find time soon to look at the results of your tests and see what we need to do to more faithfully recreate the same layout.

It's possible that the fonts used in the document have some impact on the layout. Could you please try using one of the fonts that we ship with LibreOffice in the docx ?  (e.g. Liberation Serif). I'd be interested to see if that helps to harmonize layout between Writer and Word.
Comment 10 Robert Markowitz 2014-12-28 18:11:54 UTC
Created attachment 111433 [details]
Half Calibri Light and Half original fonts

I changed the font on the upper half (okay 60%) to Calibri Light which is in the list of fonts supported by Libre Office. As you can see, it didn't help.
Comment 11 Robert Markowitz 2015-03-17 01:03:08 UTC Comment hidden (obsolete)
Comment 12 Robinson Tryon (qubit) 2015-03-19 04:09:58 UTC Comment hidden (obsolete)
Comment 13 Matthew Francis 2015-04-10 12:33:04 UTC
This appears to have had better layout before the below commit.
Adding Cc: to cedric.bosdonnat@free.fr; Could you possibly take a look at this one? Thanks

commit 0f581ab761cefde208e576661850b57f2846fdb4
Author: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Date:   Mon Sep 24 18:01:05 2012 +0200

    n#779627: VML: import mso-position-vertical:center and friends
    
    This allows to properly position objects that are vertically and/or
    horizontally centered relatively to the page.
    
    Change-Id: I1f7e78c5b828679817cdfc72e4d90a0850b242fa
Comment 14 Xisco Faulí 2015-08-19 09:57:04 UTC
Created attachment 118017 [details]
Libreoffice 5.0.0.5

This issue is still reproducible with Libreoffice 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: es-ES (es_ES).

Besides, right colored dots aren't displayed in this version as in previous ones.
Comment 15 Xisco Faulí 2015-11-23 12:16:20 UTC Comment hidden (obsolete)
Comment 16 Robinson Tryon (qubit) 2015-12-13 12:15:50 UTC Comment hidden (obsolete)
Comment 17 Telesto 2016-12-05 21:35:22 UTC
This issue is still present in 
Version: 5.4.0.0.alpha0+
Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05
Locale: nl-NL (nl_NL); Calc: CL
Comment 18 Xisco Faulí 2017-07-13 10:23:15 UTC Comment hidden (obsolete)
Comment 19 Robert Markowitz 2017-07-13 13:10:41 UTC Comment hidden (obsolete)
Comment 20 QA Administrators 2018-07-14 02:46:04 UTC Comment hidden (obsolete)
Comment 21 Justin L 2018-08-11 17:26:49 UTC
This is still a problem in 6.2 master, images anchored in table cells use document margin, not cell margin to establish their placement (or something like that). A very problematic and regression-prone area to dabble in...
Comment 22 Robert Markowitz 2019-12-18 15:01:07 UTC
As you can see from the history, I notified you of this problem 5 years ago. I've received occasional comments in technical jargon that I don't understand. Frankly, I've given up on you guys altogether.

Since it looks like the subject may now be resurrected, can someone tell me, in English, exactly what the status is, and if there is any hope of it getting resolved? 

You have to remember that you may all be techies and understand your correspondence, but you made the product available to the public. Therefore, you should be able to discuss problems with your public in a jargon free manner.
Comment 23 Robert Markowitz 2019-12-18 15:01:56 UTC Comment hidden (obsolete)
Comment 24 Commit Notification 2019-12-20 07:04:49 UTC
Bakos Attila committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/10f29d8bf05d44ca8bc11d34d1294ec17f8ac0f1

tdf#87569 tdf#109411 DOCX import: fix shape anchor in tables

It will be available in 6.5.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 25 Bakos Attila (NISZ) 2019-12-20 08:00:39 UTC
Created attachment 156685 [details]
ScreenchotOfTheSampleFileBeforeAndAfterThePatch
Comment 26 Bakos Attila (NISZ) 2019-12-20 08:17:17 UTC
(In reply to Robert Markowitz from comment #22)
> As you can see from the history, I notified you of this problem 5 years ago.
> I've received occasional comments in technical jargon that I don't
> understand. Frankly, I've given up on you guys altogether.
> 
> Since it looks like the subject may now be resurrected, can someone tell me,
> in English, exactly what the status is, and if there is any hope of it
> getting resolved? 
> 
> You have to remember that you may all be techies and understand your
> correspondence, but you made the product available to the public. Therefore,
> you should be able to discuss problems with your public in a jargon free
> manner.

Hello,

I try to describe the problem with jargon-free: In the document what you have uploaded, the objects (the textboxes, shapes, pictures, etc.) have the setting in Word, to be positioned to the page what the LibreOffice done. However, the Word in spite of the setting, positioned the objects from the cells, so that is why the two program rendered differently the file. Now, with the patch, the objects -- if they are have this setting and they are in a table too -- are positioned to the cell instead of page. This will be avialable in the 6.5 and maybe in the 6.4 releases, so if you download the latest test version the 6.5, you can test it if you want.  I hope I helped a bit. :)
Comment 27 Xisco Faulí 2019-12-20 09:47:50 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: dee81fb2e1df5091702b3c8b0e4a3f2b58e89291
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

@Bakos Attila, thanks for fixing this issue!!
Comment 28 Bakos Attila (NISZ) 2019-12-20 10:21:57 UTC
(In reply to Xisco Faulí from comment #27)
> Verified in
> 
> Version: 6.5.0.0.alpha0+
> Build ID: dee81fb2e1df5091702b3c8b0e4a3f2b58e89291
> 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
> 
> @Bakos Attila, thanks for fixing this issue!!

Thanks for verifing it!
Comment 29 Commit Notification 2019-12-20 17:00:28 UTC
Bakos Attila committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#87569 tdf#109411 DOCX import: fix shape anchor in tables

It will be available in 6.4.0.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.