Apache OpenOffice (AOO) Bugzilla – Issue 78095
Pasting a surrogates character from MS office word to OOo produce an additive device.
Last modified: 2017-05-20 11:17:56 UTC
Preconditions: Microsoft Office2003, OOo2.2.0 As following is the steps for reproducing. Steps: 1. Create a documents by Microsoft office word 2003. 2. Input 0x20000 and press key Alt+x. 3. Select and copy(Ctrl+c) this character. 4. Created a new documents by OOo writer, Paste(Press Ctrl+x). 5. Diplay additive device. and I test many surrogate pairs (the code points are in 0x20000-0x22000 which belong to CJK EXT-B).
Reassigned to ES.
In Steps 3: Select All(Ctrl+A) and copy(Ctrl+c) this character.
According to Stephen Bergmann, I'd like to investigate it.
Now I retest it in SRC680_m215. In the upcoming Step 4. Created a new documents by OOo writer, Paste(Press Ctrl+x). still wrong characters. Besides, direclty pasting, When I paste as folowing special methods 1. "Microsoft office word documents", displaying a frame, double click it, MS word can be opened, the right character is shown in it. 2. "Html Format", display a yellow background's frame, a ? is in it. 3. "Html Format without format", only a '?' is shown. *4. "Formated Text(RTF)", Right character is shown. *5. "Unformated Text", Right character is shown. *6. "GDI metafile", also displaying a frame, in it the right character is shown. Notes: "*n" the right(wanted) case.
@kangjch: So, case 1 ("Microsoft office word documents") also works correctly, right? That only leaves cases 2 and 3 (HTML) as broken (plus the default copy action, which appears to be one of 2 or 3; I asked os which of the cases is chosen as the default, but he could not tell offhand). For clipboard import of HTML into Writer, code in sw/source/filter/html is used, so you should look there.
->kangjingchuan
confirm
Created attachment 46326 [details] the fixed codes
I have attached the modifying codes named patch.diff, please check it.
kangjch, re the attached patch.diff: As I already wrote at <http://sw.openoffice.org/servlets/ReadMsg?list=dev&msgNo=1796>: "That's cheating, I would say: The user requests to insert HTML, but you change that to RTF instead. (Plus, it does not work if there is no RTF available for the clipboard data.) I guess the real fix would be to the ReadHTML function instead..."
Stephan, please take over.
following release status meeting -> target 3.x
.
Reset assigne to the default "issues@openoffice.apache.org".