Bug 88752 - DOC import: text grid size mismatch
Summary: DOC import: text grid size mismatch
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
Keywords: filter:doc
Depends on:
Blocks: CJK DOC Text-Grid
  Show dependency treegraph
Reported: 2015-01-23 16:03 UTC by Andras Timar
Modified: 2021-11-27 07:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:
Regression By:

bugdoc (DOC) (45.00 KB, application/msword)
2015-01-23 16:03 UTC, Andras Timar

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2015-01-23 16:03:48 UTC
Created attachment 112730 [details]
bugdoc (DOC)

The attached document has a table, which should fit in the first column of page 1 (as in Word). It does not fit, because it has text grid switched on, and line height of text grid is bigger in Writer that it is in Word. 

I found the relevant code location, but I do not know how to interpret values from the doc better. nLinePitch*=0.9 worked well, but...

Comment 1 Andras Timar 2015-01-23 16:05:17 UTC
@Caolán: could you please advise?
Comment 2 Caolán McNamara 2015-01-26 13:50:49 UTC
Back in the day when we first implemented the text grid I suggested we should have the same text grid rules as word (whatever they are) for ease of interoperability, but the powers that be said they wanted a text-grid that was "better" than words and so we have different rules for it, which is a frustrating nightmare.

The table confuses things, but if you remove it and compare word against writer for 15 lines per page (writer: format page->text grid with cjk features enabled word: page setup->document grid) and put 15 lines into word and writer for this doc then word fits 15 lines into the page and writer fits 14.

I remember just giving up and settings things so that the numbers are the same in word and writer wrt lines per page and base text size. I don't think it's as simple as just scaling the font size by 0.9 (but maybe it is) https://wiki.openoffice.org/w/images/1/1c/Text_Grid_Enhancement_for_CJK.odt which has some details on what's wrong with our grid that *might* be useful.

You probably need to find the code in writer that calculates the grid and see how it calculates it in order to feed it numbers that will make it behave like word. It might be that to get the same layout as word you have to add/subtract page margins and/or header/footer heights or something like that.
Comment 3 QA Administrators 2016-09-20 09:37:14 UTC Comment hidden (obsolete)
Comment 4 Gerald Pfeifer 2017-11-25 16:32:01 UTC Comment hidden (obsolete)
Comment 5 QA Administrators 2018-11-26 03:36:15 UTC Comment hidden (obsolete)
Comment 6 Gerald Pfeifer 2018-11-26 07:19:11 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2019-11-27 03:45:15 UTC Comment hidden (obsolete)
Comment 8 Gerald Pfeifer 2019-11-27 10:50:53 UTC
Yes, this is still there.

Build ID: 122468bf97f1ea456274991103a13489b8d5df58
CPU threads: 4; OS: Linux 5.3; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-11-22_13:38:19
Comment 9 QA Administrators 2021-11-27 04:31:07 UTC Comment hidden (obsolete)
Comment 10 Collabora Productivity Ltd 2021-11-27 07:36:09 UTC
Yes, the bug is there.
Version: / LibreOffice Community
Build ID: 20(Build:1)
CPU threads: 12; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: hu-HU (en_US.UTF-8); UI: en-US
Calc: threaded