Issue 82520

Summary: RTF: export sometimes forget blank following \dbch expression
Product: Writer Reporter: jimwg <jimwg>
Component: save-exportAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P2 CC: ericb, gbpacheco, issues, openoffice
Version: 680m231   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Belle Delta Hammer 10/13/07 Bad RTF export master ODT
none
Wrath of The Coral Knight Bad RTF export master
none
shorter sample file
none
similar problem file with \rtlch none

Description jimwg 2007-10-11 16:42:00 UTC
Misfunctioning RTF exporter.

I am typing a screenplay formatted 122 page document and exported it as a RFT
file and discovered dozens of chopped off letters and missing words in it. I am
using OOo_SRC680_m231_MacOSXPPC_AQUA, OOo_SRC680_m229_MacOSXPPC_X11, and
OOo_2.2.1_MacOSXPPC. They evidentally use the same RTF exporter because a doc is
corrupted all the same. The defects also render themselves in OOo if you import
the same RTF file, which was my check to see whether the fault was TextEdit or
Mariner Write's RTF importer. As an example below, the word "LACED" is missing. 


NORMAL EDITED FORM:


EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849

HOUNDS BARK in the distance of a cypress swamp while two ragged black slaves
splash and dash from BOUNTY HUNTERS. His bare back LACED with scars, ex-­Mexican
War Calvary scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave
DULCY, 31, through muck and roots. He ducks behind a tree and slips underwater
and behind a lone hunter to pop up and apply a NECK-POPPING half-­Nelson on him.
Approaching hounds HOWL.


NORMAL PORTION IN CONTENT.XML FILE:

<text:p text:style-name="P24"/><text:p text:style-name="P5">EXT. EAST TEXAS
BAYOU – DAY – SEPTEMBER 1849</text:p><text:p text:style-name="P24"/><text:p
text:style-name="P7">HOUNDS BARK in the distance of a cypress swamp while two
ragged black slaves splash and dash from BOUNTY HUNTERS. His bare back
<text:span text:style-name="T4">LACED with scar</text:span>s, ex-­Mexican War
Calvary scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave
DULCY, 31, through muck and roots. He ducks behind a tree and slips underwater
and behind a lone hunter to pop up and apply a NECK-POPPING half-­Nelson on him.
Approaching hounds HOWL.</text:p><text:p text:style-name="P24"/>


TEXT-EDIT RENDERING OF CORRUPTED EXPORTED RTF FILE:


EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849

HOUNDS BARK in the distance of a cypress swamp while two ragged black slaves
splash and dash from BOUNTY HUNTERS. His bare back with scars, ex-Mexican War
Calvary scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave
DULCY, 31, through muck and roots. He ducks behind a tree and slips underwater
and behind a lone hunter to pop up and apply a NECK-POPPING half-Nelson on him.
Approaching hounds HOWL.


TEXTWRANGLER RENDERED PORTION OF CORRUPTED RTF FILE:


\par \pard\plain
\ltrpar\s13\cf2\charscalex98\sl-240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li2160\ri320\lin2160\rin320\fi0\ql\rtlch\af7\afs24\lang255\ltrch\dbch\af7\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033
{\rtlch \ltrch\loch\f6\fs24\lang1033\i0\b0 EXT. EAST TEXAS BAYOU \'96 DAY \'96
SEPTEMBER 1849}
\par \pard\plain
\ltrpar\s18\cf7\sl-240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li0\ri680\lin0\rin680\fi0\ql\rtlch\af7\afs24\lang255\ltrch\dbch\af7\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033

\par \pard\plain
\ltrpar\s14\cf3\charscalex98\sl-240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li2160\ri660\lin2160\rin660\fi0\ql\rtlch\af7\afs24\lang255\ltrch\dbch\af7\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033
{\rtlch \ltrch\loch\f6\fs24\lang1033\i0\b0 HOUNDS BARK in the distance of a
cypress swamp while two ragged black slaves splash and dash from BOUNTY HUNTERS.
His bare back {\rtlch\ltrch\dbchLACED with scar}s, ex-\-Mexican War Calvary
scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave DULCY, 31,
through 
muck and roots. He ducks behind a tree and slips underwater and behind a lone
hunter to pop up and apply a NECK-POPPING half-\-Nelson on him. Approaching
hounds HOWL.}
\par \pard\plain 



