Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Badal,

On Tue, Oct 01, 2013 at 02:46:54PM +0530, Badal Naik <badal.kumar.naik@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
graphics:

http://opengrok.libreoffice.org/xref/core/writerfilter/source/dmapper/DomainMapper_Impl.cxx#1241

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

More reference here:

http://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1TextEmbeddedObject.html

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:

http://opengrok.libreoffice.org/xref/core/sw/inc/unoframe.hxx#282
http://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unoframe.cxx#2951

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

Hope this helps,

Miklos

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.