Issue 78162 - Surrogate's character dispeared when updated the font type(size, color ...)
Summary: Surrogate's character dispeared when updated the font type(size, color ...)
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 2.2.1 RC2
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on: 105571 105901
Blocks: 102943
  Show dependency tree
 
Reported: 2007-06-07 03:08 UTC by kangjch
Modified: 2013-08-07 14:44 UTC (History)
10 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
example with some DejaVuSans non-bmp unicodes (7.73 KB, application/vnd.oasis.opendocument.text)
2008-09-15 13:24 UTC, hdu@apache.org
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description kangjch 2007-06-07 03:08:43 UTC
Steps:
 1. Create a new document by writer.
 2. Input any two surrogates' characters.
      e.g. Insert-> Special Characters, In "Special Character" dialog, 
        1) Set Font: 宋体-方正超大字符集,
        2) Select Characters: U+20000, U+20001. 
        3) press the 'Ok' button.
 3. Select the first characters, do any following one operations
        1) Modify the font size.
        2) Set the character into Bold.
        3) Set the character into Italic.
        4) update the font color.
        ....
 4. The first surrogates' character(in e.g is U+20000) is dispeared.

reproduced rates: >90%
Comment 1 michael.ruess 2007-06-07 12:08:20 UTC
Reassigned to ES.
Comment 2 eric.savary 2008-09-12 15:25:54 UTC
Reproduced in OOO300m3 on Vista with MS PMincho:
- New document
- Insert character U+2000B and U+20089
- Format from 12 to 14pts
-> U+20089 disappears

Note: Save & reload, everything is fine.
Comment 3 hdu@apache.org 2008-09-15 13:24:59 UTC
Created attachment 56542 [details]
example with some DejaVuSans non-bmp unicodes
Comment 4 hdu@apache.org 2008-09-15 15:24:48 UTC
@fme/@tl: Writer+EditEngine get the selection wrong: they split surrogate pairs!

Example: load the attached bugdoc i78162_dejavu.odt, then use the mouse to select the "BC" part out 
of the "ABCD" string. Then change e.g. the background color of that selection. What happens is that the 
original portion
    U+D835 U+DDA0 U+D835 U+DDA1 U+D835 U+DDA2 U+D835 U+DDA3
gets split into
    U+D835
    U+DDA0 U+D835 U+DDA1 U+D835 
    U+DDA2 U+D835 U+DDA3
These are all incomplete surrogate pairs.

This also causes problems like e.g. the crash from reportid r6d9yuc in
   URIHelper::FindFirstURLInText() (ooo300/src.m5/svtools/source/misc/urihelper.cxx:654)
because the code there doesn't expect invalid surrogate pairs.

@tl: I reassigned this bug to fme, but EditEngine has the same problem. Please split off a separate issue 
if needed.
Comment 5 frank.meies 2008-12-09 15:41:27 UTC
Set target to 3.x
Comment 6 stefan.baltzer 2009-10-14 15:55:32 UTC
See also issue 105571.
Comment 7 hdu@apache.org 2009-10-14 16:11:02 UTC
Indeed the fixes for issue 105771 and its followup issue 105901 will solve this problem in the 
WriterEngine. The remaining problem is in EditEngine then. Reassigning accordingly.
Comment 8 hdu@apache.org 2010-08-05 12:47:07 UTC
Issue 105571 was mistyped as 105771 in my comment above.