Problem description: When saving a document with superscript as an rtf file, the formatting of the superscripts changes, and reopening the file presents a file different from the original one. Steps to reproduce: 1. Create a new file, write some text, select some of it, and superscript it with Ctrl+Shift+P 2. Save the document as an rtf file 3. Exit and reopen the file Current behavior: superscript formatting changes. In the rtf, the \super keyword changes to the \up## keyword (# stand for numbers 0-9). This yields a different formatting. (changing the \up## back to \super with a text editor fixes the formatting). The same happens with subscripts (\sub becomes \dn##) Expected behavior: The formatting of superscripts should not change when saving as an rtf file Platform (if different from the browser): Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
[Reproducible] with "LibreOffice 3.5.5.3. German UI/Locale [Build-ID: 7122e39-92ed229-498d286-15e43b4-d70da21] on German WIN7 Home Premium (64bit) and attached sample document. Saving it as .rtf still shows wubscript and superscript, but without reduced font size. Still [Reproducible] with parallel installation of Master "LOdev " 3.7.0.0.alpha0+ - WIN7 Home Premium (64bit) ENGLISH UI [Build ID: 25608fb]" (tinderbox: 2008R2@20, pull time 2012-07-14 00:31:17) This sounds very similar to "Bug 36538 - FILESAVE: RTF does not apply subscript font size reduction". Was ok for me with "LibreOffice 3.5.1.2 German UI/Locale [Build-ID: dc9775d-05ecbee-0851ad3-1586698-727bf66] on German WIN7 Home Premium (64bit), so it seems that the bug reappeared @Miklós: Can you please check?
Created attachment 64416 [details] Sample Document Save as .rtf to reproduce the problem!
This might be a combined FILEOPEN / FILESAVE problem? May be fix for Bug 36538 was incomplete or some kine fo fFILEOPEN fix? With 3.5.1 saved as .rtf looked ok when I reopened the document with 3.5.1. But bug reported here is visible for that .rtf with LibO 3.5.5 and MS Word Viewer. When I save the sample document form 3.5.5, it will be shown with reported problem in 3.5.5 and MS WORD viewer. But strange, opening it with 3.5.1.2 shows subscript and superscript correctly
Just to clarify, the following command line will fix the rtf file: sed -i -e 's/\\up[0-9]*/\\super/g' -e 's/\\dn[0-9]*/\\sub/g' input.rtf It will then look okay when opened with LibreOffice. Of course, if you save the file again, then the problem re-surfaces again. I am in no way an expert in the rtf format. I discovered this by trial and error. I would bet this is a mishandling/forgetting of the \super and \sub keywords from LibreOffice side.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=796e9a796603397c79e160610c8541e16dfc4c82 fdo#52286 fix RTF export of sub/super script font height 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.
-4-0 review: https://gerrit.libreoffice.org/1731 -3-6 review: https://gerrit.libreoffice.org/1732
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=865471d966b6db24ece283a0c7a70ce1cea921fe&h=libreoffice-4-0 fdo#52286 fix RTF export of sub/super script font height 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.
Miklos Vajna committed a patch related to this issue. It has been pushed to "libreoffice-3-6": http://cgit.freedesktop.org/libreoffice/core/commit/?id=598223e6f828f0e4bedf3f9840703d14f4316048&h=libreoffice-3-6 fdo#52286 fix RTF export of sub/super script font height It will be available in LibreOffice 3.6.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.
Migrating Whiteboard tags to Keywords: (filter:rtf) Replace rtf_filter -> filter:rtf. [NinjaEdit]