How should I go about converting a VB macro into Java code?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Agnisys
Posts: 7
Joined: Tue May 27, 2008 9:16 am

How should I go about converting a VB macro into Java code?

Post by Agnisys »

Hi,
Could someone suggest a process/tool by which I can convert a VB macro to Java code?
I find the process extremely time consuming and inefficient at least for me.

I use the XRay tool in VB to look for properties, methods etc, but how do they translate into Java objects and methods?

Any pointers would be much appreciated.
Anupam.

P.S. Using Writer : OO 2.4, IDE : Netbeans 6.1, Java 1.6u6 on Windows 2003
mathew
Posts: 7
Joined: Sat Apr 19, 2008 3:04 am

Re: How should I go about converting a VB macro into Java code?

Post by mathew »

I don't have a solution, but I suggest a combination of:
  • documentation - add a page to the wiki which maps VB functions to Java code or add some code snippets
  • write some base classes to help - I've started this with cahaya.asas
  • extend XRay to generate the java code snippet
You may also find the HelperAPI, mentioned in this thread useful, but it appears inactive.
Sourceforge projects using OpenOffice: asas & hubung
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: How should I go about converting a VB macro into Java code?

Post by hanya »

mathew wrote:
  • extend XRay to generate the java code snippet
Object Inspector generates codesnipet of the Java code.
http://wiki.services.openoffice.org/wik ... _Inspector
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
Post Reply