Bug 81944 - FILEOPEN: RTF - Random words and links not retaining font name
Summary: FILEOPEN: RTF - Random words and links not retaining font name
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.4.0 target:4.3.1
Keywords: bisected, filter:rtf, regression
: 82074 82107 (view as bug list)
Depends on:
Blocks: RTF-Character
  Show dependency treegraph
 
Reported: 2014-07-31 05:58 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-10-02 17:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
LibO 4.3.1 VS Word 2013 (406.48 KB, image/png)
2014-07-31 05:58 UTC, Yousuf Philips (jay) (retired)
Details
How the first page Word RTF looks in LibO 4.2.5 VS 4.3.1 (278.71 KB, image/png)
2014-08-02 18:03 UTC, Yousuf Philips (jay) (retired)
Details
sample file (1.71 MB, application/rtf)
2014-08-05 10:03 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-07-31 05:58:47 UTC
Created attachment 103720 [details]
LibO 4.3.1 VS Word 2013

I downloaded < http://download.microsoft.com/documents/rus/microsoft4you/How_to_license_the_operating_system_Windows_8_new.docx > and opened it in Word 2013 and saved it as an rtf file. Then when opening the file in LibO 4.3.1, various text and links appear with Times New Roman font rather than Segoe UI on pretty much every page. This also effects 4.2.7 and master.

Steps:
1) open RTF attachment 103717 [details]
2) one page 1 look at "www.microsoft.com/rus"
3) one page 2 look at the word "Windows" on line 3 or "GML" on line 5.
4) one page 3 look at "Get Genuine Windows – Academic (GGWA-A)"

This is a regression as this doesnt happen in 3.6.7.
Comment 1 Michael Stahl (allotropia) 2014-08-01 13:23:09 UTC
bibisect range: 24bd259451fae36c993977f52d62365fa63ac87c..8a89a732522f90d68f1b1c84c9c34c666f2eb882

regression from:
commit 0805b222f87bf99ec0c53ca678d1c670eb5293a2
Author:     Miklos Vajna <vmiklos@suse.cz>
AuthorDate: Tue Feb 26 15:36:09 2013 +0100
Comment 2 Yousuf Philips (jay) (retired) 2014-08-01 21:00:10 UTC
I should have previously mentioned that i've seen more items in the RTF not retain their font name in 4.3.1 than 4.2.5 and below. An example of this is step 3, which only showed up in 4.3.1.
Comment 3 Commit Notification 2014-08-02 17:16:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

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

fdo#81944: writerfilter: RTF import: don't drop fonts in stylesheet



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 4 Michael Stahl (allotropia) 2014-08-02 17:19:28 UTC
funny thing is, it appears to work in current libreoffie-4-2 branch...

then this one broke it again:

commit 1be0a3fa9ebb22b607c54b47739d4467acfed259
Author:     Michael Stahl <mstahl@redhat.com>
AuthorDate: Tue Jun 17 18:40:04 2014 +0200

    n#825305: writerfilter RTF import: override style properties like Word
  

good thing we decided not to backport that earlier today...

so the problem appears to be that the default style's fonts
are not imported, or at least fixing that makes the right font
show up in the locations from the description:

on master:
para style Default Style
 Western: Times New Roman
 CJK: Courier New

Word:
para style Normal
 Western: Segoe UI
 CJK/Complex: Times New Roman

probably if this ever worked before it was by accident...
Comment 5 Yousuf Philips (jay) (retired) 2014-08-02 18:03:07 UTC
Created attachment 103872 [details]
How the first page Word RTF looks in LibO 4.2.5 VS 4.3.1

Everything after 3.6.7 has not worked flawlessly from the test documents i've been testing and things have shown to gotten worse between 4.2.5 and 4.3.1. I came across another file that was fine in 4.2.5 and then in 4.3.1, Times New Roman patches showed up here and there. You can see it by converting attachment  103815 [details] to RTF in Word 2013 and then opening it up in LibO.
Comment 6 Yousuf Philips (jay) (retired) 2014-08-02 18:07:51 UTC
Hi Michael,

When you do get a chance, can you check out bug 82033, as it is about RTF exporting attachment 103815 [details], which results in a 169mb file.
Comment 7 Commit Notification 2014-08-03 19:44:35 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#81944: writerfilter: RTF import: don't drop fonts in stylesheet


It will be available in LibreOffice 4.3.1.

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 Yousuf Philips (jay) (retired) 2014-08-05 10:03:53 UTC Comment hidden (obsolete)
Comment 9 Miklos Vajna 2014-08-10 10:36:23 UTC
*** Bug 82074 has been marked as a duplicate of this bug. ***
Comment 10 Yousuf Philips (jay) (retired) 2014-08-23 14:39:18 UTC Comment hidden (obsolete)
Comment 11 Yousuf Philips (jay) (retired) 2014-08-23 14:39:51 UTC Comment hidden (obsolete)
Comment 12 Miklos Vajna 2014-09-03 17:36:47 UTC Comment hidden (obsolete)
Comment 13 Miklos Vajna 2014-09-08 13:01:44 UTC
*** Bug 82107 has been marked as a duplicate of this bug. ***
Comment 14 Yousuf Philips (jay) (retired) 2014-09-08 14:28:40 UTC Comment hidden (obsolete)
Comment 15 Robinson Tryon (qubit) 2015-12-17 12:39:18 UTC Comment hidden (obsolete)