openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Антон Борисов <>
Subject Re: Input mode like standard
Date Sun, 10 Mar 2013 20:05:31 GMT
oh, thanks.
I just wanted that creation process of my custom shape which created in my
code looks like standard shape creation process for user.

by the way, do you know how to create dialog from xdl file ?

2013/3/7 Ariel Constenla-Haile <>

> Hi Антон,
> On Wed, Mar 06, 2013 at 01:06:09AM +0400, Антон Борисов wrote:
> > It is possible to make openoffice react on addon's toolbar button press
> > action like standard add shape button (cursor icon changes and while
> moving
> > mouse after mouse click on draw page appeared shape, which resizing
> > according mouse movement) ?
> I'm not sure I understand the question; you have some toolbar items
> added by your extension, when the user presses these toolbar items you
> want to do some stuff, like changing the mouse pointer, tracking mouse
> movement, etc.
> Did I get it right? If yes, I'm afraid you can't do that.  In
> a css::awt::XWindow created by yourself, you can change the mouse
> pointer and add listeners/handlers to get information about mouse events
> (css::awt::XMouseClickHandler/XMouseListener/XMouseMotionHandler/XMouseMotionListener);
> in the case of an AOO application, you have access to the component's
> XWindow via the frame (css::frame::XFrame::getComponentWindow()), but
> you can't do much with that XWindow, all events are consumed by the
> application, you can add listeners but they will never get notified.
> > Or all can i do is dispatching standard commandi
> yes, you are limited to dispatch the command associated to your toolbar
> item.
> Don't know what you are trying to achieve, but you can insert a shape
> with your dispatch; of course, you will miss the user interaction, size
> and position must be determined by your code prior to inserting the
> shape.
> > and handling modifed action of drawpage ,
> you get notified of every modification on the document by adding
> a css::util::XModifyListener; the draw/impress model also broadcasts
> some events that might be interesting for extension developers [1], but
> the model does not broadcast them to client code).
> [1]
> PageOrderModified
> ShapeModified
> ShapeInserted
> ShapeRemoved
> > deleting added shape and do what i need having deleted shape
> > properties?
> AFAIK one way to know if a shape was inserted is tracking the number of
> shapes on every page, and when the document is modified, check if the
> number has changed. An alternative way of knowing when a shape is
> removed is adding an event listener to every shape, because shapes are
> components, and as such get disposed, and notify this (I didn't try that
> myself, so it's just theory).
> Broadcasting the events I quoted above would be very useful in this
> case: you will get notified that a shape was inserted or removed, and
> the event source will be that shape.
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina

Борисов Антон

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message