Bug 104079 - FILEOPEN: RTF: Spacing is smaller than it should be
Summary: FILEOPEN: RTF: Spacing is smaller than it should be
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.0.alpha0+ Master
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.0.0 target:5.4.4
Keywords: bibisected, bisected, filter:rtf, regression
Depends on:
Blocks: RTF TableofContents-Indexes
  Show dependency treegraph
 
Reported: 2016-11-21 10:14 UTC by Xisco Faulí
Modified: 2017-10-29 20:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
sample (253.88 KB, application/rtf)
2016-11-21 10:14 UTC, Xisco Faulí
Details
comparison (7.73 MB, application/pdf)
2016-11-21 10:16 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2016-11-21 10:14:44 UTC
Created attachment 128914 [details]
sample

1. Open attached file
2. Check spacing inside 2. Calculation Type

Observed behaviour: it's smaller than it should be

Reproduced in 

Version: 5.3.0.0.alpha1+
Build ID: 757a60d01dd152aadab2ba3c8224252481ce8a88
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout
Engine: new; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

but not in

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e
Comment 1 Xisco Faulí 2016-11-21 10:16:44 UTC
Created attachment 128915 [details]
comparison
Comment 2 Xisco Faulí 2016-11-21 10:18:19 UTC
Regression introduced by:

author	Miklos Vajna <vmiklos@collabora.co.uk>	2014-07-15 16:18:19 (GMT)
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2014-07-15 17:05:06 (GMT)
commit fc3eb493ac9e8dec35060524db4dc8ca3210631a (patch)
tree ee91f13e4806ac8d7eb74469a90de563298799a6
parent 6d3269ad94bbad8abae5703edc86d8888356bf14 (diff)

Related: bnc#875718 DOCX import: fix missing character grab-bag on fields
The problem was that in case:

1) The paragraph only had a single text portion, which was a field and
char grab-bag was set on it and
2) The paragraph had a style which also set the character grab-bag

then during import the field's gra-bag was set on the paragraph (as it's
the only portion) and later the paragraph style overwrote this, in case
that had a grab-bag, too.

Work this around by ensuring that in case of portion fields (i.e. not
ToC, which has its own paragraphs), there are always at least two
portions in a paragraph (the second is removed later).

This also fixes the fake paragraph problem at the end of the bnc#875718
testcase. (There was an empty paragraph at the end of the document, but
not in the file itself.)

Adding Cc: to Miklos Vajna
Comment 3 Commit Notification 2017-10-17 09:34:32 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ee33d0772f991f04e97b5b61d7b11810a1b8ac0

tdf#104079 RTF import: fix handling fields inside TOC fields

It will be available in 6.0.0.

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 4 Commit Notification 2017-10-18 20:10:51 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=366beabc786c004fc7ff1b2bb2f606b0ee257a95&h=libreoffice-5-4

tdf#104079 RTF import: fix handling fields inside TOC fields

It will be available in 5.4.4.

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 5 Xisco Faulí 2017-10-29 20:41:30 UTC
Verified in

Version: 6.0.0.0.alpha1+
Build ID: fc4f2f1b0f8c286e9ae259c44fb249261a8ac47f
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group