Bug 89369 - Introduce Drawing object styles (shapes, textboxes...) to Writer & Calc like in Impress/Draw
Summary: Introduce Drawing object styles (shapes, textboxes...) to Writer & Calc like ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 inReleaseNotes:7.6
Keywords:
: 115462 129438 132175 132568 133226 144148 (view as bug list)
Depends on: 123789
Blocks: Unify-Across-Apps Sidebar-Styles Textbox Writer-Styles Calc-Styles Shapes LibO-Enhancements 134014
  Show dependency treegraph
 
Reported: 2015-02-13 20:50 UTC by Yan Pas
Modified: 2024-04-03 09:00 UTC (History)
21 users (show)

See Also:
Crash report or crash signature:


Attachments
NO STYLES IN WRITER (113.33 KB, image/png)
2015-02-14 18:09 UTC, Yan Pas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yan Pas 2015-02-13 20:50:55 UTC
All objects I draw in this two modules has unchangeable fill and line styles. They are always Blue. There are no styles in this components for graphical objects!
Comment 1 raal 2015-02-14 05:55:39 UTC
Lack of graphic styles in writer& calc was problem also in openoffice. Setting to new.
Comment 2 V Stuart Foote 2015-02-14 17:43:25 UTC Comment hidden (obsolete)
Comment 3 Yan Pas 2015-02-14 18:09:03 UTC
Created attachment 113386 [details]
NO STYLES IN WRITER

No they are unavailible. I can change color, but I can't handle multiple styles and default styles. There are no way to draw green filled objects in Writer!
Comment 4 Yan Pas 2015-02-14 18:10:17 UTC
What I want - is to set default colors of drawing objects in Writer/Calc. I do not want to draw blue objects always
Comment 5 V Stuart Foote 2015-02-14 23:13:56 UTC
Sorry, it was unclear suggestion was implementing styles based manipulation of drawing/graphical objects. I was referring to the toolbars--"Drawing" and "Drawing Object Properties" that are used to directly style any drawing or graphic object in Draw or Calc. 

In the source code, styles for drawing objects are directly applied from the "drawingobjectbar". Any drawing or graphic object, existing or newly created, can be directly modified using that toolbar. In Draw and Impress the same "drawingobjectbar" is named "Line and Filling" and it has the same default settings.

Direct styling as set from these toolbars is stateful and is available for subsequent drawing/graphic objects.

The default color for the Drawing Object Properties toolbar defaults to Tango:Sky Blue 1 area fill, and Tango:Sky Blue 2 for outline color.

Currently, as suggested by OP, there is no management for styles of drawing objects in Writer or Calc. But also, there is only a cursory style management of drawing objects in Draw and Impress.

That consists of just four rudimentary styles which are now provided in the Sidebar deck from the Styles and Formatting Content Panel--all four were derived simply from the Drawing Objects Properties/Line and Filling menu but they can be edited to add additional "styles" to the content panel.

Object with arrow
Object with no fill and no line
Object with shadow
Object without fill

Unfortunately I believe the default for Area fill and Line colors are hard coded and not customizable in Expert Configuration (drawingobjectbar attributes) meaning that .uno:FormatArea and .uno:FormatLine will currently default to Tango:SkyBlue1 and SkyBlue2 respectively.

Three aspects to this enhancement:

1) It should be possible to add the same four default Object styles to the Calc and Writer Styles and Formatting content panel. Possibly as an addition to the Paragraph - Character - Frame - Page - List horizontal bar. Or if need be as a new content panel for Drawings and Graphics.

2) It should be possible to make assignment of default color for Area color and Line color available either from the Tools -> Options -> Appearance panel, or from the Tools -> Options ->  Advanced: Expert Configuration dialog.

3) A more comprehensive set of predefined attributes for drawing/graphics objects could expand the limited set of four now provided.

Over to ux-advise for consideration.
Comment 6 V Stuart Foote 2015-02-14 23:26:31 UTC
(In reply to V Stuart Foote from comment #5)
4s/Draw or Calc/Writer or Calc/
Comment 7 Yan Pas 2015-02-15 08:53:24 UTC
Addition to enchancement: 
4) Add line with arrow (LWA) on the end to Writer and Calc drawing panel. Very handy for drawing schemes.

I guess the reason why LWA exists in Draw and Impress is styles of graphical objects. Writer and Calc remember only one type of each graphical object.
Comment 8 pierre-yves samyn 2015-02-15 12:48:37 UTC
Hi

I agree with that enhancement but I can suggest a workaround in the meantime:
To change the default options for Drawing toolbar tools, select one of the tools and define the options *before* drawing the first object. This will remain the default for the *current session* to the *current document*.

Steps to reproduce:
1. File> New> Spreadsheet (Text document...) or open an existing document
2. View> Toolbars> Drawing to display the drawing toolbar (if it is not already)
3. Select a tool (e.g. Rectangle) *do not draw*
4. Select attributes in the "Drawing Object Properties" toolbar (e.g. Line style:fine dashed, Line width: 0.10, Line color: Red, Area filling: pale yellow, and so on)
5. Select a tool (rectangle, ellipse, shapes, line...) and draw...

Regards
Pierre-Yves
Comment 9 V Stuart Foote 2015-02-15 17:44:15 UTC
Removed the VOTE whiteboard entry, per:

https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Whiteboard/Inactive#VOTE
Comment 10 Yan Pas 2015-09-13 20:49:48 UTC
pierre-yves samyn, tons of thanks! Really cool workaround for most of cases
Comment 11 Yousuf Philips (jay) (retired) 2015-09-20 01:59:52 UTC
(In reply to Yan Pashkovsky from comment #4)
> What I want - is to set default colors of drawing objects in Writer/Calc. I
> do not want to draw blue objects always

In order to not draw blue objects always, you would need to set the fill and line colors before drawing a shape and in order to do that, you'd need to add the fill and line color controls to the drawing toolbar, as the drawing object properties toolbar is context sensitive.

This is the same way it works in Impress and Draw, as the drawing toolbar is always visible and those two controls are in it. It might be useful to also add those two controls into the drawing toolbar by default in Writer and Calc, as i did with impress and draw, though it may seem strange that the drawing and drawing object properties toolbars both have the same two coloring controls.

(In reply to V Stuart Foote from comment #5)
> Three aspects to this enhancement:
> 
> 1) It should be possible to add the same four default Object styles to the
> Calc and Writer Styles and Formatting content panel. Possibly as an addition
> to the Paragraph - Character - Frame - Page - List horizontal bar. Or if
> need be as a new content panel for Drawings and Graphics.

Styling of images/graphics in Writer is handled in frame styles, as images are treated as frames in Writer.

> 2) It should be possible to make assignment of default color for Area color
> and Line color available either from the Tools -> Options -> Appearance
> panel, or from the Tools -> Options ->  Advanced: Expert Configuration
> dialog.

Yes that would be great, as the default colors are hardcoded. (bug 90721)

> 3) A more comprehensive set of predefined attributes for drawing/graphics
> objects could expand the limited set of four now provided.

Yes this was a definite thing that needed to be changed, as me, heiko, matthias, and others at a design meeting went through them and laughed that they were pretty much useless. Same thing happened with cell styles (90937).

(In reply to Yan Pashkovsky from comment #7)
> Addition to enchancement: 
> 4) Add line with arrow (LWA) on the end to Writer and Calc drawing panel.
> Very handy for drawing schemes.

Many of the drawing controls found in Impress/Draw arent available in Writer and Calc, or else i would have already added them. (.uno:LineArrowEnd, .uno:ArrowsToolbox, .uno:LineToolbox, .uno:ConnectorToolbox, .uno:Polygon [bug 90505])

> I guess the reason why LWA exists in Draw and Impress is styles of graphical
> objects. Writer and Calc remember only one type of each graphical object.

I doubt object styles would be the reason why. @Maxim: Any insights?

Would be useful to retain this bug specifically for shape styles in write/calc and open up separate ones for other enhancements. I'll be opening the one about a new set of default graphic styles in impress/draw.
Comment 12 Yousuf Philips (jay) (retired) 2017-10-05 15:39:49 UTC
Regina: according to ODF, can shapes have styles in an ODT?

We do have alot of styling already in Writer, so we'll need to add room for this possibility in the styles sidebar deck.
Comment 13 Regina Henschel 2017-10-05 19:53:16 UTC
I see no problem from point of file format. If you write a custom style manually into the file, it is read.

But it will result in a huge change in code. It is not solved by only adding something to the sidebar. Are there any sponsors?
Comment 14 Regina Henschel 2017-12-07 19:53:00 UTC
In detail: Currently the fact, that a text box shape in Writer has no custom style is used to distinguish a text box shape (simple text content) from a frame (rich content).
Comment 15 Roman Kuznetsov 2019-04-06 21:34:08 UTC
*** Bug 115462 has been marked as a duplicate of this bug. ***
Comment 16 Heiko Tietze 2019-12-17 08:06:53 UTC
*** Bug 129438 has been marked as a duplicate of this bug. ***
Comment 17 John 2020-01-08 09:53:44 UTC
In Calc, when you add a comment, its font is the same as the font of the Default cell style.

However, text inside text boxes and text inside shapes don't follow this logic. Its font is always Liberation Serif.

Instead of providing option to have shape styles, we can simply fix the missing logic:

