Bug 63298 - : Windows WSH Automation error with method .getDocumentInfo()
Summary: : Windows WSH Automation error with method .getDocumentInfo()
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.2.2 release
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-04-09 07:51 UTC by fremdling
Modified: 2013-04-09 09:30 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fremdling 2013-04-09 07:51:32 UTC
Problem description: 
We use WSH scripts for automation.
Before LO update prior 4.0 from 3.6 everything was fine.
But now it is not. 
Error occurs when method getDocumentInfo() is called.

Simplified Script:
<pre>
set fso=CreateObject("Scripting.FileSystemObject")
Set objServiceManager = CreateObject("com.sun.star.ServiceManager")
Set Stardesktop = objServiceManager.createInstance("com.sun.star.frame.Desktop")
Set dispatcher = objServiceManager.createInstance("com.sun.star.frame.DispatchHelper")
Set V = objServiceManager.Bridge_GetStruct("com.sun.star.beans.PropertyValue")
path=fso.GetFolder(".\templates\").Path&"\"
Set doc = Stardesktop.loadComponentFromURL("file:///"&path&"RightWay.dot", "_blank", 0, Array(V))
Set oText = doc.getText()
Set DocI=doc.getDocumentInfo()
call doc.LockControllers
call DocI.setPropertyValue("f2ADRU","test")
doc.getTextFields.refresh()
</pre>

Script receives error:
Windows Script host
Unsupported method or property 'getDocumentInfo'
Error: 800A01B6
So, some how LO 4 cannot call:
Set DocI=doc.getDocumentInfo()


Current behavior:
Error occurs.

Expected behavior:
Everything must be smooth, like in LO 3.6 :)

              
Operating System: Windows XP
Version: 4.0.2.2 release
Last worked in: 3.6.2.2 release
Comment 1 GerardF 2013-04-09 09:30:36 UTC
There is change in the API. XDocumentInfo is removed.
Look at releases notes for 4.0 :
https://wiki.documentfoundation.org/ReleaseNotes/4.0#API_Changes