Calling java method in to OOobasic macro

Discussions about using 3rd party extension with OpenOffice.org

Calling java method in to OOobasic macro

Postby maram.j.a » Tue Nov 03, 2020 9:49 pm

Hello
I am using OOobasic macro for the first time
And I need to call a method from my java extension to be executed through the macro
If you can point to me where to to finde more OOobasic tutorial and examples please

Thanks for help
OOo 4.1
win64
maram.j.a
 
Posts: 6
Joined: Thu Oct 29, 2020 8:19 am

Re: Calling java method in to OOobasic macro

Postby Villeroy » Tue Nov 03, 2020 11:03 pm

obj = createUnoService("your.extension.Service.Name")
obj.method(args)
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
 
Posts: 29725
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Calling java method in to OOobasic macro

Postby maram.j.a » Wed Nov 04, 2020 5:33 am

Object variable not set
OOo 4.1
win64
maram.j.a
 
Posts: 6
Joined: Thu Oct 29, 2020 8:19 am

Re: Calling java method in to OOobasic macro

Postby Zizi64 » Wed Nov 04, 2020 8:41 am

Please upload (or share on a free file sharing service) some sample files here. (The ODF file with the StarBasic macro code , and the .oxt extension. Rename the extension to .zip file extension for the upload, because you can not upload an .oxt extension file here.)
Tibor Kovacs, Hungary; LO6.1.6, 6.4.7 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.1.1;AOO4.1.9
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 9843
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Calling java method in to OOobasic macro

Postby Villeroy » Wed Nov 04, 2020 11:18 am

Install MRI.
MyMacros>MRILib>Module1>Mri is a routine calling the inspect method of service "mytools.Mri".
The relevant lines in that routine are:
Code: Select all   Expand viewCollapse view
  oMRI = CreateUnoService( "mytools.Mri" )
  oMRI.inspect( MriTargetObject )
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
 
Posts: 29725
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany


Return to Extensions

Who is online

Users browsing this forum: No registered users and 3 guests