Bug 55462 - FILEOPEN DOCX/RTF Table FORMATTING messed
Summary: FILEOPEN DOCX/RTF Table FORMATTING messed
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:3.7.0 target:3.6.3
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-09-30 08:56 UTC by Korrawit Pruegsanusak
Modified: 2013-01-09 14:08 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot: buggy formatting (38.81 KB, image/png)
2012-10-01 09:28 UTC, Korrawit Pruegsanusak
Details
screenshot: buggy formatting (38.81 KB, image/png)
2012-10-01 09:29 UTC, Korrawit Pruegsanusak
Details
screenshot: buggy formatting (135.20 KB, image/jpeg)
2012-10-01 09:32 UTC, Korrawit Pruegsanusak
Details
screenshot: buggy formatting (38.81 KB, image/png)
2012-10-01 09:50 UTC, Korrawit Pruegsanusak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Korrawit Pruegsanusak 2012-09-30 08:56:59 UTC
Table formatting messed in recent master.

* Open attachment 64325 [details]
* Compare it with attachment 64326 [details]

Since Sep 24 daily build on Windows XP, and in my master build Sep 29 on Linux.
Details will come later.
Comment 1 Korrawit Pruegsanusak 2012-10-01 09:28:08 UTC
Created attachment 67913 [details]
screenshot: buggy formatting
Comment 2 Korrawit Pruegsanusak 2012-10-01 09:29:37 UTC
Created attachment 67914 [details]
screenshot: buggy formatting

screenshot again ...
Comment 3 Korrawit Pruegsanusak 2012-10-01 09:32:57 UTC
Created attachment 67917 [details]
screenshot: buggy formatting
Comment 4 Korrawit Pruegsanusak 2012-10-01 09:50:46 UTC
Created attachment 67918 [details]
screenshot: buggy formatting

Bah, Bugzilla cut off first 4 bytes from .png image, and first 3 bytes from .jpg image. Trying again ...
Comment 5 Korrawit Pruegsanusak 2012-10-01 09:53:13 UTC
Hello Michael,
I've done git bisect and, unfortunately, your commit introduced this bug.
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6d2e09db4a677068095b0bebd08fbbb96620d60c

Could you please have a look here? Thanks :-)
Comment 6 Stephan van den Akker 2012-10-01 11:11:51 UTC
This problem does not occur when imported as .doc, just when importing as .docx.
Comment 7 Michael Stahl (allotropia) 2012-10-04 13:17:02 UTC
thanks Korrawit for finding that!

i realize now that my fix is totally wrong, because i
misunderstood how covered cells are represented in writer tables:

there is only a dummy TableBox with negative span for
vertically merged cells, but not for horizontally merged cells,
so it is valid for a table to have different number
of TableBoxes in eaach row.

need to think of a different solution for the original
problem that some part of the table was apparently not
covered by a cell...
Comment 8 Not Assigned 2012-10-04 18:01:47 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4113d9664c60d004474dfc1cffbcd7dc50fa6dc4

rhbz#820283, fdo#55462: sw: better fix for DOCX table import crash:



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Stephan van den Akker 2012-10-05 10:35:25 UTC
Just tested with LO-master version 3.7.0.0.alpha0+ (Build ID: b29ecc9)

The merged horizontal cells problem seems to be solved. Thanks, Michael!

Testing with attachment 64325 [details] shows that not all formatting problems are solved, however. In the second table not all cell boundary lines are drawn, content of some of the lower cells is lost and the light blue background object is placed on top, hiding some of the table content.

Importing the same document as DOC works much better.

I'll leave it up to Korrawit to decide whether he agrees about this bug being fixed.
Comment 10 Not Assigned 2012-10-07 20:42:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=314f92b0da54085499ea06e7ee53bef4b27181db&g=libreoffice-3-6

rhbz#820283, fdo#55462: sw: better fix for DOCX table import crash:


It will be available in LibreOffice 3.6.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 Korrawit Pruegsanusak 2012-10-17 11:08:26 UTC
Sorry for the late reply.

@Michael, Thanks for fixing.

@Stephan, Thanks for testing and noticing another bug with detailed description. Anyway, it is reported at bug 54660. So, this bug is, IMHO, fixed.

Thanks again for both of you!