Bug Hunting Session
Bug 41109 - FILEOPEN: writer RTF import: huge differencies in LO 3.4.2 and MSO 2010 (z-ordering ignored)
Summary: FILEOPEN: writer RTF import: huge differencies in LO 3.4.2 and MSO 2010 (z-or...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.2 release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: Confirmed:4.2.0.1:OSX10.9 target:4.3....
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-22 03:32 UTC by Arkady
Modified: 2013-12-29 15:41 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
file causing the first issue (36.84 KB, application/msword)
2011-09-22 03:38 UTC, Arkady
Details
96.rtf file rendering in LO 3.4.2 (36.73 KB, image/jpeg)
2011-09-22 03:39 UTC, Arkady
Details
96.rtf file rendering in MSO 2010 (37.17 KB, image/jpeg)
2011-09-22 03:40 UTC, Arkady
Details
file causing the second issue (44.03 KB, application/msword)
2011-09-22 03:41 UTC, Arkady
Details
RTF table rendering in LO 3.4.2 (104.53 KB, image/jpeg)
2011-09-22 03:43 UTC, Arkady
Details
RTF table rendering in MSO 2010 (92.24 KB, image/jpeg)
2011-09-22 03:44 UTC, Arkady
Details
Another broken RTF file (110.45 KB, text/rtf)
2011-10-03 20:56 UTC, Luke Curley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arkady 2011-09-22 03:32:51 UTC
Hi all!

There are at least 2 issues with rendering simple RTF files in LO 3.4.2 and MSO 2010. LO renders uploaded (at nabble) files rather awkwardly.

Full profound discussion about the issues may be found at nabble:

http://nabble.documentfoundation.org/RTF-files-rendering-huge-differencies-in-LO-3-4-2-and-MSO-2010-bug-td3355881.html#none

Please, take these issues into action.

Thanks in advance, Arkady.
Comment 1 Arkady 2011-09-22 03:38:59 UTC
Created attachment 51509 [details]
file causing the first issue
Comment 2 Arkady 2011-09-22 03:39:58 UTC
Created attachment 51510 [details]
96.rtf file rendering in LO 3.4.2
Comment 3 Arkady 2011-09-22 03:40:49 UTC
Created attachment 51511 [details]
96.rtf file rendering in MSO 2010
Comment 4 Arkady 2011-09-22 03:41:41 UTC
Created attachment 51512 [details]
file causing the second issue
Comment 5 Arkady 2011-09-22 03:43:06 UTC
Created attachment 51513 [details]
RTF table rendering in LO 3.4.2
Comment 6 Arkady 2011-09-22 03:44:12 UTC
Created attachment 51514 [details]
RTF table rendering in MSO 2010
Comment 7 Luke Curley 2011-10-03 20:56:38 UTC
Created attachment 51915 [details]
Another broken RTF file

Please let me know if I should make a new ticket instead of adding to this one. I have some more files that display this behavior and can upload them on request.

Thanks!
Comment 8 Jean-Baptiste Faure 2011-10-23 21:25:08 UTC
Has been confirmed by users having MSO-2010.

Best regards. JBF
Comment 9 Jean-Baptiste Faure 2011-10-23 21:31:31 UTC
(In reply to comment #8)
> Has been confirmed by users having MSO-2010.
> 
> Best regards. JBF

Answered too quickly: in master 96.rtf isA 3 pages document, first with the 4 squares, the second with the 96 and the third with the circles.
The second file looks better and more complete in master but it not perfect.

Best regards. JBF
Comment 10 Miklos Vajna 2011-10-24 00:21:03 UTC
Luke,

Sure - in general if you think there will be a separate fix for an issue, it's best to open a new bug, so when the commit says "fixes fdo#xxxxx", that will refer to a single issue. :)

JBF,

Thanks, will have a look.

Miklos
Comment 11 Miklos Vajna 2012-01-14 16:31:43 UTC
I had a look at why the 4 rectangles are all behind and not in front of the circle. The z-index (or z-order) of the shapes is defined by the "dhgt" property, which is at the moment just ignored by the tokenizer.

The problem is that so far I did not find the relevent UNO API (if there is any) to set the z-index of a shape, that has to be figured out first.
Comment 12 retired 2013-12-22 12:52:26 UTC
Confirmed:4.2.0.1:OSX10.9
Comment 13 Commit Notification 2013-12-29 15:08:58 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#41109 RTF shape import: shpz has priority over dhgt



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 14 Commit Notification 2013-12-29 15:29:48 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

fdo#41109 RTF shape import: handle fBehindDocument property



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 15 Miklos Vajna 2013-12-29 15:33:59 UTC
With the two above commits z-ordering issues should be resolved in the "96.rtf" bugdoc. For any remaining issues, please open a separate bug, as usual. I'll mark this bug as resolved once I backport the fixes to the -4-2 branch.
Comment 16 Commit Notification 2013-12-29 15:40:19 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=851f933a03ed75d5938452832aa9198855847dc7&h=libreoffice-4-2

fdo#41109 RTF shape import: shpz has priority over dhgt


It will be available in LibreOffice 4.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 17 Commit Notification 2013-12-29 15:40:33 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3200e99c48897cf7965cc3acc58fadb686ee2437&h=libreoffice-4-2

fdo#41109 RTF shape import: handle fBehindDocument property


It will be available in LibreOffice 4.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 18 Miklos Vajna 2013-12-29 15:41:17 UTC
Fixed on master and libreoffice-4-2, marking as resolved.