Bug 87892 - More shapes for LibreOffice draw are needed (see comment 22)
Summary: More shapes for LibreOffice draw are needed (see comment 22)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0
Keywords: difficultyBeginner, easyHack, skillDesign
: 108221 (view as bug list)
Depends on:
Blocks: Gallery Shapes
  Show dependency treegraph
 
Reported: 2014-12-31 07:11 UTC by vkmr2012
Modified: 2024-04-10 11:04 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Dia Shapes ScreenShot (151.66 KB, image/png)
2014-12-31 10:40 UTC, vkmr2012
Details
screenshot of Calligra Flow (128.60 KB, image/png)
2014-12-31 12:52 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vkmr2012 2014-12-31 07:11:58 UTC
Draw has basic shapes for drawing flow charts and basic drawings. More shapes are needed like uml, DFD, electrical etc.

Dia has these shapes.
Visio has these shapes.
Calligra Flow has these shapes.

Then why under the sun, LO draw cannot have these shapes. After so many years of development, still the extra shapes are absent.
LO Draw core is very powerful, but is very under utilized, due to lack of shapes. If you donot want to create new shapes yourself, then allow importing Dia stencils in LO Draw.

Thanks.
Comment 1 Yousuf Philips (jay) (retired) 2014-12-31 08:42:31 UTC
Hi vkmr2012,

Thank you for submitting the enhancement. Could you possibly send in screenshots of these applications for the shapes that you want added to Draw.
Comment 2 vkmr2012 2014-12-31 10:39:45 UTC
Here is the screen shot of Dia shapes Listing. They are too numerous for a single screen shot to depict. A better option will be to install Dia and see the shapes for reference. If you cannot create these shapes, then allow people to create them and be added to LO.
Comment 3 vkmr2012 2014-12-31 10:40:43 UTC
Created attachment 111566 [details]
Dia Shapes ScreenShot
Comment 4 Yousuf Philips (jay) (retired) 2014-12-31 12:52:31 UTC
Created attachment 111572 [details]
screenshot of Calligra Flow
Comment 5 Yousuf Philips (jay) (retired) 2014-12-31 12:54:32 UTC
Yes i believe it would be great to add a wide range of shapes and not just the basic ones that are currently present, primarily for Draw.
Comment 6 Yousuf Philips (jay) (retired) 2014-12-31 13:07:53 UTC
Looking at the file structure of Dia and Calligra Flow, one of the two is likely borrowing the shapes from the other.

/usr/share/kde4/apps/flow/stencils/
/usr/share/dia/shapes/

Flow has the stencils in .odg format, so it is possible to import them into a Draw document throught Insert > File, but it puts it in as another page rather than ideally putting it in as just the shape.
Comment 7 vkmr2012 2015-01-02 04:23:33 UTC
Please take a look at the following Urls for reference

http://dia-installer.de/shapes/index.html.en

