https://bugs.freedesktop.org/show_bug.cgi?id=79599

          Priority: medium
            Bug ID: 79599
          Assignee: [email protected]
           Summary: FILEOPEN FILESAVE RTF: Libreoffice produces
                    incompatible rtf-code for text-highlighting (uses
                    \chcbpatN instead of \highlightN)
          Severity: major
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: All
            Status: UNCONFIRMED
           Version: unspecified
         Component: Writer
           Product: LibreOffice

It seems that this bug has very long history. 
It is related to bug 37540 and bug 64490.

In this bugreport I summarize Romano Giannetti's comments.

Part 1. From ODT to RTF (LibO as writer, MSO as reader)

  Let's start with creating simple ODT document.
  The document will contain three letters 'T', 'x' and 'T' (without spaces,
tabs and delimeters at one paragraph). Letter 'x' is highlighted by Highligting
button (default yellow color).

  I use LibreOffice from Ubuntu Precise PPA (package
4.2.4~rc2-0ubuntu1~precise3 ), MSO 2003 SP0, MSO 2007 SP3.

  The original ODT document is named 'highlight_lo.odt'.
  Then I opened ODT document and saved it as RTF file - 'highlight_lo.rtf'.
  If I open 'highlight_lo.rtf' file with MSO Word 2003 or 2007 I can't remove
yellow highlight.

  If I open 'highlight_lo.rtf' with 'gedit' I see the following code sequence
about yellow 'x': {\chcbpat2\rtlch \ltrch\loch x}
  According to RTF-file specification [1] \chcbpat is a part of <chshading>
control word (controls character borders and shading, see p.142).
  But (as Romano Giannetti suggested earlier) the correct code for higlighting
is \highlightN (see p.145).
  After manual replacing of 'chcbpat' to 'highlight' I get editable RTF
document - it is named 'highlight_lo_fixed.rtf'. The resulting document became
editable by MSO 2003 and 2007.
  So for comfortable document exchange LibO should use '\highlightN' instead of
'\chcbpatN'.
  But there is a problem - LibO does not show 'x' with yellow background.


Part 2. Reading RTF in LibO (MSO 2003 and 2007 as writers, LibO as reader)

  2a. I created document with the same content and appearance in MSO 2003. It
is named 'highlight_2k3.rtf'.
  I opened this document in LibO and the 'x' is not highlighted. If I open this
document in 'gedit' the code sequence for 'x' is:
{\lang1033\langfe1049\highlight7\langnp1033\insrsid11681501\charrsid11681501
x}, so it contains '\highlight7', but not '\chcbpat7'.

  2b. I created document with the same content and appearance in MSO 2007. It
is named 'highlight_2k7.rtf'.
  I opened this document in LibO and the 'x' is not highlighted. If I open this
document in 'gedit' the code sequence for 'x' is:
{\rtlch\fcs1 \af31507 \ltrch\fcs0
\lang1033\langfe1033\highlight7\langnp1033\insrsid2260637\charrsid2260637 x},
so it contains '\highlight7', but not '\chcbpat7'.


Conclusion.
  For normal RTF-document exchange between MSO and LibO users LibO should use
and support '\highlightN' control sequence instead of '\chcbpatN'.

1.
http://www.microsoft.com/downloads/details.aspx?FamilyId=DD422B8D-FF06-4207-B476-6B5396A18A2B&displaylang=en

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to