my extension is having something like Model (which consists of Nodes
(customized shapes) and Links (customized connector shapes)) of current
document. I've added handlers of documents events to keep model in actual
state.

when user is saving/loading document some handler stores/restores this
model using UserDefinedProperties of document


my main class extends WeakBase implements
        com.sun.star.lang.XInitialization,
        com.sun.star.task.XJob,
        com.sun.star.frame.XDispatchProvider,
        com.sun.star.lang.XServiceInfo,
        com.sun.star.util.XCloseable,
        com.sun.star.task.XAsyncJob,
        com.sun.star.frame.XDispatch,
        com.sun.star.frame.XFrameActionListener,
        com.sun.star.document.XEventListener,
        XComponent

and supports             "com.sun.star.frame.ProtocolHandler",
            "com.sun.star.task.Job",
            "com.sun.star.task.AsyncJob" services

I assume that it's creating instance for every button in toolbar or
something similar.
It's possible to do it Singleton per frame?


2014-01-29 Ariel Constenla-Haile <[email protected]>:

> Hi Антон
>
> On Wed, Jan 29, 2014 at 01:43:10AM +0400, Антон Борисов wrote:
> > no reply yet :( i still have this problem, maybe someone knows
> > solution?
> >
> >
> > 2013-06-30 Антон Борисов <[email protected]>
> >
> > > i noticed that for each frame openoffice creates ten instances of
> > > extesion main class. Why it's so, and how to have only one per frame
> > > ?
> > >
> > > I created my own implementation of XSingleComponentFactory which is
> > > returning in __getComponentFactory  but how to find out about frame
> > > from createInstanceWithContext method argument ?
>
> Please specify what is your extension doing; I assume that your main
> class implements a so called "Protocol Handler", as explained here
>
> https://wiki.openoffice.org/wiki/Documentation/DevGuide/WritingUNO/Protocol_Handler
>
>
> Regards
> --
> Ariel Constenla-Haile
> La Plata, Argentina
>



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

Reply via email to