incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: [EXT] image double click
Date Mon, 06 Feb 2012 13:19:00 GMT
Hi Fabian,

On Mon, Feb 06, 2012 at 11:58:33AM +0100, fabian wrote:
> Hi,
> I am trying to find out if one can override the event when
> double-clicking on an embedded image within a writer document.  For my
> extension I would like to embed an image and when double-clicking it
> I would like to trigger my own action instead of the default "image
> dialog" which pops up. 

not that this dialog is shown not only on double-clicking an image:

- if the image is selected, the "Insert" - "Picture" - "From file..."
  menu item does not insert a picture but shows the picture properties
- the same happens with the icon in the "Picture" toolbar
- if the image is selected, the context menu has a "Picture..." item
  that triggers the Picture dialog
- that dialog can be executed using the keyboard instead of the mouse
- ...

> I tried to use and
> to catch the click event.
> But so far without success.
> Is catching this event even possible via the api?

IMO it would work better to intercept the commands, with an
Just intercept 
- ".uno:GraphicDialog"
- ".uno:InsertGraphic"
and when an image is selected, return your dispatch object in

This adds an extra level of complexity to your extension, you will have
to implement an css.task.Job to register your dispatch interceptor.

IIRC there are examples in the SDK.

Ariel Constenla-Haile
La Plata, Argentina

View raw message