[Solved] .bas to .xba conversion

Creating a macro - Writing a Script - Using the API

[Solved] .bas to .xba conversion

Postby UbuntuGeezer » Mon Jun 29, 2020 12:46 am

Anybody out there know an easy way to port localized .bas macros to .xba files for library building?
(This is referring to converting a .bas OOo Basic language type file to a .xba XML UNO Basic type file)
Last edited by robleyd on Mon Jun 29, 2020 5:42 am, edited 2 times in total.
Reason: Add green tick
Coderman
OpenOffice 4.1.5 Windows 10
UbuntuGeezer
 
Posts: 5
Joined: Mon May 11, 2020 4:12 am

Re: .bas to .xba conversion

Postby RusselB » Mon Jun 29, 2020 3:40 am

A quick check on Google for the extensions you have named indicates that these are not the same types of files.
.bas files appear to be Basic Source Code, as .xba files appear to be proprietary for Timespace Technology videos.
Please confirm that you are referencing correct extensions and/or provide references showing that the two formats are related.
In either case I don't believe any of the OpenOffice applications can do what you seem to be asking for.
If you can confirm that the formats are related, irrelevant as to the actual extension(s) used, then you might be able to find something through http://www.zamzar.com
OpenOffice 4.1.7 and LibreOffice 6.3.3.2 on Windows 7 Pro & Ultimate
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
User avatar
RusselB
Moderator
 
Posts: 6062
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: .bas to .xba conversion

Postby UbuntuGeezer » Mon Jun 29, 2020 4:24 am

[Solved] Short Answer: Save the module source code in a library under "My Macros". It appears that saving a module of code in any library in "My Macros" automatically generates an .xba file from the .bas-formatted source in the module.
Long Answer: I develop code as .bas-formatted modules under the .ods file that I am using for development. Using git I manage each macro/sub/function as a separate .bas file, and also use the GEANY editor. I move different versions of the code in/out of the Module within the .ods file by block-copying code from the .bas file(s) into the module. This allows me to use git code and version control tracking each macro/sub/function. The code can be tested thoroughly in a self-contained environment. The advantage is that I can have several versions of the code in various stages 1) initial development, 2) testing and regression testing, 3) beta-test for release 4) final release of a particular version. The disadvantage is that I have to update each .ods in the various stages with the module(s) ready to move into that phase. The advantage is that any problems encountered are isolated to that phase. Also, when the module(s) code is saved connected to the .ods, it remains in .bas formatting. It would be easy enough to write a pre-processor that would convert .bas syntax to .xba syntax for XML, but most likely the reason that someone hasn't done that it is much easier to let the OOo API inteface do the work for you by simply moving the module(s) into a library under My Macros.
Coderman
OpenOffice 4.1.5 Windows 10
UbuntuGeezer
 
Posts: 5
Joined: Mon May 11, 2020 4:12 am


Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 6 guests