Custom shapes

From Apache OpenOffice Wiki
Jump to: navigation, search

Custom Shapes

Custom Shape & Fontwork integration

By using drag & drop a Custom Shape can easily be put into the gallery. To avoid that each attribute of the shape is hard formatted following environment variable needs to be set before the office is started:


Some Custom Shapes are not allowed to be deleted, because they are used within a drawing toolbar, so they are all placed in a hidden gallery theme. The environment variable


makes this theme accessible.

The above description works for the running office but does not help if you want to integrate Custom Shapes / Fontwork into a installation set, but by putting shapes into the gallery you are creating/modifying a gallery theme which can be found in your installed office in basis/share/gallery/ Such modified gallery theme can be used for your office source in extras/source/gallery/gallery_system which will then be part of the installation set. The following three files are containing some basic Custom Shapes such as pie, octagon... So if you are modifying a shape of this category or are adding a new one, you have update following files.

  • sg24.sdg
  • sg24.sdv
  • sg24.thm

FontWork is part of:

  • sg36.sdg
  • sg36.sdv
  • sg36.thm

If you have changed a gallery theme often then it is good to update it, this leads to smaller binary files. The option can be found in corresponding context menu.

Toolbar integration

The current Custom Shape toolsbars are initialized in svx/source/customshapes/tbxcustomshapes.cxx There it should be easy to add new ones.

For each application the toolbar entries are stored in a xml resource file:

  • sd/uiconfig/simpress/toolbar
  • sd/uiconfig/sdraw/toolbar
  • sd/uiconfig/swriter/toolbar
  • sd/uiconfig/scalc/toolbar

For a xml shape entry such as "" a shape called "cloud-callout" will be searched in the private gallery theme "private://gallery/hidden/imgppt".

Personal tools