Bug 101862 - Custom Shapes Creation (using handles, formulas etc.) is tedious
Summary: Custom Shapes Creation (using handles, formulas etc.) is tedious
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Keywords: needsUXEval
Depends on:
Blocks: Shapes Shapes-Custom
  Show dependency treegraph
Reported: 2016-09-02 15:22 UTC by jan d
Modified: 2020-05-22 13:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description jan d 2016-09-02 15:22:39 UTC
USER STORY: As an advanced user, I want to create custom shapes shapes to efficiently create drawings (and/or share them with others)

CURRENT BEHAVIOR: Creation of custom shapes demands to 

1. unzip an odg
2. edit the content.xml
3. zip odg.
4. open the odg

For getting feedback on each change. This is rather tedious, in particular when learning to create shapes and or if minor visual adjustments are needed. 

Although custom shapes will only be created by a fraction of users, they can be used by many and can strengthen the ecosystem (some drawing/diagramming applications do have many useful libraries to use for special usecases, e.g. electronics, planning networks or UI wireframing)


* One could expose the content.xml source  and allow this to be edited, much like an HTML can be edited in Browser’s dev tools
* Make reloading a file easier (to get around closing Draw, reopening)
* Make accessing the content.xml easier (to get around the zip/unzip part)

Since it will only make sense for some users, these functions could be enabled via some sort of dev-mode or an extension.
Comment 1 Jean-Baptiste Faure 2016-09-03 21:57:42 UTC
Did you try to use the Gallery ? You can add your own objects, e.g in SVG format, in the Gallery and create an extension to make it available to others.

Best regards. JBF
Comment 2 jan d 2016-09-04 10:13:56 UTC
Hello JBF,
Thanks for your advice. I was probably not specific enough; with "custom shapes" I was referring to shapes that use formulas, handles etc. so the properties you can't create (as far as I am concerned) in the GUI.
Comment 3 jan d 2016-09-04 10:16:17 UTC
I adjusted the title to be more descriptive.
Comment 4 Jean-Baptiste Faure 2016-09-04 10:42:27 UTC
Please, could describe some example?

Best regards. JBF
Comment 5 jan d 2016-09-04 11:13:38 UTC
> Please, could describe some example?

Sure. So build-in shapes of that kind are most of the block arrows: They use a (yellow) handle to allow adjustment of the arrow shape. Internally, they use code like: 

    <draw:handle draw:handle-position="$0 $1" draw:handle-range-x-minimum="0" …


    … draw:enhanced-path="M 21600 ?f0 L ?f1 ?f0 …

to allow that. 

Such custom shapes can also be created by users, like these: http://lautman.net/mark/coo/index.html 

see, for example, the GUI elements in http://lautman.net/mark/coo/GUI_Elements.odg 

There is a shape named "progress bar" which progress bar length can be adjusted via a yellow handle. This is very useful, since without that one would need to move these manually after entering the group etc. 

All the custom handles and behavior needed to be calculated (to find the right points) and written by hand using the unzip/edit/zip/reopen workflow.

…Does the example help in understanding this better?
Comment 6 Heiko Tietze 2016-09-04 19:27:41 UTC
That's definitely needed. Either as code editor or by some visual means.
Comment 7 jan d 2016-09-04 20:21:00 UTC
(In reply to Heiko Tietze from comment #6)
> That's definitely needed. Either as code editor or by some visual means.

I'd love to be able to do this visually. But as an easy and very helpful fix, I think a code editor already helps *a lot*. I can imagine that browser based dev tools might provide some useful patterns of interaction.
Comment 8 jan d 2016-09-06 17:46:23 UTC
related: "More shapes for LibreOffice draw are needed" https://bugs.documentfoundation.org/show_bug.cgi?id=87892
Comment 9 jan d 2017-03-13 18:29:08 UTC
Related: "Custom Shapes, how to print variable value or show variable value to debug" https://bugs.documentfoundation.org/show_bug.cgi?id=106101
Comment 10 Al 2020-05-22 13:51:44 UTC
Adding my vote for easier custom shape creation.  Users should be able to draw the shape then select and drag it to a gallery (e.g. "My Shapes").  Coming from Visio, I was surprised that Draw had no straight forward way to create user defined shapes.