Please keep up the good work.

James Greenidge
Queens, New York
Comment 1 jimwg 2007-10-11 17:03:10 UTC
Just loaded my virgin master screenplay to PortableOOo2.0.2rc4-OSX-PPC_en-US and
exported it to RTF and the RTF looks fine. It seems the more recent RTF
exporters are corruptive.

James Greenidge
Queens, New York
Comment 2 shaunmcdonald131 2007-10-11 22:24:10 UTC
adding macport to cc.

Is this happening on other platforms?
Comment 3 michael.ruess 2007-10-12 06:46:41 UTC
Does not happen in Win32 build 680m232. Seems to be a Macport-only problem.
Comment 4 jimwg 2007-10-14 10:55:15 UTC
I'm just a screen writer, not a programmer, but I'm coming to the conclusion that it may not be the actual 
RTF exporter itself but something deeper and more disturbing if true, because the "LACED" error in my 
CONTENT.XML example file shows up BEFORE the "corrupted" RTF rendering of it. I actually noticed this 
discrepancy from the get-go but let it go, assuming OOo had some weird way of coding text formats, still 
ever since it's been nagging me. Sorry I should've alerted you before.

James Greenidge
Queens, New York 
Comment 5 jimwg 2007-10-14 16:20:57 UTC
In tracing back, I believe there's a possibility that what corrupted the CONTENT.XML file occurs while 
fusing files during COMPARE operations. I repeated corrupting a good version of a file with a bad one this 
way,. i.e. "{\rtlch\ltrch\dbchLACED with scar}s," gets passed on instead of the good file's "back LACED 
with scars, " I will investigate further when I have time.

James Greenidge
Queens, New York

Comment 6 eric_openoffice 2007-10-16 13:30:28 UTC
@jimwg: Does this happen with all the documents you export to RTF or just every
once in a while? 

I'm asking because for m233 Aqua Intel and OOo 2.3.0 X11 on Intel I cannot
confirm the issue.

OOo Aqua shows 

XT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849

HOUNDS BARK in the distance of a cypress swamp while two ragged black slaves
splash and dash from BOUNTY HUNTERS. His bare back LACED with scars, ex-­Mexican
War Calvary scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave
DULCY, 31, through muck and roots. He ducks behind a tree and slips underwater
and behind a lone hunter to pop up and apply a NECK-POPPING half-­Nelson on him.
Approaching hounds HOWL.

Text-Edit shows:

XT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849HOUNDS BARK in the distance of a
cypress swamp while two ragged black slavessplash and dash from BOUNTY HUNTERS.
His bare back LACED with scars, ex-MexicanWar Calvary scout and Bostonian
mechanic LAZAR HAMMERMAN, 34, tows field slaveDULCY, 31, through muck and roots.
He ducks behind a tree and slips underwaterand behind a lone hunter to pop up
and apply a NECK-POPPING half-Nelson on him.Approaching hounds HOWL.

There are no words missing but it lacks the original formating and blanks. 

Text-Edit:

