Hi Amenel, On Mon, Jul 21, 2014 at 05:36:25PM +0100, Amenel VOGLOZIN wrote: > Hi all, > > I'd like to know whether MIME type icons (for ODT, ODS, ODP, etc.) > that can be seen in the File > Newmenu entry are available to > extensions, for instance when creating an XGraphic object.
All those images are stored in a zip file inside the office installation, on Linux /opt/openoffice4/share/config/images.zip. You can access those images using the "private:graphicrepository/<path_inside_images.zip>" URL. The main problem is that the location/name of the images is an implementation detail, and there is no guarantee that it will be the same between different releases. For example, you could get that the icon for Writer documents is res/sx03251.png by reading some source code (svtools/source/misc/imagemgr.*) or asking in this mailing list, but there is no guarantee that res/sx03251.png won't change in the next release, breaking your extension. So it is better if you take the images you need, and pack them inside your extension (the images, like the rest of AOO source, is released under the Apache License v.2). Unzip images.zip, and search then inside the /res folder; document images follow this scheme: sx<image_id>.png - small images sxh<image_id>.png - small images, high-contrast lx<image_id>.png - big images lxh<image_id>.png - big images, high-contrast The image_id is not very simple to get, you need to read source code: - this array will give you the image id for the extension: http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/source/misc/imagemgr.cxx?revision=1413471&view=markup#l129 For example, "odt" has image ID IMG_OO_WRITER_DOC - IMG_OO_WRITER_DOC is defined as IMAGELIST_START + 175 IMAGELIST_START is defined as 3076 http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/inc/svtools/imagemgr.hrc?revision=1413471&view=markup#l107 http://svn.apache.org/viewvc/openoffice/trunk/main/svtools/inc/svtools/imagemgr.hrc?revision=1413471&view=markup#l29 This gives 3251, from there the sx03251.png. Regards -- Ariel Constenla-Haile La Plata, Argentina
signature.asc
Description: Digital signature