CLR and OpenOffice/LibreOffice

Started by stanl, August 11, 2013, 01:07:38 PM

Previous topic - Next topic

stanl

There is a .net library for OO called AODL, but I've read it is not updated. However, if you have OO or Libre installed you should be able to access the cli namespaces with WB's CLR: Unfortunately, the bootstrap() method is problematic...
Code (WINBATCH) Select

;Winbatch 2013 - CLR - basis for working with OpenOfice/LibreOffice
;
;
;Stan Littlefield August 11, 2013
;NOTE: Only basic version check for WB
;////////////////////////////////////////////////////////////////////////////////////////////////////////
If Version( )< '2013A'
   Pause('Notice', 'Need 2013A or Newer Version of WinBatch')
   Exit
EndIf
ObjectClrOption("use","cli_basetypes, Version=1.0.19.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e")
ObjectClrOption("use","cli_cppuhelper, Version=1.0.22.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e")
ObjectClrOption("use","cli_oootypes, Version=1.0.8.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e")
ObjectClrOption("use","cli_ure, Version=1.0.22.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e")
ObjectClrOption("use","cli_uretypes, Version=1.0.8.0, Culture=neutral, PublicKeyToken=ce2cb7e279207b9e")
oFactory = ObjectClrNew('unoidl.com.sun.star.uno.XComponentContext')
oDeskTop = ObjectClrNew('unoidl.com.sun.star.lang.XMultiComponentFactory')
oContext = ObjectClrNew('uno.util.Bootstrap')
oBootStrap = oContext.bootstrap()   ;should error here
Exit


Deana

I don't have Open Office installed at this time, so I am unable to reproduce the error. Are you looking for assistance with the error? If so please provide the exact error message and a link to any documentation for the method that errors.
Deana F.
Technical Support
Wilson WindowWare Inc.

stanl

Quote from: Deana on August 12, 2013, 07:46:28 AM
I don't have Open Office installed at this time, so I am unable to reproduce the error. Are you looking for assistance with the error? If so please provide the exact error message and a link to any documentation for the method that errors.
It is a standard 'invocation' error, and the unfortunate thing is that there is no documentation for OO/Libre and .net (in terms of methods/properties/sample code).
This is definitely 'back-burner'. If I get it figured out I will post what works.

Deana

Deana F.
Technical Support
Wilson WindowWare Inc.