Bug 53604 - error in saving empty footnote in RTF format
Summary: error in saving empty footnote in RTF format
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: Other Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:4.1.0 target:4.0.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 17:28 UTC by Anne Barschall
Modified: 2012-12-21 17:44 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
original + buggy files (18.95 KB, application/zip)
2012-08-31 05:41 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anne Barschall 2012-08-16 17:28:10 UTC
I generated a file in Microsoft Word 2011 for mac in .rtf form.  I edited it in Libre Office Writer.  When saving in .rtf form, quotes, apostrophes, and long dashes were lost.

I will update.  Maybe that will help.
Comment 1 Julien Nabet 2012-08-16 19:55:02 UTC
If you still reproduce the problem with 3.5.5, don't hesitate to attach the original rtf file + buggy rtf file

If you have extra time, you may also give a try to 3.6.0
Comment 2 Julien Nabet 2012-08-27 21:26:45 UTC
On pc Debian x86-64, testing updated today, I tested your files (sent by PM) I didn't reproduce the problem.

I tested with LO 3.5.4.2 (Debian package) in French + with 3.5 sources updated today (so "more 3.5.6 than 3.5.5". I made each test with a brand new LO profile (see http://wiki.documentfoundation.org/UserProfile).

Did you install any specific LO extension or any extra fonts?
Did you test with a brand new LO profile (just rename the directory just in case).
Comment 3 Julien Nabet 2012-08-31 05:41:23 UTC
Created attachment 66382 [details]
original + buggy files

Reporter had sent me the files, she's ok I attach them.
Comment 4 Julien Nabet 2012-08-31 05:44:32 UTC
miklos: I didn't reproduce it but reporter told me it can't be reproduced easily. Any idea about this?
Comment 5 Julien Nabet 2012-10-09 05:43:03 UTC
Miklos: I quote Anna in a email
"the problem arises with quotation marks and apostrophes.  It seems to have something to do with those apostrophe's and quotation marks that are directional, rather than the ones that are straight.  The directional ones combine with the character after them to make a Chinese character."

Would you have some time to take a look?
Comment 6 Silvain Dupertuis 2012-10-12 16:02:24 UTC
I just discovered that saving in RTF format from the Windows version create a faulty file when using footnotes.
Actually, the encoding of footnotes produces a faulty double opening brace. 
Then the file cannot be openend anymoe, and one get a general error message.
Nevertheless, the file can be corrected using a text editor (like Notepad++) and replacing {{\super with {\super
This does repair the faulty file.
Only the Windows version has the problem, the linus version is ok.
It took me a couple of hours trying to repar a RTF file bit by bit until I discoverd where this error was.
I am going to make a specific report and send my test file.
Comment 7 Urmas 2012-10-13 02:23:47 UTC
It should be fixed in 3.6.x
Comment 8 Julien Nabet 2012-11-26 22:19:52 UTC
Anne, Silvain: any update with a newer LO version (3.6.3)?

Urmas: except if you did test at least or if some people indicate it's ok for them, i think it's a little too early to put this tracker to RESOLVED/FIXED.
Also, except if there's a specific fix (or several), it could only be WFM.
Comment 9 Anne Barschall 2012-11-26 23:26:29 UTC
Hi!

I have not had a chance to try this exercise again.  What did happen, though -- when I brought .rtf files edited with Libre Office back to Microsoft Word for mac 2011 -- was that open quotation marks combined with initial letters to form Chinese characters;and closed quotation marks combined with final letters to form blank boxes. 

I have Libre Office on my laptop.  The next time I travel, I could try to see if the problem recurs.  

This really messed me up, though, as I was writing a novel and I had to go through the whole thing -- almost 300 pages -- and remove Chinese characters & square, then re-insert quotation marks and apostrophes.

I'm reluctant to try this exercise again, as I don't want my files corrupted.

-- Anne

http://www.blogger.com/blogger.g?blogID=444943417265873047#editor/target=post;postID=2199349322181596222
Comment 10 Anne Barschall 2012-11-26 23:29:30 UTC
Oops.  I put the wrong link to my blog.  Here is the correct link

http://annebarschall.blogspot.com/2012/10/perils-of-free-software.html
Comment 11 Nicholas 2012-12-09 20:28:09 UTC
Saving in RTF format from Version 3.6.3.2 (Windows) still creates a corrupt file when using footnotes. 

"{\super" is written as  "{{\super".  

Trying to reopen the rtf file generates the Libre Office error message
"General error. General input/output error"
Comment 12 Julien Nabet 2012-12-09 21:22:35 UTC
Nicholas: On Win7 with 3.6.4, I don't reproduce this. Could you give it a try?
Comment 13 Nicholas 2012-12-10 01:42:04 UTC
Julien,
>
> Open Libre Writer
> [file] [new]
> Insert "new body text"
> Place cursor after "body"
> [insert] [footnote/endnote] <automatic> [ok]
> [file] [save as] "test 1.rtf"
> [save as type] <rtf>  [save]
> [file] [close]
> [file] [open]  "test 1.rtf"   gives "General error.General input/output
> error"
>
>
> saved file as ascii:
> {\rtf1\ansi\deff0\adeflang1025
> {\fonttbl{\f0\froman\fprq2\fcharset0 Times New
> Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0
> Arial;}{\f3\fnil\fprq2\fcharset0 Microsoft YaHei;}{\f4\fnil\fprq2\fcharset0
> Mangal;}{\f5\fnil\fprq0\fcharset1 Mangal;}}
> {\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
> {\stylesheet{\s0\snext0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af6\langfe2052\dbch\af4\afs24\alang1081\loch\f0\fs24\lang4105
> Normal;}
> {\*\cs15\snext15 Footnote Characters;}
> {\*\cs16\snext16{\*\updnprop5801}\up10 Footnote anchor;}
> {\*\cs17\snext17{\*\updnprop5801}\up10 Endnote anchor;}
> {\*\cs18\snext18 Endnote Characters;}
> {\s19\sbasedon0\snext20\sb240\sa120\keepn\dbch\af3\dbch\af4\afs28\loch\f2\fs28
> Heading;}
> {\s20\sbasedon0\snext20\sb0\sa120 Text body;}
> {\s21\sbasedon20\snext21\sb0\sa120\dbch\af5 List;}
> {\s22\sbasedon0\snext22\sb120\sa120\noline\i\dbch\af5\afs24\ai\fs24
> Caption;}
> {\s23\sbasedon0\snext23\noline\dbch\af5 Index;}
> {\s24\sbasedon0\snext24\li339\ri0\lin339\rin0\fi-339\noline\afs20\fs20
> Footnote;}
> }{\info{\author Nicholas
> Courtier}{\creatim\yr2012\mo12\dy9\hr17\min0}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment
> LibreOffice}{\vern3600}}\deftab709
>
> {\*\pgdsctbl
> {\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0
> Default;}}
>
> \formshade\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
> \pgndec\pard\plain
> \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af6\langfe2052\dbch\af4\afs24\alang1081\loch\f0\fs24\lang4105{\rtlch
> \ltrch\loch
> page body}*{{\super* \chftn{\*\footnote \chftn\pard\plain
> \s24\li339\ri0\lin339\rin0\fi-339\noline\afs20\fs20{\rtlch
> \ltrch\loch\rtlch \ltrch\loch
> \tab test footnote}
> \par }}
> {\rtlch \ltrch\loch
>  text}
> \par }
>
>
>
> If I use an ascii editor to change "{{\super" to "{\super" the rtf file
> opens successfully.
>
> see also
> http://www.mail-archive.com/libreoffice-bugs@lists.freedesktop.org/msg59002.html
>
> Nicholas
>
> Operating System
> Microsoft Windows 7 Home Premium 32-bit SP1
> CPU
> Intel Mobile Core 2 Solo SU3500 @ 1.40GHz 42 °C
>  Penryn 45nm Technology
> RAM
> 2.00 GB Single-Channel DDR3 @ 399MHz (6-6-6-15)
> Motherboard
> Dell Inc. 09X3N3 (U2E1) 50 °C
>
> Libre Office
>        Version 3.6.3.2 (Build ID: 58f22d5)
>
>
>
>
>
>
> On Sun, Dec 9, 2012 at 1:22 PM, <bugzilla-daemon@freedesktop.org> wrote:
>
>>  Julien Nabet <serval2412@yahoo.fr> changed bug 53604<https://bugs.freedesktop.org/show_bug.cgi?id=53604>
>>  What Removed Added  Status REOPENED NEEDINFO
>>
>>  *Comment # 12 <https://bugs.freedesktop.org/show_bug.cgi?id=53604#c12>on bug
>> 53604 <https://bugs.freedesktop.org/show_bug.cgi?id=53604> from Julien
>> Nabet <serval2412@yahoo.fr> *
>>
>> Nicholas: On Win7 with 3.6.4, I don't reproduce this. Could you give it a try?
>>
>>  ------------------------------
>> You are receiving this mail because:
>>
>>    - You are on the CC list for the bug.
>>
>>
>
Comment 14 Miklos Vajna 2012-12-10 06:29:52 UTC
Most probably a dupe of bug 55939.
Comment 15 Julien Nabet 2012-12-10 06:54:14 UTC
Miklos: not a dup, I finally reproduced this problem with 3.6 sources updated yesterday (commit f421e804371670001bc5af25b8b66d67dfdb3261) thanks to Nicholas' detailed process

Nicholas: thank you for your feedback
Comment 16 Nicholas 2012-12-10 17:48:03 UTC
Updated Libre Office to Version 3.6.4.3 (Build ID: 2ef5aff).
Now able to save and reopen rtf files with footnotes.
Bug appears to have been fixed in this release.
Comment 17 Julien Nabet 2012-12-10 20:16:40 UTC
(In reply to comment #16)
> Updated Libre Office to Version 3.6.4.3 (Build ID: 2ef5aff).
> Now able to save and reopen rtf files with footnotes.
> Bug appears to have been fixed in this release.
In fact, I've got a bug as soon as I put nothing on footnote. I've just tested on 3.6.4 on Win7

Nicholas: could you try by putting nothing on footnote to confirm (or not)?
Comment 18 Nicholas 2012-12-10 20:23:53 UTC
Julian,
Confirmed:  General error when nothing in footnote.
Comment 19 Miklos Vajna 2012-12-21 13:37:10 UTC
(In reply to comment #15)
> Miklos: not a dup

Indeed, I can still reproduce with master. I'll look into this.
Comment 20 Not Assigned 2012-12-21 13:57: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=b91fa392bc731376cff205d6d3e5cb245dc4179c

fdo#53604 fix RTF export of empty footnotes



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 21 Not Assigned 2012-12-21 16:42:22 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be3e8eac5fd02d8951adcd423bc1fb0f9c30755f&g=libreoffice-4-0

fdo#53604 fix RTF export of empty footnotes


It will be available in LibreOffice 4.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 22 Miklos Vajna 2012-12-21 17:44:09 UTC
Fixed in master and 4.0 (as far as I see 3.6 is not affected) - marking as resolved.