On Tuesday 15 February 2005 14:37, Ines Pfauch wrote:
>
> That does not help very much, as I work with java swing and not OOo
> API. 

So, you just should use another way to get coordinates of
your custom window (stored in the aDlgPosSize structure in my 
example), but exactly the same way to obtain the coordinates
of the OOo desktop (the thing your question was about). However,
AFAIK, using external GUI toolkits in OOo addons is not recommended
and should be avoided if possible.

> In your center method you use a Object oParentPeer which I could 
> not find anywhere else (I did not wanted to search every source file)
> and I think I need it to get the coordinates of the OOo window...?

As you can see from my code, this oParentPeer may be null, so you
can just simplify the code by removing everything related with it.

However, this argument may be used to specify another custom
window in order to center our dialog relatively to it rather 
than to the OOo desktop itself. Of course this is necessary only if 
we want to display several custom dialogs at the same time. 
So in your case it may be an object representing your swing 
window rather than an OOo dialog.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to