Apache OpenOffice (AOO) Bugzilla – Issue 111504
[From Symphony]The number of error that throwed by COM API is not consistent with Excel
Last modified: 2017-05-20 11:29:17 UTC
Call COM API in OOo, if the COM API throw the error, the error number is not consistent with the number in Excel. Such as: Dim dbEng As Object Dim wks As Object Dim sDB As Object Dim rs_Options As Object On Error GoTo Handler Set dbEng = CreateObject("DAO.DBEngine.36") Set wks = dbEng.Workspaces.Item(0) Set sDB = wks.OpenDatabase("d:\\Data.mdb", False, False, "") Set rs_Options = sDB.OpenRecordset("Select * from Options") Handler: MsgBox Err.Number
Created attachment 69387 [details] Test sample file for this issue
Created attachment 69388 [details] Patch for this issue
In general this patch seems very good ( and I like it ) my only concern about this patch is the fact that we use a BasicErrorException to transfer the error code to basic, the problem is the automation bridge is not exclusively used by basic ( it is a standalone service ) so... this might cause some unexpected result for some client of the bridge somewhere :-/ Otoh, I don't see what else to do without adding some more complexity and I would say it is very very unlikely someone (client) would unwrap the exception carried by the InvocationtargetException. So... I would say lets go with this fix ( and see what upstream say about it )
Reset assigne to the default "issues@openoffice.apache.org".