Bug Hunting Session
Bug 89369 - Add support for drawing styles (shapes and textboxes) to Writer and Calc
Summary: Add support for drawing styles (shapes and textboxes) to Writer and Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 115462 (view as bug list)
Depends on: 123789
Blocks: Unify-Across-Apps Writer-Styles Calc-Styles
  Show dependency treegraph
 
Reported: 2015-02-13 20:50 UTC by Yan Pas
Modified: 2019-04-06 21:34 UTC (History)
12 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
Fill and line styles for objects drawn in Calc or Writer are selectable in current 4.3, 4.4 releases and builds of master.

The Drawing and Drawing Object Properties are available in both components. Drawing objects can be modified, or new objects created with style other than the default fill and line color.

Resolving invalid.
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. ***