Bug 47679 - Copy + Paste changes "OpenSymbol" font to "StarSymbol"
Summary: Copy + Paste changes "OpenSymbol" font to "StarSymbol"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected)
3.5.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Font-Rendering Clipboard
  Show dependency treegraph
Reported: 2012-03-21 13:11 UTC by Tobias Burnus
Modified: 2020-07-24 21:17 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:

sample ODT showing PUA Unicode being applied to OpenSymbol glyphs (925.87 KB, application/vnd.oasis.opendocument.text)
2020-07-24 21:17 UTC, V Stuart Foote

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2012-03-21 13:11:36 UTC

Comment 1 Tobias Burnus 2012-03-21 13:14:30 UTC
Create some text box, enter, e.g., "↓↑" and choose as font "OpenSymbol". Copy those character - and paste them somewhere. The font is change to "StarSymbol".

(According to the font list, only "OpenSymbol" exists but no "StarSymbol".)
Comment 2 QA Administrators 2015-01-05 17:51:15 UTC Comment hidden (obsolete)
Comment 3 Buovjaga 2015-01-21 16:01:04 UTC

Win 7 Pro 64-bit Version:
Build ID: 07e84cae983c08afdba03018413a19d01abb3006
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2015-01-19_06:15:38
Comment 4 QA Administrators 2016-09-20 10:10:25 UTC Comment hidden (obsolete)
Comment 5 José Trujillo 2016-11-11 19:35:56 UTC
Bug reproduced.
Bug remains.
Comment 6 José Trujillo 2016-11-11 19:38:07 UTC
Product: LibreOffice
Component: Impress
Hard. AMD64
SO: Linux (Debian Jessie)

Bug reproduced.
Bug remains.
Comment 7 QA Administrators 2018-07-03 02:39:09 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2020-07-03 03:40:22 UTC Comment hidden (obsolete)
Comment 9 V Stuart Foote 2020-07-24 16:11:46 UTC
Was reviewing this (while looking at bug 101174). We are no longer getting a StarSymbol font name, so can close. But I think we have a logic issue on the font PUA mapping done with [1].

Copy - Paste is getting garbled. But Copy - Paste Special 'Unformatted text' receives the correct Unicode in the paragraph font (with fallback to OpenSymbol for glyphs).

Working with the string, all in OpenType:
»†‡€  --> U+00bbU+2020U+2021U+20ac

I get that string with paste special 'Unformatted Text' (so it falls back to OpenSymbol)

But I get nonsense --> U+f0bbU+f086U+f087U+f080 with Paste (i.e. as OpenSymbol).

So we seem to have some PUA map occurring for a paste as OpenSymbol, and the codepoints look to match fontcvt.cxx assignments.

[1] https://opengrok.libreoffice.org/xref/core/unotools/source/misc/fontcvt.cxx?r=a7f74d5d
Comment 10 V Stuart Foote 2020-07-24 21:17:33 UTC
Created attachment 163496 [details]
sample ODT showing PUA Unicode being applied to OpenSymbol glyphs

So this really is continuing. Just the StarSymbol font name is not being applied:

STR for attached document

1. new Writer document
2. insert a draw Text box on document
3. use Special character dialog and select OpenSymbol font
4. enter a string of OpenSymbol glyphs via Special Character dialog
5. change anchor to page and drag aside
6. Ctrl+C select the string in the Draw text box
7. paste into a paragraph with Ctrl+V -- what is pasted?
8. paste special into a paragraph with Ctrl+Shift+V and select unformatted -- what is pasted?

9. new paragraph, change its font to OpenSymbol
10. Ctrl+C copy string from Draw text box
11. Ctrl+V paste into the paragraph with OpenSymbol font -- what is pasted?
13. Ctrl+Shift+V paste special as "unformatted text" -- what is pasted?

At some point the labeling of the pasted OpenSymbol text string as StarSymbol was removed--but the handling of OpenSymbol and mapping of the Unicode to PUA was not corrected.

Pasting a string of OpenSymbol should retain the assigned Unicode for the font. Behavior now seems a hold over from StarOffice era.