Hello Anderea,
see comments below.
Regards, Steffen
Andrea wrote:
Juergen Schmidt wrote:
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
Let me explain, so you can tell me if I do something redundant or useless.
Basically I want to expose a function to OOCalc
1) add the declaration in the IDL file (e.g.:
double sumValues([in] sequence< sequence < double > > values) raises
(com::sun::star::uno::RuntimeException;
2) add function to my C++ class
double SomeClass::sumValues(const Sequence< Sequence < double > > & values)
throw
com::sun::star::uno::RuntimeException
{
....
}
3) I need to implement all methods required by XAddIn
OUString SAL_CALL getProgrammaticFuntionName( const OUString& aDisplayName )
throw RuntimeException);
OUString SAL_CALL getDisplayFunctionName( const OUString& aProgrammaticName )
throw (RuntimeException);
OUString SAL_CALL getFunctionDescription( const OUString& aProgrammaticName )
throw (RuntimeException);
OUString SAL_CALL getDisplayArgumentName( const OUString& aProgrammaticName,
::sal_Int32 nArgument )
throw (RuntimeException);
OUString SAL_CALL getArgumentDescription( const OUString& aProgrammaticName,
::sal_Int32 nArgument )
throw (RuntimeException);
OUString SAL_CALL getProgrammaticCategoryName( const OUString&
aProgrammaticName ) throw
(RuntimeException);
OUString SAL_CALL getDisplayCategoryName( const OUString& aProgrammaticName )
throw (RuntimeException);
Especially getDisplayArgumentName() and getArgumentDescription() require some
table to map the
function name (aProgrammaticName) and the argument id (nArgument) to the
argument name and description.
No, you do not have to implement XAddIn. As far as I know, the AddIn
service is an older concept for providing the information that is now
stored in the CalcAddIns.xcu file. As Jürgen stated in a previous mail,
this has the advantage of not having to load the whole component for
accessing simple text information.
I do not have a link to an example for this, I am afraid. Perhaps
someone else can help here?
If you have used
http://wiki.services.openoffice.org/wiki/Calc/Add-In/CompleteAddIn
as a template, I fear that example should be updated.
For my case, most of the time the argument name and type from the IDL are
enough.
so (from the IDL) this is the argument
const Sequence< Sequence < double > > & values
and I just would like to return "values" as getDisplayArgumentName() and
"[][]double" as description.
The name (i.e. "values") is really important when using it in OOCalc, the
description (i.e.
"[][]double") helps, but I could live without.
Am I talking nonsense? I admit my experience with XAddIn is really small...
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]