{\rtf1\ansi\deff0\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New
Roman;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2\fcharset0
Arial;}{\f3\fnil\fprq2\fcharset0 Arial;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\loch\f0\fs24\lang1031\snext1
Normal;}
{\s2\sb240\sa120\keepn\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\afs28\lang255\ltrch\dbch\langfe255\hich\f2\fs28\lang1031\loch\f2\fs28\lang1031\sbasedon1\snext3
Heading;}
{\s3\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\loch\f0\fs24\lang1031\sbasedon1\snext3
Body Text;}
{\s4\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\loch\f0\fs24\lang1031\sbasedon3\snext4
List;}
{\s5\sb120\sa120\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ai\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\i\loch\f0\fs24\lang1031\i\sbasedon1\snext5
caption;}
{\s6\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\loch\f0\fs24\lang1031\sbasedon1\snext6
Index;}
}
{\info{\author Eric Hoch}{\creatim\yr2007\mo10\dy16\hr14\min12}{\author Eric
Hoch}{\revtim\yr2007\mo10\dy16\hr14\min13}{\printim\yr0\mo0\dy0\hr0\min0}{\comment
StarWriter}{\vern6800}}\deftab709
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn11905\pghsxn16837\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0
Standard;}}
\paperh16837\paperw11905\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\pgwsxn11905\pghsxn16837\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pard\plain
\ltrpar\s1\cf0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\rtlch\af3\afs24\lang255\ltrch\dbch\af3\langfe255\hich\f0\fs24\lang1031\loch\f0\fs24\lang1031
{\rtlch \ltrch\loch\f0\fs24\lang1031\i0\b0 XT. EAST TEXAS BAYOU \'96 DAY \'96
SEPTEMBER 1849\'0d\'0dHOUNDS BARK in the distance of a cypress swamp while two
ragged black slaves\'0dsplash and dash from BOUNTY HUNTERS. His bare back LACED
with scars, ex-\-Mexican\'0dWar Calvary scout and Bostonian mechanic LAZAR HAMMER
MAN, 34, tows field slave\'0dDULCY, 31, through muck and roots. He ducks behind
a tree and slips underwater\'0dand behind a lone hunter to pop up and apply a
NECK-POPPING half-\-Nelson on him.\'0dApproaching hounds HOWL.}
\par }

Looks like another PPC only Issue. Strange.
Comment 7 jimwg 2007-10-16 21:14:45 UTC
maveric@openoffice.org wrote:
> ------- Additional comments from maveric@openoffice.org Tue Oct 16 12:30:28 +0000 2007 ----
---
> @jimwg: Does this happen with all the documents you export to RTF or just every
> once in a while?
> I'm asking because for m233 Aqua Intel and OOo 2.3.0 X11 on Intel I cannot
> confirm the issue.
>
>
> Looks like another PPC only Issue. Strange.
>
>   

Suppose I email whoever's doing the investigation the actual copyrighted OOo file to do an RTF export 
from?


There's a strong possibility that this corruption occurred way back while updating a OOo screenplay file 
with a newer RTF version from Mariner Write via OOo's COMPARE documents feature. Maybe some 
formating codes got scrambled in the merge and got passed on from there. The devious thing about it 
is this corruption doesn't render on the OOo screen (like OOo's blind to it), only the RTF export, which 
is shot through with missing or truncated words or characters. Yet even a layman like me can see the 
actual corruption in the "LACED" case:


All appears normal on this cut and paste of OOo editing screen of the corrupted file:


EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849

HOUNDS BARK in the distance of a cypress swamp while two ragged black slaves splash and dash from 
BOUNTY HUNTERS. His bare back LACED with scars, ex-­Mexican War Calvary scout and Bostonian 
mechanic LAZAR HAMMERMAN, 34, tows field slave DULCY, 31, through muck and roots. He ducks 
behind a tree and slips underwater and behind a lone hunter to pop up and apply a NECK-POPPING 
half-­Nelson on him. Approaching hounds HOWL.


How scene looks in a Pre-Corrupted file VIA TEXT WRANGLER:


<text:p text:style-name="P5">EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849</text:p><text:p 
text:style-name="P19"/><text:p text:style-name="P7">HOUNDS BARK in the distance of a cypress 
swamp while two ragged black slaves splash and dash from BOUNTY HUNTERS. His bare back LACED 
with scars, ex-­Mexican War Calvary scout and Bostonian mechanic LAZAR HAMMERMAN, 34, tows field 
slave DULCY, 31, through muck and roots. He ducks behind a tree and slips underwater and behind a 
lone hunter to pop up and apply a NECK-POPPING half-­Nelson on him. Approaching hounds 
HOWL.</text:p>


