Bug 109831 - Problem Importing RTF Document with Boolean Custom Properties
Summary: Problem Importing RTF Document with Boolean Custom Properties
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-28 12:24 UTC by documentfoundation.org
Modified: 2017-07-31 16:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
RTF file that generates the error (1.20 KB, application/rtf)
2017-07-28 12:38 UTC, documentfoundation.org
Details
The error message when opening the file (14.90 KB, image/png)
2017-07-28 12:39 UTC, documentfoundation.org
Details
RTF file - LO 6 (100.14 KB, image/png)
2017-07-31 16:35 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description documentfoundation.org 2017-07-28 12:24:47 UTC
Description:
LibreOffice does not support Boolean as a custom property in a document and throws an error if the first property encountered in an RTF document is a Boolean (RTF: \proptype11). If a Boolean property follows another property, it assumes the preceding property's type.

Steps to Reproduce:
1. Create a document with a custom property of number
2. Save the document as an RTF file
3. Edit the RTF file with an ASCII editor and change
4. Find the section starting with "{\*\userprops"
5. Change the property type from "\proptype3" to "\proptype11"
6. Save the edited file
7. Open the edited file with LibreOffice

Actual Results:  
LibreOffice throws an error: "General Error. General input/output error."

Expected Results:
LibreOffice should have opened the file and either converted the property to a number (with the actual value specified in the property, 0 or 1) or to a Yes/No property with 0 meaning No and all other values meaning Yes.


Reproducible: Always

User Profile Reset: No

Additional Info:
I will raise a different bug suggesting that the Yes/No property will be converted to an RTF Boolean property


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Miklos Vajna 2017-07-28 12:33:48 UTC
Can you please set the version info and add a reproducer document?

I see \proptype11 handling code in writerfilter/source/rtftok/rtfdispatchvalue.cxx:1421, I added that on 2016-12-08.
Comment 2 documentfoundation.org 2017-07-28 12:38:13 UTC
Created attachment 134933 [details]
RTF file that generates the error
Comment 3 documentfoundation.org 2017-07-28 12:39:06 UTC
Created attachment 134934 [details]
The error message when opening the file
Comment 4 Miklos Vajna 2017-07-28 13:08:17 UTC
Aha, so this happens on 5.3; can you please try also with 5.4?
Comment 5 documentfoundation.org 2017-07-28 19:23:31 UTC
(In reply to Miklos Vajna from comment #1)
> Can you please set the version info and add a reproducer document?

It is version 5.3.5.1 but that is not available to choose from the version drop-down, which is why I left it as unspecified.

> 
> I see \proptype11 handling code in
> writerfilter/source/rtftok/rtfdispatchvalue.cxx:1421, I added that on
> 2016-12-08.

Unfortunately, it does not seem to work. I have raised another bug to suggest \proptype11 is mapped to LibreOffice's Yes or No property.
Comment 6 documentfoundation.org 2017-07-28 19:24:48 UTC
(In reply to Miklos Vajna from comment #4)
> Aha, so this happens on 5.3; can you please try also with 5.4?

Unfortunately, I have only 5.3.5.1 available as I use the version from the Debian repository.
Comment 7 raal 2017-07-31 16:35:36 UTC
Created attachment 135025 [details]
RTF file - LO 6

I can not confirm in Version: 6.0.0.0.alpha0+
Build ID: e0bafa78e3ad0df397d78cd65ad19bd5b07dc5f2
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-07-20_22:42:49
Comment 8 raal 2017-07-31 16:37:15 UTC
I think we can close  the bug. Works in dev version, fixed.

http://www.libreoffice.org/download/libreoffice-fresh/

http://dev-builds.libreoffice.org/daily/master/