Bug Hunting Session
Bug 87892 - More shapes for LibreOffice draw are needed
Summary: More shapes for LibreOffice draw are needed
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:
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: 2019-07-27 19:09 UTC (History)
7 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.