<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hello KAMI,<br>
    <br>
    as I already mentioned in my reply to Caolán, the point with
    galleries is, that the elements do not have user editable
    attributes. Consider you want to draw a network diagram with
    servers, routers, network trunks, switches, VLANs ...<br>
    <br>
    In a network diagram you would like to have all the attributes of
    those elements associated with them and you probably would like to
    have a standard set of atrtributes for each type of element. Ok, you
    can place them all into the drawing and group them with the element.
    But often you have more attributes than those that are or should be
    shown in the drawing. Visio accomplishes this with an attribute set
    linked to the element. The user can choose which attributes to show
    and which to hide. Besides that you can export all attributes to a
    file and then for instance load them into a database like a CMDB. <br>
    <br>
    This is a feature used very often and it is one of the arguments not
    to move to OpenOffice/LibreOffice.<br>
    <br>
    I looked around a little bit more inside the content.xml generated
    for different drawing elements and in the ODF spec 1.1. <br>
    <br>
    Galleries the kind I am thinking of are more like custom shape sets
    you find in the Drawing Icon Bar (squares, triangles, polygones,
    ..).<br>
    <br>
    These additional attributes could be created similar the definition
    in  "9.2.15 Common Drawing Shape Attributes" of the ODF spec 1.1 for
    the common drawing shapes.<br>
    <br>
    In LibreOffice Draw this is reflected this way: <br>
    <blockquote><small>&lt;draw:custom-shape draw:style-name="gr1"
        draw:text-style-name="P1" draw:layer="layout" svg:width="7cm"
        svg:height="6cm" svg:x="5cm" svg:y="5.5cm"&gt;<br>
        <b>&lt;svg:title&gt;Hexagon&lt;/svg:title&gt;<br>
          &lt;svg:desc&gt;This is a description.&lt;/svg:desc&gt;</b><br>
        &lt;text:p text:style-name="P1"&gt;hexagon&lt;/text:p&gt;<br>
        &lt;draw:enhanced-geometry svg:viewBox="0 0 21600 21600"
        draw:glue-points="10800 0 0 10800 10800 21600 21600 10800"
        draw:text-areas="?f3 ?f3 ?f4 ?f4" draw:type="hexagon"
        draw:modifiers="5400" draw:enhanced-path="M ?f0 0 L ?f1 0 21600
        10800 ?f1 21600 ?f0 21600 0 10800 Z N"&gt;<br>
        &lt;draw:equation draw:name="f0" draw:formula="$0 "/&gt;<br>
        &lt;draw:equation draw:name="f1" draw:formula="21600-$0 "/&gt;<br>
        &lt;draw:equation draw:name="f2" draw:formula="$0 *100/234"/&gt;<br>
        &lt;draw:equation draw:name="f3" draw:formula="?f2 +1700"/&gt;<br>
        &lt;draw:equation draw:name="f4" draw:formula="21600-?f3 "/&gt;<br>
        &lt;draw:handle draw:handle-position="$0 top"
        draw:handle-range-x-minimum="0"
        draw:handle-range-x-maximum="10800"/&gt;<br>
        &lt;/draw:enhanced-geometry&gt;<br>
        &lt;/draw:custom-shape&gt;</small><br>
    </blockquote>
    The important tags are those starting with &lt;svg:... The gallery
    or whatever collection of scalable elements are used should define
    the set of attributes in that form preferrably using SVG format for
    the shapes. When opening the context menu and selecting Description
    a dialg could show up with all of the predefined attributes.<br>
    <br>
    Hope this is more precise. The question is whether it is possible to
    integrate this way  of attributing to gallery elements.<br>
    <br>
    Kind regards<br>
    <br>
    Ulrich<br>
    <pre class="moz-signature" cols="72">~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ZPK Moser UG (haftungsbeschränkt) i.G.
Ulrich Moser - Geschäftsführer
Schlossstraße 7 - 78244 Gottmadingen
+49 (0)7734 395 494 - +49 (0)179 915 54 18
<a class="moz-txt-link-abbreviated" href="http://www.zpk-moser.de">www.zpk-moser.de</a> - <a class="moz-txt-link-abbreviated" href="mailto:ulrich.moser@zpk-moser.de">ulrich.moser@zpk-moser.de</a>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</pre>
    <br>
    Am 15.09.2011 11:21, schrieb KAMI911 KAMI911:
    <blockquote