* In Calc: text boxes and shapes should take the font of the Default cell style.

* In Writer: text boxes and shaped should take the font of the Default Style paragraph style.

I don't use Draw, so I provide no opinion about it.
Comment 18 Roman Kuznetsov 2020-04-17 11:23:47 UTC
*** Bug 132175 has been marked as a duplicate of this bug. ***
Comment 19 andreas_k 2020-04-17 21:27:28 UTC
So it look like an old enhancement what's going on since 2015?

I start add shapes to the gallery and the shapes will have style support see Bug 132138. The benefit will be that in draw and impress all the gallery shapes will follow the style of the draw/impress template so all gallery items will fit perfect into the global template setting (cause the gallery items use Default Drawing Style and Accent 1, ... drawing style).

In writer all the sexy gallery items will be imported with the not so sexy Tango:Sky Blue 1 and Tango:Sky Blue 2 colors. If there will be Drawing Style support in writer/calc we can define black/white for the default drawing style which cause the benefit of sexy gallery items AND the default shapes want be hardcoded Tango Blue any more (or even better shapes will use hardcoded Tango Blue as long as there is no Drawing Style defined). So we can solve not only fix this style support bug, we are than also flexible with the Tango Blue.

@maxim how would it be possible to define drawing styles in writer/calc?
Comment 20 andreas_k 2020-04-17 22:06:51 UTC
As I understood the big part is the UI, would it be possible to add the Styles part to the template file in a first step and in an second step make the settings from the template file available in the styles sidebar?
Comment 21 V Stuart Foote 2020-05-21 17:31:23 UTC
*** Bug 133226 has been marked as a duplicate of this bug. ***
Comment 22 Telesto 2020-05-21 18:07:11 UTC
Quote from bug 133226 comment 2
Images belong to "frame".

For shapes, there is no problem in ODF, but in LibreOffice.

Custom shapes can have an associated text frame in Writer. No idea yet, how to get that properly to ODF. Related: bug 128120

Text boxes are distinguished from frames by having no custom style in Writer. Before introducing custom styles for text boxes, that needs to be solved.
Related: bug 62836

Frames allow custom styles on their content, text boxes not. That has to be solved too. Related: bug 107963, bug 111921

Besides that, some other related bugs: bug 96706, bug 112055

For all other shapes it would be possible to introduce custom styles in Writer.
Related: bug 115462, bug 115704, bug 129438, bug 89369
Comment 23 Telesto 2020-05-21 18:14:18 UTC Comment hidden (obsolete)
Comment 24 V Stuart Foote 2020-05-21 19:44:38 UTC Comment hidden (obsolete)
Comment 25 Heiko Tietze 2021-08-30 08:27:28 UTC
*** Bug 144148 has been marked as a duplicate of this bug. ***
Comment 26 Heiko Tietze 2022-05-23 12:16:38 UTC
*** Bug 132568 has been marked as a duplicate of this bug. ***
Comment 27 Eyal Rozenberg 2022-12-23 19:01:56 UTC
Some style categories are present in Writer but not in Impress/Draw (like Character and Paragraph Styles; see meta-bug 152652), and for some - it is the other way around, like Drawing Object styles. We should definitely have a wide common denominator in term of style categories.
Comment 28 Heiko Tietze 2023-01-05 10:22:23 UTC
Armin, what do you think?
Comment 29 Maxim Monastirsky 2023-02-15 20:41:23 UTC
Here is my attempt to support drawing styles in Calc (still WIP):

https://gerrit.libreoffice.org/c/core/+/147110
Comment 30 Timothy Ferriss 2023-05-12 07:15:25 UTC Comment hidden (spam)
Comment 31 Victor Patrick 2023-06-26 09:22:38 UTC Comment hidden (spam)
Comment 32 Stéphane Guillou (stragu) 2024-01-09 15:52:55 UTC
Maxim added Drawing Styles to Calc for version 7.6:

https://gerrit.libreoffice.org/q/owner:momonasmon%2540gmail.com+sc+drawstyles

It works for shapes and comments.

Mentioned in the release notes: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F7.6&type=revision&diff=672484&oldid=672210

Thank you Maxim!
Comment 33 Eyal Rozenberg 2024-01-12 13:17:17 UTC
(In reply to Stéphane Guillou (stragu) from comment #32)
> Maxim added Drawing Styles to Calc for version 7.6:

1. Also thanking Maxim for his work.
2. Should we split this bug to only keep the Writer aspect of it, or just leave it open until this happens for Writer as well?
Comment 34 Kendrey 2024-04-03 08:58:43 UTC Comment hidden (spam)
Comment 35 Kendrey 2024-04-03 09:00:09 UTC Comment hidden (spam)