Bug 169894 - "Clear Direct Formatting" on a new textbox styles it like a rectangle (blue background + solid border)
Summary: "Clear Direct Formatting" on a new textbox styles it like a rectangle (blue b...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
25.8.1.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: ImpressDraw-Styles Textbox
  Show dependency treegraph
 
Reported: 2025-12-08 12:41 UTC by Eyal Rozenberg
Modified: 2025-12-08 15:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2025-12-08 12:41:23 UTC
Reproductin instructions:

1. Create a new Impress presentation (default template)
2. Insert a text box
3. Type in some text (e.g. "hello"), so that the textbox doesn't disappear
4. Select the textbox
5. On the menus, choose "Format > Clear Direct Formatting"

Expected result:
Nothing happens - we have not applied any direct formatting.

Actual result:
Textbox is now styled like a rectangle would be: Blue background, solid black border.


It seems like we're treating the no-background and no-border styling of the text box as though it was DF rather than its style. And indeed, the textbox is indicated to have "Default Drawing Style" - which means solid area and border.

Textboxes should probably have their own style. "Object with no fill and no line" is almost a good choice - except that it has "fit to text", which textboxes don't have by default.
Comment 1 Heiko Tietze 2025-12-08 13:31:32 UTC
Indeed, the text box does not use the Default Drawing Style by default but it is applied per Clear Direct Formatting. I don't see a clear path to solve this.
Comment 2 Eyal Rozenberg 2025-12-08 13:34:15 UTC
(In reply to Heiko Tietze from comment #1)
> Indeed, the text box does not use the Default Drawing Style by default

Actually, it does and it doesn't. That is, the named style it's associated with is "Default Drawing Style", and it is apparently direct-formatted over it.

> I don't see a clear path to solve this.

Why not a child style for textboxes?
Comment 3 Regina Henschel 2025-12-08 15:36:24 UTC
The text box could have the style "Object with no fill and no line" as default. The style "Text" is not suitable because it has a gray background.
Comment 4 Eyal Rozenberg 2025-12-08 15:45:30 UTC
(In reply to Regina Henschel from comment #3)
> The text box could have the style "Object with no fill and no line" as
> default.

It's true that a textbox is an object with no fill and no line. But - that style has "fit height to text", while we want our textboxes to keep the size they were drawn to have.

So, do you think that...

* We should change "object with no fill and no line" to not fit height to text?
* We should have textboxes be resized immediately after drawing and entering text, to the size of that text (so that textbox placement is really just placement of the textbox corner)?
* We should use a third style, not currently existing, reflecting textboxes' current default formatting?
Comment 5 Heiko Tietze 2025-12-08 15:49:04 UTC
(In reply to Regina Henschel from comment #3)
> The text box could have the style...
We usually set a couple of attributes via hard-coding to the default object and it might match a style but not necessarily.