Bug 90408 - FILEOPEN FORMATTING Ms Word (.doc) table improper cell formatting (fontsize changed by field widget)
Summary: FILEOPEN FORMATTING Ms Word (.doc) table improper cell formatting (fontsize c...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Justin L
URL:
Whiteboard: target:7.6.0
Keywords: filter:doc
Depends on:
Blocks: DOC-Tables
  Show dependency treegraph
 
Reported: 2015-04-02 10:08 UTC by Michail Pappas
Modified: 2023-05-20 19:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample doc file (55.50 KB, application/msword)
2015-04-02 10:08 UTC, Michail Pappas
Details
File on MS Word 1/2 (343.91 KB, image/jpeg)
2015-04-02 10:10 UTC, Michail Pappas
Details
File on MS Word 2/2 (308.66 KB, image/jpeg)
2015-04-02 10:10 UTC, Michail Pappas
Details
File on LibO 1/2 (318.05 KB, image/jpeg)
2015-04-02 10:10 UTC, Michail Pappas
Details
File on LibO 2/2 (311.17 KB, image/jpeg)
2015-04-02 10:11 UTC, Michail Pappas
Details
LibO 3.3 (on the left) rendering better than 5.0.5 (on the right) (164.96 KB, image/png)
2016-04-17 13:17 UTC, Michail Pappas
Details
LibO 3.3 (on the left) eating the same line as 5.0.5 (on the right) (157.58 KB, image/png)
2016-04-17 13:17 UTC, Michail Pappas
Details
tdf90408_fontsizeChanged.doc: minimal example where fontsize goes from 10 to 12 (34.00 KB, application/msword)
2020-04-21 13:38 UTC, Justin L
Details
macrobutton.doc: the original that comment 14's patch was trying to solve. (21.50 KB, application/msword)
2023-05-20 17:25 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michail Pappas 2015-04-02 10:08:49 UTC
Created attachment 114549 [details]
Sample doc file

At work we use MS Office to process certain document templates prepared from other government bodies. MS Office used is 2002 (or 2003). 

There appear to be serious problems when displaying the same files on LibO 4.3.5 (as well as 4.3.6): although some table cells look good, others make text "disappear".

We have attached one of these .doc files and also include screenshots on how the files look on both MS WOrd as well as on LibO.

Table formatting seems to be a rather serious issue on LibO. Unfortunately, examining the other bugs listed here I can not really tell if this one is a duplicate or not.
Comment 1 Michail Pappas 2015-04-02 10:10:03 UTC
Created attachment 114550 [details]
File on MS Word 1/2
Comment 2 Michail Pappas 2015-04-02 10:10:23 UTC
Created attachment 114551 [details]
File on MS Word 2/2
Comment 3 Michail Pappas 2015-04-02 10:10:44 UTC
Created attachment 114552 [details]
File on LibO 1/2
Comment 4 Michail Pappas 2015-04-02 10:11:06 UTC
Created attachment 114553 [details]
File on LibO 2/2
Comment 5 A (Andy) 2015-04-02 20:52:14 UTC
Reproducible with LO 4.4.1.2, Win 8.1.

-> The grey frames are not visible.
Comment 6 Matthew Francis 2015-04-04 11:04:22 UTC
This looks much the same all the way back to LO 3.3.0 - presumably there is an issue here with font metric compatibility / line spacing

-> Version: Inherited from OOo
Comment 7 Michail Pappas 2015-04-14 06:19:24 UTC
(In reply to A (Andy) from comment #5)
> Reproducible with LO 4.4.1.2, Win 8.1.
> 
> -> The grey frames are not visible.

The main issue for us is not the visibility of the grey frames, but rather that the cell contents are not entirely visible when opening with LibO. That is, the user has to manually adjust cell height in order for the cell content to become visible.
Comment 8 tommy27 2016-04-16 07:27:48 UTC Comment hidden (noise)
Comment 9 Michail Pappas 2016-04-17 13:17:17 UTC
Created attachment 124429 [details]
LibO 3.3 (on the left) rendering better than 5.0.5 (on the right)
Comment 10 Michail Pappas 2016-04-17 13:17:49 UTC
Created attachment 124430 [details]
LibO 3.3 (on the left) eating the same line as 5.0.5 (on the right)
Comment 11 Michail Pappas 2016-04-17 13:18:23 UTC
(In reply to tommy27 from comment #8)
> Test to see if the bug is still present on a currently supported version of
> LibreOffice (5.0.5 or 5.1.2 https://www.libreoffice.org/download/
> 
> If the bug is present, please leave a comment that includes the version of
> LibreOffice and your operating system, and any changes you see in the bug
> behavior

The bug is still present on 5.0.5. Operating system is Windows 10 64-bit, Libreoffice is 5.0.5.2 (32-bit).

> If you want to do more to help you can test to see if your issue is a
> REGRESSION. To do so: 
> [...]
> 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

I installed 3.3 on a Windows 7 VM. Comparing 3.3 and 5.0.5.2, one can see that formatting is better on the older version. See attachment "LibO 3.3 rendering better than 5.0.5.png". However, on some cells the cell contents are truncated on both versions, see "LibO 3.3 eating the same line as 5.0.5.png"

Hence, I will set version to "inherited from OOo". I have uploaded a couple of screenshots
Comment 12 QA Administrators 2018-10-02 02:57:02 UTC Comment hidden (noise)
Comment 13 Justin L 2020-04-21 13:38:30 UTC
Created attachment 159786 [details]
tdf90408_fontsizeChanged.doc: minimal example where fontsize goes from 10 to 12

The big problem here is that after these gray macrobutton widgets, the fontsize changes from 10 to 12.

When I export this to DOCX, I can see that the text is littered with fontsize 10, so there shouldn't be a good excuse for changing the fontsize...
Comment 14 Justin L 2020-04-21 14:50:46 UTC
Seems to be related to this commit:
commit a79a0101f114e0fcac40503220c5d34750124367
Author: Oliver Bolte on Date:   Wed Jul 18 13:46:57 2007 +0000
    INTEGRATION: CWS swqbf100 (1.102.50); FILE MERGED
    2007/07/09 13:31:57 hbrinkm 1.102.50.1: #i79169# save attributes of macrobutton text and apply them to the macrobutton field
Comment 15 QA Administrators 2022-07-26 03:29:38 UTC Comment hidden (noise)
Comment 16 Commit Notification 2023-04-05 14:54:16 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

sw: fix crashtesting assert on tdf90408-1.doc

It will be available in 7.6.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 17 Justin L 2023-05-19 13:23:29 UTC
using comment 13's example, I repro 7.6+.

I noticed the "boxes" are using PUA U+f06f, so the actual character shown is irrelevant since this is a "personal use area" for that specific font (Times New Roman).

In general, I think OP's document looks pretty good now. When MS Word 2010 round-trips it to DOCX, then LO opens the DOCX fine - everything is in 10pt font.
Comment 18 Justin L 2023-05-20 17:25:25 UTC
Created attachment 187412 [details]
macrobutton.doc: the original that comment 14's patch was trying to solve.

It looks like a simple revert is in order. The bug document that triggered this patch now works fine without it.
Comment 19 Commit Notification 2023-05-20 19:35:17 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/02c56a8d3ea86f28ffbdd645f83d1d4de2b56bea

tdf#90408 Revert #i79169# save/apply attributes of macrobutton text

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