Bug 96326 - FILEOPEN: RTF checkbox size too big and checkbox shows as selected
Summary: FILEOPEN: RTF checkbox size too big and checkbox shows as selected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.2.0 target:5.1.3 target:5.0.6
Keywords: filter:rtf
Depends on:
Blocks: RTF 98199 98321
  Show dependency treegraph
 
Reported: 2015-12-07 21:59 UTC by Ari Latvala
Modified: 2016-10-25 19:08 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF version having incorrect table border spacing to contents (1.36 MB, application/rtf)
2015-12-07 21:59 UTC, Ari Latvala
Details
PDF version showing the expected layout (36.99 KB, application/pdf)
2015-12-07 22:00 UTC, Ari Latvala
Details
Screenshot showing differenciens between rtf, doc and pdf (268.24 KB, image/jpeg)
2016-02-13 23:18 UTC, Ari Latvala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ari Latvala 2015-12-07 21:59:38 UTC
Created attachment 121126 [details]
RTF version having incorrect table border spacing to contents

LibreOffice 5.0.4.1 running on Windows 7 64-bit.

RTF version of document as an example: "Kotimaan näyttelyilmoittaumislomake" attached, also available at site http://www.kissaliitto.fi/lomakkeet/nayttely

When opening RTF version of the document, table border spacing to contents is incorrect for all sides. Should be 0,00cm but values are something else causing layout to be incorrect.

Attached RTF and PDF versions of the same document for comparison.
Comment 1 Ari Latvala 2015-12-07 22:00:10 UTC
Created attachment 121127 [details]
PDF version showing the expected layout
Comment 2 tommy27 2015-12-08 06:25:21 UTC
I confirm the bug under Win8.1 x64

I can reproduce it on a recent 5.2.0.0 daily build and in older LibO releases too (tested till 4.0.4)

interestingly AOO 4.1.0 renders correctly this file.
Comment 3 Miklos Vajna 2016-02-12 20:29:02 UTC
Hmm, can you please be a bit more specific?

Here is what I tried: I checked Table1:A1 in:

- Writer: select A1:B1, then reduce the selection to A1 only. Table -> Properties -> Borders -> Spacing to contents: Left/Right is 0.05cm, Top/Bottom is 0.00cm.
- Word: Go to the same cell, right click, table properties, cell tab, options button: the same padding values (Left/Right is 0.05cm, Top/Bottom is 0.00cm) are shown.

For Writer, I checked today's master, and also a daily build from 2015-12-08.
Comment 4 Ari Latvala 2016-02-13 23:16:17 UTC
Testing now with LO 5.1.0.3 on Windows 7 64-bit this RTF version of the document and it does not show that specific problem any more. 

DOC version still shows it as can be seen on the newly attached screenshot "ilmo_comp.jpg" demonstrating differences between RTF, DOC and PDF. 

RTF version's problem now on the upper part of the document are those too big checkmark boxes compared to PDF leading to some layout problems, when the whole text line does not fit any more to one line.

DOC version then again still shows that incorrect border spacing very clearly leading to more layout problems and also those too big checkboxes apparent there, when compared to PDF.

Not going to the problems on the lower part of the doc here, there are still work to be done on both, RTF and DOC version.
Comment 5 Ari Latvala 2016-02-13 23:18:45 UTC
Created attachment 122631 [details]
Screenshot showing differenciens between rtf, doc and pdf

Screenshot of the differenciens between RTF, PDF and DOC version using LO 5.1.0.3 on Windows 7 64-bit.
Comment 6 Miklos Vajna 2016-02-25 22:08:08 UTC
OK, I see a difference now, the reference has a checkbox that's unchecked, but LO imports it as checked. Let's use this bug for that specific problem -- please open a separate bug for DOC import problems, it's different code.
Comment 7 Ari Latvala 2016-02-26 08:35:21 UTC
(In reply to Miklos Vajna from comment #6)
> OK, I see a difference now, the reference has a checkbox that's unchecked,
> but LO imports it as checked. Let's use this bug for that specific problem
> -- please open a separate bug for DOC import problems, it's different code.

The main problem on those checkboxes is that both DOC and RTF make them bigger than on the PDF version leading to incorrect layout, i.e. text on two rows instead of one. Just look at the screenshot attachment, I've marked with red arrow that "cm" moving to next row because of that too big checkbox problem.

And as you noticed, RTF also shows them as checked, while PDF and DOC show them as not checked.
Comment 8 Commit Notification 2016-03-01 08:27:34 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=829596eb36de32bd87b426d9ad11901eabeae7be

tdf#96326 RTF import: handle checkbox form field undefined result

It will be available in 5.2.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 9 Commit Notification 2016-03-24 12:48:03 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=90b9a99cb242ebb5e8372372457f6c74d17bc409&h=libreoffice-5-1

tdf#96326 RTF import: handle checkbox form field undefined result

It will be available in 5.1.3.

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 10 Commit Notification 2016-03-30 11:55:25 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8de829c25511add434373e58e69df997d25e1e5c&h=libreoffice-5-0

tdf#96326 RTF import: handle checkbox form field undefined result

It will be available in 5.0.6.

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.