To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=97539 Issue #|97539 Summary|How to crash OOo using Basic :) Component|scripting Version|OOo 3.0 Platform|All URL| OS/Version|All Status|NEW Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P3 Subcomponent|www Assigned to|iss...@scripting Reported by|erpel
------- Additional comments from [email protected] Tue Dec 23 17:30:57 +0000 2008 ------- Try this little basic macro - but save your documents first: :-) crashMe() instantly kills my OOo 2.4.1 (Linux) and OOo 3.0.0 (WinXP). --- snip --- REM ***** BASIC ***** Option explicit ' This crashes OOo sub crashMe() dim oMerged() oMerged = getMergedArea(0, 0) msgbox (oMerged(2) - 0) end sub ' If you save oMerged(2) in a variable first, it works sub working1() dim oMerged() dim value% oMerged = getMergedArea(0, 0) value = oMerged(2) msgbox (value - 0) end sub ' If you remove the "substract 0" part, it works sub working2() dim oMerged() oMerged = getMergedArea(0, 0) msgbox (oMerged(2)) end sub ' The following two functions are literally the same ' Only the name is different (getMergedArea and getMergedAreaNoCrash) Function getMergedArea (iCol as integer, iRow as integer) dim oCursor, oRangeAddress, oCell, oSheet oSheet = ThisComponent.CurrentController.getActiveSheet oCell = oSheet.getCellByPosition(iCol, iRow) oCursor = oSheet.createCursorByRange(oCell) oCursor.collapseToMergedArea() oRangeAddress = oCursor.getRangeAddress() ' Return {startCol, startRow, endCol, endRow} as array getMergedArea = array (oRangeAddress.StartColumn, _ oRangeAddress.StartRow, _ oRangeAddress.EndColumn, _ oRangeAddress.EndRow) End Function --- snip --- --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
