On 9/26/05, Jorge Marques Pelizzoni <[EMAIL PROTECTED]> wrote:
>
>
> Hi, all!
>
> Having the service manager passed to a C++ component on its construction, is 
> it
> possible to execute a function from a Basic Module (passing parameters and
> retrieving the result)? I'm working on OOo version 1.1.4.

Hi Jorge,

in 1.1.4 the only way I know to call a Basic function via UNO is to
assemble a macro URL like this
"macro://Untitled1/Standard.Module1.Main(param1,param2)" and to
dispatch it via the XDispatchProvider/XDispatch/XDispatchHelper group
of interfaces. However, this method is very limited, especially with
respect to passing parameters. There does not seem to be a way to
escape special characters such as comma (which separates the
parameters), so that you can't reliably pass strings containing such
characters. So you will probably need to encode your parameters, send
them in a single string and then decode them on the Basic side.

In OOo 2.0 there is a much better way, using the Scripting Framework.
So if possible you should switch to OOo 2.0. It'll make your life much
easier.

Matthias

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

Reply via email to