Object Linking and Embedding in LibreOffice

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 1 03:25:24 PDT 2013

Hi Badal,

On Tue, Oct 01, 2013 at 02:46:54PM +0530, Badal Naik <badal.kumar.naik at ericsson.com> wrote:
> Many thanks for your promt reply. I have designed the UI, and
> created the "display as icon" there. Have modified the
> "insertoleobject.ui " file under /cui/uiconfig/ui...Does not have
> much exposure to ODF Import /ww8 import filter. Request to please
> give me some pointer on this..

As far as I see, both file formats store the "icon" just like any other
replacement image, it's just the UI that makes this choice possible for
the user. I mean, from the UI perspective, you still need to produce a
replacement image.

To do so, I guess you need to answer two questions:

1) How do I get the application icon / name that should be on the image?

2) What is the API to produce an image based on those infos?

For the later, I guess one readable example is how the DOCX import
filter creates OLE objects (using the UNO API) with replacement


I.e. create a text::TextEmbeddedObject, set the StreamName, Width,
Height, Graphic properties, and attach it to the document as text

More reference here:


The UI typically uses the internal API, though, so you may want to look
into how the TextEmbeddedObject is implemented, which is the
SwXTextEmbeddedObject class:


E.g. in the getEmbeddedObject() method you get the idea where to dig
- the document model stores the OLE object as an SwOLENode
- the generic (not Writer-specific) embedded UNO interface is
- the generic internal API is svt::EmbeddedObjectRef

Hope this helps,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20131001/d49e26ed/attachment.pgp>

More information about the LibreOffice mailing list