[libreoffice-dev] -calling a service function from BASIC macro

Rai, Neeraj neeraj.rai at citi.com
Wed Feb 13 10:02:54 PST 2013


Hi Michael,

The links clear up some doubts in my mind.
I am still having trouble with having 2 buttons to act on the same service (this is a new problem report).
I created 2 buttons which calls startThr() and stopThr() on my service.
The start works as expected. However, the stop call seems to create a new service and fails to stop it.

I tried using a global service variable (button.macros attached), but it is giving me syntax error on line 1 "expected Sub ".
I used the attached burger_samples.macros as sample for my macro but I might have made some obvious mistakes as this is my 1st macro.
I have also found a book on macros by Andrew Pitonyak and going through it.
Are there are any other resources I could use?

thanks
Neeraj
> please read this chapter: http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/C%2B%2B_Language_Binding
> and especially: http://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/C%2B%2B/Mapping_of_Interface_Types

> it is generally unsound to retain a plain C++ pointer to an object after
> the first uno::Reference for it has been constructed.  (you may retain a
> rtl::Reference however, which is often convenient because it can contain
> your implementation class directly and not just some UNO interface).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: burger_samples.macros
Type: application/octet-stream
Size: 11050 bytes
Desc: burger_samples.macros
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130213/5dcc3672/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: button.macros
Type: application/octet-stream
Size: 418 bytes
Desc: button.macros
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20130213/5dcc3672/attachment-0003.obj>


More information about the LibreOffice mailing list