Bug 112055 - No font set when pasting text into a textbox
Summary: No font set when pasting text into a textbox
Status: RESOLVED DUPLICATE of bug 96706
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fonts
  Show dependency treegraph
 
Reported: 2017-08-27 09:53 UTC by Telesto
Modified: 2018-02-21 09:21 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (8.81 KB, application/vnd.oasis.opendocument.text)
2017-08-27 09:53 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2017-08-27 09:53:35 UTC
Description:
No font set when pasting text into a textbox

Steps to Reproduce:
1. Open the attached file
2. Select the text (CTRL+A) and copy (CTRL+C)
3. Insert the a textbox: Insert -> Textbox
4. Paste CTRL+V
5. That the font differs from the source
6. Exit the textbox (notice the font changes again; still different from source)

Actual Results:  
The font isn't maintained when pasting into a textbox

Expected Results:
Should be so


Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: 6.0.0.0.alpha0+
Build ID: 02c53f744ed23e2149fc7c83d67cb7d8aa5eb0ed
CPU threads: 4; OS: Windows 6.19; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-24_05:48:55
Locale: nl-NL (nl_NL); Calc: CL

and in
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71


User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2017-08-27 09:53:57 UTC
Created attachment 135816 [details]
Example file
Comment 2 Jacques Guilleron 2017-08-28 12:45:33 UTC
Hi Telesto,

Reproduced with
LO 6.0.0.0.alpha0+ Build ID: 02c53f744ed23e2149fc7c83d67cb7d8aa5eb0ed
CPU threads: 2; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-08-24_05:48:55
Locale: fr-FR (fr_FR); Calc: CL
and
LO 3.5.3.2 Version ID : 235ab8a-3802056-4a8fed3-2d66ea8-e241b80
Also with
OOo 3.1.0  OOO310m11 (Build:9399) on XP.

In fact, the font name is not retained and you have to set it again.
Inherited from OOo
Comment 3 Heiko Tietze 2018-02-20 21:32:19 UTC
When you copy a text with paragraph/character style it would be necessary to accept the properties at the textbox. Though, the textbox is likely not capable of styles - intentionally in my opinion. Of course, the properties could get burned in as direct formatting.
Comment 4 Regina Henschel 2018-02-21 00:11:24 UTC
Currently the elements inside the text box are not able to use custom styles (those from styles.xml). That is a limitation of LibreOffice and not covered by file format.

Currently the <span> elements in the paragraphs inside the text box can use the same automatic styles as the <span> elements in the original text. LibreOffice uses it already, but not in all cases. That can be improved, but the current solution is not really an error.

The real problem is, that the paragraph styles are not handled correctly. The original text uses paragraph style "Standard", which is "Default style" in the UI. Because of the lacking feature of using custom styles from styles.xml, currently special automatic paragraph styles are generated in custom.xml. But that is wrongly done. It would be sufficient, if these special styles would get a style:parent-style-name="Standard" and nothing else. And in case the original text uses already an automatic paragraph style, the same automatic style can be used directly in the text-box.

That is about file format. Changes in the internal model might be more difficult.
Comment 5 Heiko Tietze 2018-02-21 08:48:26 UTC
(In reply to Regina Henschel from comment #4)
> The real problem is, that the paragraph styles are not handled correctly.

So I suggest to close this ticket as WF and create another for incorrect handling of the Standard style.
Comment 6 Heiko Tietze 2018-02-21 09:21:25 UTC
Or rather as dup of 96706

*** This bug has been marked as a duplicate of bug 96706 ***