Scene from Corrupted file VIA TEXT WRANGLER:


<text:p text:style-name="P5">EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849</text:p><text:p 
text:style-name="P21"/><text:p text:style-name="P7">HOUNDS BARK in the distance of a cypress 
swamp while two ragged black slaves splash and dash from BOUNTY HUNTERS. His bare back 
<text:span text:style-name="T4">LACED with scar</text:span>s, ex-­Mexican War Calvary scout and 
Bostonian mechanic LAZAR HAMMERMAN, 34, tows field slave DULCY, 31, through muck and roots. He 
ducks behind a tree and slips underwater and behind a lone hunter to pop up and apply a NECK-
POPPING half-­Nelson on him. Approaching hounds HOWL.</text:p>


And if you RTF export it...

Corrupted RTF export of bad file via TEXTWRANGLER:


\par \pard\plain \ltrpar\s13\cf2\charscalex98\sl-
240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li2160\ri320\lin2160\rin320\fi0\ql\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033
 {\rtlch \ltrch\loch\f6\fs24\lang1033\i0\b0 {\*\bkmkstart DDE_LINK}EXT. EAST TEXAS BAYOU \'96 DAY 
\'96 SEPTEMBER 1849}
\par \pard\plain \ltrpar\s18\cf7\sl-
240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li0\ri680\lin0\rin680\fi0\ql\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033

\par \pard\plain \ltrpar\s14\cf3\charscalex98\sl-
240\slmult0{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\li2160\ri660\lin2160\rin660\fi0\ql\rtlch\af5\afs24\lang255\ltrch\dbch\af5\langfe255\hich\f6\fs24\lang1033\loch\f6\fs24\lang1033
 {\rtlch \ltrch\loch\f6\fs24\lang1033\i0\b0 HOUNDS BARK in the distance of a cypress swamp while 
two ragged black slaves splash and dash from BOUNTY HUNTERS. His bare back 
{\rtlch\ltrch\dbchLACED with scar}s, ex-\-Mexican War Calvary scout and Bostonian mechanic LAZAR 
HAMMERMAN, 34, tows field slave DULCY, 31, through
muck and roots. He ducks behind a tree and slips underwater and behind a lone hunter to pop up and 
apply a NECK-POPPING half-\-Nelson on him. Approaching hounds HOWL.}
\par \pard\plain


And as the corrupted RTF appears in TextEdit:


EXT. EAST TEXAS BAYOU – DAY – SEPTEMBER 1849


HOUNDS BARK in the distance of a cypress swamp while two ragged black slaves splash and dash from 
BOUNTY HUNTERS. His bare back with scars, ex-Mexican War Calvary scout and Bostonian mechanic 
LAZAR HAMMERMAN, 34, tows field slave DULCY, 31, through muck and roots. He ducks behind a tree 
and slips underwater and behind a lone hunter to pop up and apply a NECK-POPPING half-Nelson on 
him. Approaching hounds HOWL.


Check this out: <text:span text:style-name="T4">LACED with scar</text:span>s,


Now this shouldn't be, right?


Again, this corruption doesn't rear its head in OOo -- only in the RTF export!


So far this I've just traced this to one incident with the current docs I'm working with. Don't have much 
time to do a full  fledged multi-document investigation yet.


James Greenidge
Queens New York
using 10.4.10 on 1.25 gHz eMac.


Comment 8 jimwg 2007-10-31 10:21:45 UTC
Yes, I'm encountering text files that were apparently corrupted when previously
using COMPARE DOCUMENTS to import and merge OOo files with RTF files and others
after. You should be able to recreate the issue readily this way. How is it
determined whether and when it's safe to use COMPARE DOCUMENTS to merge RTF
documents with? Is this testing automated?

James Greenidge
Queens New York
Comment 9 jimwg 2007-12-13 00:51:58 UTC
Same COMPARE/Merge with RTG documents corruption symptoms in 680m237 Build 9239. The merging 
process tends to corrupt subsequent RTF exports which don't show up on OOo itself but on other WPs.





Comment 10 philipp.lohmann 2008-10-08 16:30:54 UTC
whatever this is, it would seem to be a problem with the export, not precisely mac.
Comment 11 Mathias_Bauer 2008-11-05 10:21:01 UTC
If someone can confirm this it should go to hbrinkm
Comment 12 michael.ruess 2008-11-21 16:15:41 UTC
MRU->jimwg: could you please attach the part which will be exported incorrectly
to this issue? From the content.xml code you posted above, I can see, that there
are some formattings in the text which may confuse the RTF exporter. So if you
could be so kind and send us the excerpt of your document; this would help us
much in reproducing and debugging this problem. Thanks a lot for your help!
Comment 13 jimwg 2008-11-23 19:07:40 UTC
You all should already have a sample original and corrupted file on-line. Check
out issue 93844.

Good luck bug squashing.

JimWG

Comment 14 jimwg 2008-11-25 19:53:08 UTC
Created attachment 58291 [details]
Belle Delta Hammer 10/13/07 Bad RTF export master ODT
Comment 15 jimwg 2008-11-25 19:55:18 UTC
Created attachment 58292 [details]
Wrath of The Coral Knight Bad RTF export master
Comment 16 jimwg 2008-11-25 19:57:00 UTC
New requested attachments submitted

The "Belle Delta Hammer" attachment is from 10/13/07, from the same batch the
original 82520 sample came from. Though this version has graphics and
colored-text it still misbehaves exactly the same. Do a Compare docs of the RTF
export with a ODT copy. Included is "Wrath of the Coral Knights" as a more
recent example of only a few days created on 3.0.0. rc4. Change the top three
sentences into Times New Roman 12 and then into RTF, and the RTF  copy drops words.

I was told by a copywriter that there's a legal imperative for Sun to fix this
bug, because a RTF export of a medical or chemical report originally in ODT
that's missing or dropped letters or numbers in a drug formula or treatment
profile can have disastrous effects, so I'll do what I can to help you with
this. Please keep me abreast as to your bug-swapping progress.

Good luck.

James Greenidge
New York

Comment 17 michael.ruess 2008-12-09 12:26:51 UTC
MRU->HBRINKM: sometimes the export will leave out a blank following the \dbch
expression in RTF code. See my short sample - the the word "LACED" will not be
displayed anymore after export/re-import because it looks like "\dbchLACED"
instead of "\dbch LACED" in RTF.
Problem is not a macport issue, is also reproducible on Windows.
Comment 18 michael.ruess 2008-12-09 12:31:42 UTC
Created attachment 58647 [details]
shorter sample file
Comment 19 michael.ruess 2009-02-02 14:01:43 UTC
*** Issue 98732 has been marked as a duplicate of this issue. ***
Comment 20 michael.ruess 2009-05-15 07:48:53 UTC
*** Issue 101939 has been marked as a duplicate of this issue. ***
Comment 21 jimwg 2009-05-15 09:50:49 UTC
Can't believe this issue is still active! Missing characters in RTF conversion
is a time-bomb for OOo's reputation, and not just for Writer!
Comment 22 gbpacheco 2009-06-05 17:32:15 UTC
Hi!

I have the same problem with the tag \rtlch in RTF files.
Just open and save the RTF in OpenOffice.org 3.1 that the space after \rtlch is
deleted. 

In the archive attachment (912184.rtf), this occurs with the ALTERA word (first
occurrence): '\rtlchALTERA' instead '\rtlch ALTERA'.

Thanks,
Gustavo.
Comment 23 gbpacheco 2009-06-05 17:34:15 UTC
Created attachment 62803 [details]
similar problem file with \rtlch
Comment 24 Marcus 2017-05-20 11:13:24 UTC
Reset assigne to the default "issues@openoffice.apache.org".