Return-Path: X-Original-To: apmail-openoffice-dev-archive@www.apache.org Delivered-To: apmail-openoffice-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6031DEBF6 for ; Sun, 10 Mar 2013 20:05:59 +0000 (UTC) Received: (qmail 48528 invoked by uid 500); 10 Mar 2013 20:05:59 -0000 Delivered-To: apmail-openoffice-dev-archive@openoffice.apache.org Received: (qmail 48452 invoked by uid 500); 10 Mar 2013 20:05:59 -0000 Mailing-List: contact dev-help@openoffice.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openoffice.apache.org Delivered-To: mailing list dev@openoffice.apache.org Received: (qmail 48442 invoked by uid 99); 10 Mar 2013 20:05:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Mar 2013 20:05:59 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antonhbborisov@gmail.com designates 209.85.223.180 as permitted sender) Received: from [209.85.223.180] (HELO mail-ie0-f180.google.com) (209.85.223.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Mar 2013 20:05:53 +0000 Received: by mail-ie0-f180.google.com with SMTP id bn7so3884367ieb.39 for ; Sun, 10 Mar 2013 13:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=+/1kdmcZV4GN1ZNz9lm03LiI/Uq9gQkSolBfFZXJFdc=; b=QuMoYW1mxJmXg9WQ6VzrXbWcbTI0QdeEYBh3wcXMypAum3nsxAwz1Lthed2XfbFoKy rkz8mesuiHbkA0YU4EfB/nKIQ0fXQn7odKJPoYriWSuRf/nROXffp3hmqwzm8HIf7OSU sJboAl9i0RaviOAs/JmbXFhzrMSqcjV4UhjTRZcJsIG7ZQq5w/FhyTwxpqRDm7PC3oMD olpXIwvjIOKtQOGDqyJSZjLVTA6J5Z6QD5TL0q38ir5f4BG35Bi5aiIoNHwubwGMSBVQ 6VSElhol8b/7A5lzWwv8MJ8ybQtgQvJjmk3nbkIwHUpqi8XnwANxSDVuIY3sejTkdZuc eg/g== MIME-Version: 1.0 X-Received: by 10.50.207.39 with SMTP id lt7mr5296100igc.110.1362945932017; Sun, 10 Mar 2013 13:05:32 -0700 (PDT) Received: by 10.64.171.8 with HTTP; Sun, 10 Mar 2013 13:05:31 -0700 (PDT) In-Reply-To: <20130306203024.GA3786@localhost> References: <20130306203024.GA3786@localhost> Date: Mon, 11 Mar 2013 00:05:31 +0400 Message-ID: Subject: Re: Input mode like standard From: =?KOI8-R?B?4c7Uz84g4s/SydPP1w==?= To: dev@openoffice.apache.org Content-Type: multipart/alternative; boundary=14dae9341077219f6904d7979462 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9341077219f6904d7979462 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable 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 =E1=CE=D4=CF=CE, > > On Wed, Mar 06, 2013 at 01:06:09AM +0400, =E1=CE=D4=CF=CE =E2=CF=D2=C9=D3= =CF=D7 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/XMouseMo= tionListener); > 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] > > http://opengrok.adfinis-sygroup.org/source/xref/aoo-trunk/main/svx/source= /unodraw/unomod.cxx#133 > > 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 > --=20 =E2=CF=D2=C9=D3=CF=D7 =E1=CE=D4=CF=CE --14dae9341077219f6904d7979462--