cite="mid:CAFg1WTwnF4OwpdrSjSjX=ThZakbrxSLnm3bGzhDu8Xaf9k2Gpg@mail.gmail.com"
      type="cite">
      <pre wrap="">Hello Folks,

Of course I am interested to and new, useful gallery elements to the
suite and create a new extension.

You can create the gallery as usual way. I prefer vector based
elements over pictures. In your case it has several advantage.

In this case AVOID_BURN_IN_FOR_GALLERY_THEME enviroment variable may
be useful for you. You should create gallery after this enviromental
variable is exported/set.

I can help to create oxt extension file.

Adding gallery to LibreOffice in integrated way is harder, but if we
decide to do this I can also help here -- I added several gallery to
LO that is not enabled by default.

Moreover I have/created several gallery in various theme, for example
I created and remastered plenty of electronical parts.

What is BPMN?

Users can add their draws to gallery just use the ctrl key before the
drag and drop operation. Or use Caolán's smart gallery extension.

For examination you might download and unzip one of my extension:
<a class="moz-txt-link-freetext" href="http://extensions.services.openoffice.org/project/oxygenoffice-gallery">http://extensions.services.openoffice.org/project/oxygenoffice-gallery</a>

I am open to enrich this gallery and add more (vector) elements from
this gallery to the main LO builds.

Creating 3D gallery with Draw also an interesting opportunity... I
started that a year ago.

Back to the environment variables:

Using GALLERY_ENABLE_ID_DIALOG, GALLERY_SHOW_PRIVATE_TITLE   are
useful for localization. I will help here.

Maybe GALLERY_SHOW_HIDDEN_THEMES is the key to crate individual
toolbar for newly created elements. This requres more things to do...

So that is all for first. I hope it helped.

If you want to check my gallery files, here are the repository:
<a class="moz-txt-link-freetext" href="http://ooop.svn.sf.net/viewvc/ooop/trunk/extras/source/gallery/">http://ooop.svn.sf.net/viewvc/ooop/trunk/extras/source/gallery/</a>

Here is a small sample code to create extension:
<a class="moz-txt-link-freetext" href="http://ooop.svn.sf.net/viewvc/ooop/trunk/utils/gallery/">http://ooop.svn.sf.net/viewvc/ooop/trunk/utils/gallery/</a>

Use the create_gallery.sh file
It is not designed to use other galleries, but changing variables is
enogh to create your own gallery.

If you have a question, do not hesitate to ask.


KAMI


2011/9/13 Caolán McNamara <a class="moz-txt-link-rfc2396E" href="mailto:caolanm@redhat.com">&lt;caolanm@redhat.com&gt;</a>:
</pre>
      <blockquote type="cite">
        <pre wrap="">On Mon, 2011-09-12 at 23:58 +0200, Ulrich Moser wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">A first step in that direction would be offering more drawing symbols
like a symbol set for BPMN. If someone could give some assistance on how
such an additional symbol set could be integrated I would be willing to
provide it. The further step would be implementing stencils in Draw
templates.
</pre>
        </blockquote>
        <pre wrap="">
So, the existing galleries are in "extras/source/gallery". Perhaps Kami
can give an overview of "how to add a new gallery" to extras for the
"integrated into LibreOffice" case ?

</pre>
        <blockquote type="cite">
          <pre wrap="">Is there anybody else interested in such an extension and able to aid
with the programming part?
</pre>
        </blockquote>
        <pre wrap="">
Galleries can be deployed as extensions as well as integrated right into
the installed product, there should be some preexisting examples
available, googling on "Gallery Extensions".

FWIW I have an extension at
<a class="moz-txt-link-freetext" href="http://svn.fedorahosted.org/svn/openoffice.org-diafilter/">http://svn.fedorahosted.org/svn/openoffice.org-diafilter/</a> which is a
gallery extension (as well as a import filter for the dia format)

<a class="moz-txt-link-freetext" href="http://svn.fedorahosted.org/svn/openoffice.org-diafilter/gallery/gallerygen.odg">http://svn.fedorahosted.org/svn/openoffice.org-diafilter/gallery/gallerygen.odg</a> contains a macro to make a gallery from a dir IIRC

C.


</pre>
      </blockquote>
    </blockquote>
  </body>
</html>