Apache OpenOffice (AOO) Bugzilla – Issue 15215
isValid() method does not work with PowerBuilder 9 with OLE
Last modified: 2004-02-20 14:00:25 UTC
Question for Sun Technical Support ---------------------------------------------------- The lower bound for PowerBuilder arrays is "1" as opposed to the default lower bound for Java and Visual Basi arrays of "0" . It appears as though when a word is sent to the isValid() method of OpenOffice that it is assuming the lower bound of an array to be "0". Is there any way to make this work with PowerBuilder? Also included is the altered VB sample downloaded from the Sun site that has changed the lower bound to a "1". This also fails when using the isValid() of OpenOffice. CR316246 is the open PowerBuilder bug number. Question for Sun Technical Support ---------------------------------------------------- The lower bound for PowerBuilder arrays is "1" as opposed to the default lower bound for Java and Visual Basi arrays of "0" . It appears as though when a word is sent to the isValid() method of OpenOffice that it is assuming the lower bound of an array to be "0". Is there any way to make this work with PowerBuilder? Also included is the altered VB sample downloaded from the Sun site that has changed the lower bound to a "1". This also fails when using the isValid() of OpenOffice. CR316246 is the open PowerBuilder bug number. Question for Sun Technical Support ---------------------------------------------------- The lower bound for PowerBuilder arrays is "1" as opposed to the default lower bound for Java and Visual Basi arrays of "0" . It appears as though when a word is sent to the isValid() method of OpenOffice that it is assuming the lower bound of an array to be "0". Is there any way to make this work with PowerBuilder? Also included is the altered VB sample downloaded from the Sun site that has changed the lower bound to a "1". This also fails when using the isValid() of OpenOffice. CR316246 is the open PowerBuilder bug number. Testcases Provided -------------------------------- PBOpenOffice.zip contains two zip files. pb for cr316246.zip - PowerBuilder application showing behavior in PowerBuilder vb for cr316246.zip - Visual Basic application with lower bound changed to "1" Findings of PowerBuilder Developers ------------------------------------------------------- After some investigation I found that the isValid() method of spell checker is working fine in Visual Basic only if the lower bound of array subscripts is "0". But if we change the lower bound of array subscrips to "1" ( like PowerBuilder ) the isValid() method is not working. Please find below the source code code for both the cases. Steps to Reproduce ------------------------------ 1. Install the 30 day Eval version of PowerBuilder 9.0 available on www.sybase.com at http://www.sybase.com/pb9_netqeval 2. Install OpenOffice. 3. Open PowerBuilder sample case10924014.pbl in PB 9.0 by clicking on the File => Open Workspace and navigating to tryOpenOffice.pbw. Click the 'running man' in PB to run the application. Click the Run Test button when the window opens. The command button in w_openoffice contains the code logic 4. The return code on Line 62 is NULL
Created attachment 6598 [details] PowerBuilder 9 sample using OLE
Decided that I needed to edit the description and then will resubmit.
language binding issue
*** Issue 15216 has been marked as a duplicate of this issue. ***
By declaring an array in VB like this: Dim objPropertyValue(1) As Object you declare an array containg two elements (the number one puts into the parenthesis represents the upper bound and the lower bound is null) By assigning a value to Set objPropertyValue(1) = xxx ' or Call objPropertyClass.CreateObject(objPropertyValue(1)) you assign a value to the second entry. In your example an array with an uninitialized value at the index 0 was past into isValid which leads to the error.
Automation bridge fails to convert a SAFEARRAY with an lower bound other than 0
If in Visual Basic declared with a lower bound other than 0, then the array is not properly converted. For example: Dim myArray(1 To 1) is not converted correctly.
Fix committed for VBA Migration target. Need to clarify what OO target that is.
The fix will probably be in the first product patch of StarOffice 6.1 and the corresponding OO release.
KR: Retargeted to OOo1.1.1.
verified in cws ab02vba
integratet
opened for integration in OO2
fixed in cws for 680 m23
verified on cws jl5vba (680 m23)
Cloned: i25729