Apache OpenOffice (AOO) Bugzilla – Issue 117885
get/setPrintAreas generates [automation bridge] exception in UnoConversionUtilities<T>::variantToAny
Last modified: 2013-08-07 15:14:47 UTC
Created attachment 76403 [details] VBScript test replicating the unexpected exception The exception is generated programming OpenOffice by COM Automation. Since OpenOffice v3.3.0 the array of struct CellRangeAddress reported by getPrintAreas() method is unusable. If you try to refer a property (e.g. EndRow) an [automation bridge] exception is generated. In order to replicate the problem run the attached VBScript. If run the script with OpenOffice v3.2.1 it works, with OpenOffice v3.3.0 it doesn't work. The script does the following: 1. Create a black Calc Document 2. Create a new CellRangeAddress [A1:B10] 3. Assign it to Sheet1 PrintArea, thru sheet.setPrintAreas() 4. Obtain the PrintArea assigned to Sheet1 thru sheet1.getPrintAreas() 5. Assign it to Sheet2 The exception arises executing step 5 (on OpenOffice v3.3.0).
confirming with oo3.4beta1. is it another dup of http://openoffice.org/bugzilla/show_bug.cgi?id=117010 ?
Additional tests: 1. Using OO v3.3 with original oleautobridge.one.dll v3.3, the test script doesn't work 2. Using OO v3.3, replaced original oleautobridge.one.dll v3.3 with oleautobridge.one.dll v3.2, the test script works 3. Using OO v3.3, replaced original oleautobridge.one.dll v3.3 with oleautobridge.one.dll v3.4Beta1, the test script doesn't work Reading bugs 117010 and 117523 it seems this defect (117885) has a common origin, but I have no evidence to confirm it is a duplicate.
I added one line in the code : areas = sheet0.getPrintAreas() msgBox areas(0).Sheet ' <---- line added I got an error on this last line, saying : Object requested: 'areas(...)' So, areas did not receive an array of CellRangeAddress This is the same kind of bug as Issue 117010 : impossible to get an array from OpenOffice. It only appears later.
getting rid of value "enhancement" for field "severity". For enhancement the field "issue type" shall be used.
The testing VBScript on AOO v3.4.1 runs without any problem. The bug appears to be fixed.