Author Topic: CLR and OpenOffice/LibreOffice  (Read 3662 times)

stanl

  • Pundit
  • *****
  • Posts: 932
CLR and OpenOffice/LibreOffice
« on: August 11, 2013, 01:07:38 pm »
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
;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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Re: CLR and OpenOffice/LibreOffice
« Reply #1 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.
Deana F.
Technical Support
Wilson WindowWare Inc.

stanl

  • Pundit
  • *****
  • Posts: 932
Re: CLR and OpenOffice/LibreOffice
« Reply #2 on: August 12, 2013, 02:38:39 pm »
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

  • Wilson WindowWare Tech Support
  • Pundit
  • *****
  • Posts: 1183
  • WinBatch® can do it.
    • WinBatch Tech Support Database
Deana F.
Technical Support
Wilson WindowWare Inc.