Download it now!
Bug 49271 - [RTF] regression; unneeded page break after 4th line of text
Summary: [RTF] regression; unneeded page break after 4th line of text
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.2 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:3.6.0
Keywords: filter:rtf, regression
Depends on:
Blocks:
 
Reported: 2012-04-29 05:32 UTC by Valek Filippov
Modified: 2015-12-17 12:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
document with a problem (316.62 KB, application/rtf)
2012-04-29 05:32 UTC, Valek Filippov
Details
screenshot in winword2003 (41.35 KB, image/png)
2012-04-29 05:33 UTC, Valek Filippov
Details
should be all 25pt font (11.29 KB, application/rtf)
2012-05-08 04:52 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2012-04-29 05:32:53 UTC
Created attachment 60766 [details]
document with a problem

lowriter 3.5.2 adds page break after 4th line.
I've checked with OO.org 3.0.1, it worked fine.
Comment 1 Valek Filippov 2012-04-29 05:33:48 UTC
Created attachment 60767 [details]
screenshot in winword2003
Comment 2 Cody 2012-04-29 13:26:16 UTC
The results were reproducible. Also see bug 48490 for additional information.
Comment 3 Elton Chung 2012-04-30 06:35:57 UTC
Bug reproducible in 3.5.0 but not in 3.4.0 to 3.4.6.
So this regression happens between 3.4 branching and 3.5 branching.
Comment 4 Jean-Baptiste Faure 2012-04-30 12:44:26 UTC
Each numbered paragraph has the style "Heading 1" which has the attribute "keep with the next paragraph". This explain why you must have a page break before the fisrt heading.
It seems that this is a side effect of some change between LO 3.3 and LO 3.5 regarding the characters spacing or the font fallback: the used font in the bugdoc (Times New Roman CYR) is not installed on my PC and if I force the replacement of this font by Liberation Serif then the table of contents have enough room in the first page.

Miklos: please have a look. Feel free to reassign if you can't handle this issue.

Best regards. JBF
Comment 5 Urmas 2012-04-30 21:08:26 UTC
The "font" Times New Roman CYR is a bug by itself. It should be mapped to plain Times New Roman.
Comment 6 Miklos Vajna 2012-05-02 03:03:02 UTC
Indeed, it seems that "Times New Roman CYR" is a non-existing font, Word uses "Times New Roman" instead, while Writer uses something else - after setting the font to "Times New Roman" manually (provided that the system has such a font), the document fits on a single page.
Comment 7 Miklos Vajna 2012-05-02 05:28:15 UTC
So with http://people.freedesktop.org/~vmiklos/2012/show-font-replacements.diff, one can see that 'Times New Roman CYR' is replaced by 'Arial', which sounds a general problem, not RTF specific. OTOH I failed to make a docx document that triggers this bug, so I'm not yet sure - for now, I didn't touch the whiteboard.
Comment 8 Caolán McNamara 2012-05-08 04:52:22 UTC
Well, what the fake "CYR" thing that the producer of this RTF got substituted with is unchanged from old to new rtf importer, maybe we can cook up something to improve the substitution.

But regardless of that, the font set for the empty paragraph isn't right. It should be the same 14pt "Times New Roman CYR" like the rest of the document. Cut down example attached to exaggerate this as three paragraphs all of which should be in 25pt FOOBARFONT, but the second isn't
Comment 9 Caolán McNamara 2012-05-08 04:52:55 UTC
Created attachment 61219 [details]
should be all 25pt font
Comment 10 Not Assigned 2012-05-08 06:51:56 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2a1297444a47a5dd0ed2bd7d8598e47bb00270ff

Related: fdo#49271 strip charset suffixes from fontname for substitutions
Comment 11 Caolán McNamara 2012-05-08 06:58:39 UTC
That'll give you better font substitution, but still need to get those empty paragraphs into the right size and font
Comment 12 Miklos Vajna 2012-05-08 07:39:17 UTC
Thanks - clearing false target.
Comment 13 Not Assigned 2012-05-09 07:52:51 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6092b332b99541bfdb9fd4bb14d0baa7dcf63e6a

fdo#49271 rtftok: make sure we send char props if there are no runs
Comment 14 Miklos Vajna 2012-05-09 07:55:24 UTC
Fixed now in master.
Comment 15 s-joyemusequna 2012-05-19 00:54:03 UTC
Verified with LOdev 3.6 (master - 18-May-2012 02h44 x86@6-fast; Build ID: 8b1d29b) under Windows Vista 64. No page break. 

But: the formating is wrong. There are 48 pages instead of 45. Same error with LibO 3.5.4 RC1. Very visible on page one of the document. LO 3.6dev and LO 3.5.4 need the whole page to display the text, Word 2007 and LibO 3.4.5 much less. 

The space before paragraph on page one is 0.42 cm, the space after paragraph 0.21 cm (LibO 3.6dev, LibO 3.5.4), compared to 0.0 and 0.0 (Word 2007 and LibO 3.4.5).

This is a regression.

Should I file an extra bug or is it a known error? 

Note: I tried to reformat the whole text with "Times New Roman" instead of "Times New Roman CYR", no change.
Comment 16 Miklos Vajna 2012-07-30 08:16:00 UTC
Hi s-joyemusequna,

Yes, as usual, please open a separate bug, add me to CC and I'll try to take care of it.

Thanks for the feedback and sorry for the slow answer. :)

Miklos
Comment 17 Robinson Tryon (qubit) 2015-12-17 12:06:15 UTC
Migrating Whiteboard tags to Keywords: (filter:rtf)
Replace rtf_filter -> filter:rtf.
[NinjaEdit]