When creating a textbox, and applying a character style to the text in the textbox, the style is applied, but "copied" since Libre Office will create an "automatic-styles" in content.xml instead of using the one describe in styles.xml.
It would have been intended to have the proper "style-name" from styles.xml appear in the "span" node instead of an "automatic-style" which is not even indicating it's parent-style-name.
The other solution would be to at least have the parent-style-name set properly in the automatic-style for such a case. So there is a way to know the textbox characters are using a user-defined style.
(This "bug" prevents external softwares analyzing content.xml to understand that there is a logical relation between the style applied on the text in the text-box and the style sheet.)
Thank you very much and have a nice day!
Steps to Reproduce:
1. Create a character style with "MyCharacterStyle" with bold.
2. Create a textbox (not a text frame) and add "ABC" as text.
3. Select the text in the textbox and apply the character style "MyCharacterStyle".
4. Save, close, open the document. The style is no more selected.
5. Open the source file in content.xml, you see the span uses an automatic-style.
6. Go check the automatic-style, the parent-style-name is not even given.
in content.xml you see the span node containing the "ABC" text has an automatic-style instead of "MyCharacterStyle". The automatic-style also does not have any parent-style-name.
The span node containing the "ABC" text should use the "MyCharacterStyle" defined in styles.xml.
If an automatic-style must be created, the parent-style-name should make a reference to "MyCharacterStyle" from styles.xml.
User Profile Reset: No
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
How do you create a "textbox"? If I use the "T" symbol, LibreOffice creates a shape and there is no possibility to assign a character style for text inside this shape.
I used the “T” symbol, indeed. And I just remarked that indeed it is impossible to apply a style.
But when I made my first experiments, I did not apply the style. In fact I copied and pasted already styled characters into the textbox. The formatting was kept, etc.
So to reproduce the behaviour:
1. Type “ABC” in the main editor.
2. Apply character formatting to it.
3. Create the textbox (T icon in the insert menu)
4. Copy the ABC in the main text and paste it into the textbox.
The same character formatting is kept, but there is now a disconnection between the character and the style.
Now I understand this it is probably not meant to behave like that, but I would certainly have appreciated it.
Thank you and best regards!
Pinging UX team: I tried to find a feature request for enabling text styles in Textboxes, but nothing came up. Have you ever discussed it? I did find reports urging to disable style controls context-sensitively.
I found I had carelessly accepted bug 96706 as NEW in 2015.
Bug 37511 is also related.
Pasting a character styled text into a box leads in fact to some trouble. It is saved like this
<style:style style:name="T1" style:family="text">
<style:text-properties fo:font-variant="small-caps" fo:color="#008080"...
<text:p text:style-name="P3"><text:span text:style-name="T1">He heard quiet steps behind him.</text:span></text:p>
Calligra opens this document and allows to set both paragraph and character style in text boxes. Alternatively, we could apply the default character style before pasting. But why do we restrict the formatting in objects (we do not talk about text box only but also shapes)?
The heart of this problem is that LO lacks the ability to set paragraph styles on the text inside of graphical objects such as shapes and textboxes. When that issue is addressed this problem will be resolved with it.
We either need to file a new bug for that or focus this bug report on that bigger issue.
If there is no limitation from the format (Regina?) and no compatibility restrictions, this could be implemented easily (at least regarding the UI). Otherwise WONTFIX.
Don't see need for input from UX.
(In reply to Heiko Tietze from comment #4)
> But why do we restrict the formatting in objects (we
> do not talk about text box only but also shapes)?
I have found that historically we have restricted text box functionality to match that of MSO. By limiting our functionality to those MSO provided at the time, we avoided conversion errors when exporting to their format. Over the years MSO text box functionality has evolved, while we have maintained many of the old limitations.
Here is a chart showing how text frames(pre-2000) have evolved to text boxes(2000-2007) which evolved to shape textboxes (2010).
From that chart and my own testing, both the OOXML and the binary MS-DOC format now support text boxes with styles.
There exists no format reason. LibreOffice could immediately implement that feature, totally in existing ODF format, without any need to use private namespace. And the fact, that a feature is missing in MS Office should never be a reason to not implement that feature in LibreOffice. What is bad in becoming better than MS Office?
Perhaps implementing user defined paragraph and character styles for the shape "Text box" is a topic for a GSoC project?
*** Bug 107963 has been marked as a duplicate of this bug. ***
*** Bug 130923 has been marked as a duplicate of this bug. ***
Bug 40871 is the similar request for text boxes in Draw/Impress.