Bug Hunting Session
Bug 92061 - When opening an RTF file with bracketed \sub or \super in a footnote, the text body is parsed wrongly, and terminates prematurely
Summary: When opening an RTF file with bracketed \sub or \super in a footnote, the tex...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86 (IA32) All
: medium major
Assignee: Miklos Vajna
URL:
Whiteboard: target:5.1.0 target:5.0.0.2 target:4...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-06-14 08:58 UTC by Bernard Moreton
Modified: 2016-10-25 19:23 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF document with footnote containing bracketed \sub and \super (1.34 KB, application/rtf)
2015-06-14 08:58 UTC, Bernard Moreton
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Moreton 2015-06-14 08:58:48 UTC
Created attachment 116521 [details]
RTF document with footnote containing bracketed \sub and \super

If {\sub SUBTEXT} or {\super SUPERSCRIPT_TEXT} appears in a footnote, the footnote is displayed correctly, but everything following the first instance of either is then re-parsed as text body, and the right-bracket terminating the footnote is then treated as the RTF file terminator.

The attached document shows the problem triggered bu a {\sub TEXT}, but the problem is the same when that is a {\super TEXT}.

This is a major problem, because LibreOffice then substantially misrepresents the document.
Comment 1 Buovjaga 2015-06-14 13:11:24 UTC
Confirmed.

Lowering severity per https://wiki.documentfoundation.org/images/0/06/Prioritizing_Bugs_Flowchart.jpg

The problem is not present in 3.3, but already in 3.5, so can't be bibisected.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 01a189abcd9a4ca472a74b3b2c000c9338fc2c91
TinderBox: Win-x86@39, Branch:master, Time: 2015-06-14_07:46:28
Locale: fi-FI (fi_FI)

Ubuntu 15.04 64-bit 
OpenOffice.org 3.3.0
OOO330m20 (Build:9567)

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 2 Bernard Moreton 2015-06-14 18:22:45 UTC
If \footer is followed by \pard\plain \s24, then the problem disappears. Not sure whether that actually reduces the problem, though.

And fortunately, the use of \nosupersub instead of bracketing also fixes the problem - but then it would, wouldn't it, because it takes away the closing bracket that causes the problem in the first place ...
Comment 3 Bernard Moreton 2015-06-16 08:47:20 UTC
Any save after opening results in loss of data. With this in mind, and looking at your guidlines as quoted, please consider raising the status.
Comment 4 Buovjaga 2015-06-16 14:32:07 UTC
(In reply to Bernard Moreton from comment #3)
> Any save after opening results in loss of data. With this in mind, and
> looking at your guidlines as quoted, please consider raising the status.

Ok, I'll set severity to major, even though it makes me feel I'm on a rollercoaster of emotions :)
Comment 5 Miklos Vajna 2015-06-19 20:58:31 UTC
What's special about this document is that the 7 characters after \footnote contain a {, but no }. Ideally that doesn't matter, but given that there is a missing seek in the \footnote handler... ;-)
Comment 6 Commit Notification 2015-06-22 07:12:12 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b08304b55cf2284a3c583426c60baef618ba206

tdf#92061 RTF import: fix missing body text after footnote

It will be available in 5.1.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 7 Commit Notification 2015-06-22 09:13:31 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=99db209005634a7342d7043485cdbef5b510e199&h=libreoffice-5-0

tdf#92061 RTF import: fix missing body text after footnote

It will be available in 5.0.0.2.

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 8 Commit Notification 2015-06-30 11:32:40 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=326ca9e0710d17274eb0a6cdc0d95d4f933784f0&h=libreoffice-4-4

tdf#92061 RTF import: fix missing body text after footnote

It will be available in 4.4.5.

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.