http://dia-installer.de/diashapes/index.html.en
Comment 8 Yousuf Philips (jay) (retired) 2015-01-02 09:45:10 UTC
The Dia website states that the symbols are open source GPLv2, so i believe it would be possible bundle them with LO, but still code would need to done to implement how the symbols could be added.
Comment 9 jan d 2016-09-06 17:46:01 UTC
related: "Custom Shapes Creation (using handles, formulas etc.) is tedious" https://bugs.documentfoundation.org/show_bug.cgi?id=101862
Comment 10 Heiko Tietze 2017-05-31 11:39:04 UTC
*** Bug 108221 has been marked as a duplicate of this bug. ***
Comment 11 Rodrigo Zimmermann 2017-05-31 12:29:43 UTC
There are forms in Google Docs Draw that are not available in LibreOffice. Such as: equation forms, curved bands, rectangles with corners cut diagonally among others.
Comment 12 Rodrigo Zimmermann 2017-05-31 12:30:46 UTC
(In reply to Rodrigo Zimmermann from comment #11)
> There are forms in Google Docs Draw that are not available in LibreOffice.
> Such as: equation forms, curved bands, rectangles with corners cut
> diagonally among others.

Examples created with Google Docs: 
https://bugs.documentfoundation.org/attachment.cgi?id=133692
https://bugs.documentfoundation.org/attachment.cgi?id=133693
Comment 14 Ahsan_F 2018-03-26 16:05:11 UTC
Dear LibreOffice community, I want to add more shapes to LibreOffice. Can any one tell me which part of code is responsible for it? Thanks.
Comment 15 Regina Henschel 2018-05-16 16:22:51 UTC
(In reply to Ahsan_F from comment #14)
> Dear LibreOffice community, I want to add more shapes to LibreOffice. Can
> any one tell me which part of code is responsible for it? Thanks.

Some of the mentioned sets are very special, so in my opinion they should not go into the general set shown in the toolbar. But such shapes can be provides via Gallery, or added via an extension, or offered for copy&paste via a document.

For custom shapes in core read /core/oox/README. Rendering of arbitrary custom shapes is already implemented. You "only" need to define them. 

For other shapes you find a hierarchy in core/include/svx/svdobj.hxx#270. But there is only the shape "regular-polygon" missing {http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-draw_regular-polygon].

So working directly in core is likely not what you are looking for.
Comment 16 andreas_k 2019-07-27 14:39:36 UTC
(In reply to Ahsan_F from comment #14)
> Dear LibreOffice community, I want to add more shapes to LibreOffice. Can
> any one tell me which part of code is responsible for it? Thanks.

I also want to add shapes to the libo galleries. Join the design team https://wiki.documentfoundation.org/Design
Comment 17 andreas_k 2019-07-27 15:07:25 UTC
(In reply to Regina Henschel from comment #15)
> Some of the mentioned sets are very special, so in my opinion they should
> not go into the general set shown in the toolbar. But such shapes can be
> provides via Gallery, or added via an extension, or offered for copy&paste
> via a document.


Hi Regina 

I think you know best how to make the gallery elements. I think there are the following options

1. have .png shapes for each gallery item (like it is now)
   not good, cause you can't edit the shapes

2. have .svg shapes for each gallery item
   a bit better than 1 but it's no native solution

3. draw shapes with LibO Draw and store shape groups as gallery item
   .sdg .sdv .thm files were generated
   you can change everything (area line color, all points, line width, ...)
   only problem you can't edit them in an text editor

4. make new custom shapes
   https://wiki.openoffice.org/wiki/Create_a_New_Custom_Shape_in_Source_in_File
   I don't know how it work (but I can learn)

Regina, what would be the best solution to make gallery shapes? I would recommend to work with gallery cause LibO has already the functionality and extension is also possible so if we have to much shapes we "only" need an additional hirarchy and the codebase is done. https://design.blog.documentfoundation.org/2015/04/02/libreoffice-design-session-shapes/
Comment 18 Regina Henschel 2019-07-27 19:09:20 UTC
(In reply to andreas_k from comment #17)
> Hi Regina 
> 
> I think you know best how to make the gallery elements.
Not really. I have never made a gallery theme, that can be deployed.

 I think there are
> the following options
> 
> 1. have .png shapes for each gallery item (like it is now)
>    not good, cause you can't edit the shapes
> 
> 2. have .svg shapes for each gallery item
>    a bit better than 1 but it's no native solution

They cannot be adapted to the user needs. Neither .png nor .svg should be the first choice.

> 
> 3. draw shapes with LibO Draw and store shape groups as gallery item
>    .sdg .sdv .thm files were generated
>    you can change everything (area line color, all points, line width, ...)
>    only problem you can't edit them in an text editor

Not being able to edit them in a text editor, is a large problem, see bug 125960.

> 
> 4. make new custom shapes
>   
> https://wiki.openoffice.org/wiki/Create_a_New_Custom_Shape_in_Source_in_File
>    I don't know how it work (but I can learn)

The question 'custom shape' or 'group of path/line/etc shapes' is independent from the question about the way to provide them. I would first make a document, where you collect the shapes, which will build a set later on. Whether to put the set into a classical gallery theme or have a deck in the sidebar, is a second step. Such document has a value in itself as it can be provided via Templates site. 

I can help you to write custom shapes in file format. The wiki article and my FOSDEM talk are quite old. My knowledge about custom shapes has increased in the meantime. The crux of the matter is what you expect the user to do with these shapes. Some requirements can be better met with custom shapes, others with a group of paths. Additional aspects are import/export to MS formats, and language or font dependencies.
Comment 19 matthew 2023-03-19 05:11:07 UTC
I'm not a coder or a UI programmer, I'm just a lowly end user. It seems I always end up using Libre Office Draw to make network diagrams.  I get by with rectangles and circles with lots of text, but it would be really wonderful if I had an easy way to convert and import arbitrary shapes into draw.  Basically DIA is just too clunky for my taste and honestly the available images aren't so wonderful if you aren't doing Cisco networking.

I'm a Mac user, I used to have a proprietary application for this kind of work, but I just can't keep up with the ever changing system requirements/

Thanks
Comment 20 Commit Notification 2024-04-08 07:55:25 UTC
RMZeroFour committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/afb18ac0628c54fdffc1ee5b55db6110c20872cd

tdf#50998 tdf#87892 Add sinusoid shape

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Heiko Tietze 2024-04-08 07:56:34 UTC
I wonder what "more shapes" could mean in terms of being done. The latest patch adds a sinusoid form to the basic shapes. Fixed now?
Comment 22 Regina Henschel 2024-04-08 09:43:50 UTC
(In reply to Heiko Tietze from comment #21)
> I wonder what "more shapes" could mean in terms of being done. The latest
> patch adds a sinusoid form to the basic shapes. Fixed now?

Most of the shape categories shown in the attachments about Dia and Calligra Flow could be provided as extensions for the Gallery.

All ActionButtons are missing. In MS Office they provide a UI to determine actions, similar to form elements, which makes them useful for presentations. But that is not a 'difficultyBeginner' task. But at least the buttons themselves could be added because of the images on them. It could be discussed whether to use the MS binary kind or the OOXML kind. In case the 'action' feature is intended, it can not be solved by a Gallery theme, but needs to be a floater in the Drawing toolbar or location in the sidebar.

A list of the MS Office binary shapes with illustrations is in https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-odraw/9c0c5c01-9e90-41aa-ba15-477dacb4cc8e
Scroll down to the end for the ActionButtons.

From OOXML are missing: funnel, gear6, gear9, nonIsoscelesTrapezoid, swooshArrow and uturnArrow. They should go to the 'Shapes' or 'Arrows' theme in the Gallery, which contains already other OOXML-shapes. (gear9 and uturnArrow are already there.)

I'm not sure about the MS Office binary shape msoUturnArrow (id 101). It is missing but we have the ooxml-version in the Gallery. On the other hand the ooxml-version is not suitable for export to MS Office binary formats. 

Interesting would be a 'spiral'. Such is available in SoftMaker and in Inkscape. That could go to the Gallery.

There is the wish for a mirrored trapezoid in bug 116672.

ToDo for the floater in the drawing toolbar: 
Missing are 'arc' and 'chord'. The currently included ones are in fact no custom shapes but belong to the 'legacy' shapes. For 'arc' it is msosptArc (id 19).