BBC BASIC for Windows
« COMLIB interfacinf with LibreOffice »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:34pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: COMLIB interfacinf with LibreOffice  (Read 445 times)
Malvern
Guest
xx Re: COMLIB interfacinf with LibreOffice
« Reply #9 on: Sep 3rd, 2014, 3:22pm »

OK, All I was saying was it did not appear to be an easy conversion. And I for one would not have a clue what to do with this:
Code:
Dim args()
Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter",_
                 "_blank", 0, args) 

Or even why from URL?
Do those that are wiser have any suggestions?

V
User IP Logged

rtr2
Guest
xx Re: COMLIB interfacinf with LibreOffice
« Reply #10 on: Sep 3rd, 2014, 4:49pm »

on Sep 3rd, 2014, 3:22pm, Malvern wrote:
I for one would not have a clue what to do with this

When you say you "would not have a clue" presumably you appreciate that loadComponentFromURL is a method of the object objDesktop (which is an instantiation of the class com.sun.star.frame.Desktop). As with all objects, one option is to call the method via the vTable, as described in this Wiki article:

http://bb4w.wikispaces.com/Calling+object+methods+using+structures

Alternatively, if it's an object which implements the iDispatch interface you can - more easily - call the method using COMLIB.BBC:

http://bb4w.wikispaces.com/Component+Object+Model+programming

Once upon a time a COM/ActiveX object could be guaranteed to have an iDispatch interface, but no longer apparently:

http://support.microsoft.com/kb/159621/en-us

I'm not knowledgeable enough about VBScript to say whether the code at the OpenOffice page implies the presence of an iDispatch interface or not.

Quote:
Or even why from URL?

That's probably a question it's better not to ask! Just do what it says. wink
User IP Logged

Malcolm
Guest
xx Re: COMLIB interfacinf with LibreOffice
« Reply #11 on: Sep 4th, 2014, 04:40am »

on Sep 3rd, 2014, 09:37am, Edja wrote:
Wow. Lots of info and links to docs that I will need to chew through.

I think you will find most of what you need is here:
https://www.openoffice.org/api/basic/man/tutorial/tutorial.pdf
Section 4.4 has some examples.

Malcolm
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls