Hi Andrea,

why should we do that, normally it is not needed and i still don't understand why you need it. Maybe you ca give us some more info about your add-in function and for what exactly you need tis info.

Juergen


Andrea wrote:
Andrea wrote:
Hi,

I am still trying to automatically find out argument names within a calc addin.
I want to take them from the IDL description.

I need an instance of

XIdlReflection

which is created via

Reference< XInterface  > xInterface = serviceManager->createInstance(  
OUString::createFromAscii(
"com.sun.star.reflection.CoreReflection" ));

Now, where do I get the serviceManager?

Since I want to query my own methods, is there an easier way?
My class implements some interfaces, one of which describes the functions I 
want to export to OOCalc.
How do I get a XIdlClass for that interface?

Cheers

Andrea

Done:

in component_getFactory() I save the IDLClass

Reference< XInterface  > xInterface = 
xMgr->createInstance(OUString::createFromAscii(
"com.sun.star.reflection.CoreReflection" ));

Reference< XIdlReflection > rIDLReflection(xInterface, UNO_QUERY);
ourIDLClass = 
rIDLReflection->forName(OUString::createFromAscii("org.asi.XMaths"));

then

OUString getDisplayArgumentName( const OUString& aProgrammaticName, ::sal_Int32 
nArgument ) throw
(RuntimeException)
    {
        Reference< XIdlMethod > aMethod = 
ourIDLClass->getMethod(aProgrammaticName);
        Sequence< ParamInfo > params = aMethod->getParameterInfos();
        return params[nArgument].aName;
        }

It looks such an obvious thing to do, I wonder why OOCalc does not do it by 
itself (with the
possibility to overwrite the argument name).

Andrea


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



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

Reply via email to