Hello Jan, On Monday 23 August 2010, 02:12, Jan private wrote: > Hello Ariel, > > > > I have written a C++ component, which works fine. But just recently I > > > noticed that > > > > > > void SAL_CALL myComponent::initialize( const Sequence< Any >& > > > aArguments ) throw ( Exception, RuntimeException) > > > > > > is called four times after running openoffice.org -writer before the > > > empty writer document opens. > > > > what kind of component have you written? > > I am not sure what information you need.
there are different kinds of UNO components you can implement. Each component
can have a different behavior.
> Here is the class definition (C
> ++, Linux x86) and the relevant method:
>
> class iMath : public cppu::WeakImplHelper6
> <
> XDispatchProvider,
> XDispatch,
> XInitialization,
> XServiceInfo,
> XDialogEventHandler,
> XContainerWindowEventHandler
I guess you are implementing a css.frame.ProtocolHandler. aren't you?
> {
> public:
> // XInitialization
> virtual void SAL_CALL initialize
> (const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >&
> aArguments) throw (Exception, RuntimeException);
> }
how, when, why, ..., your components gets initialized depends on the component
type.
For your purpose you may need to implement a css.task.Job, to be instantiated
every time a document is loaded from its location or a new one is created.
It all depends on what you're trying to achieve.
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
signature.asc
Description: This is a digitally signed message part.
