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)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
Depends on:
Blocks: CJK DOC Text-Grid
  Show dependency treegraph
 
Reported: 2015-01-23 16:03 UTC by Andras Timar
Modified: 2018-11-26 07:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


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

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...

http://opengrok.libreoffice.org/xref/core/sw/source/filter/ww8/ww8par6.cxx#210
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
Yes, still seeing this with LibreOffice 5.4.2.2.
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
Yes, this is still there in Version: 6.1.3.2.