Apache OpenOffice (AOO) Bugzilla – Issue 52848
Macro Recorder: delete contents fails for non-contiguous ranges
Last modified: 2005-08-09 22:49:12 UTC
Example: Cell Ranges A1:A9, C1:C9, E1:E9 formated with background color and currency type. Macro to record: 1. Start Macro recorder. 2. Paint the ranges with Ctrl key + Mouse Paint. 3. Right click -> Delete Contents (Selection == "Numbers"). 4. Click "OK" 5. Click a cell outside the ranges to unpaint them. 6. Stop Recorder. Expected: Number contents of each range deleted. Actual: Only number contents for range A1:A9 deleted. Other ranges left untouched. The Basic that is generated: REM ***** BASIC ***** sub Main rem ---------------------------------------------------------------------- rem define variables dim document as object dim dispatcher as object rem ---------------------------------------------------------------------- rem get access to the document document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") rem ---------------------------------------------------------------------- dim args1(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value = "$A$1:$A$9" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(0) as new com.sun.star.beans.PropertyValue args2(0).Name = "Flags" args2(0).Value = "V" dispatcher.executeDispatch(document, ".uno:Delete", "", 0, args2()) rem ---------------------------------------------------------------------- dim args3(0) as new com.sun.star.beans.PropertyValue args3(0).Name = "ToPoint" args3(0).Value = "$G$6" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3()) end sub
closing double of issue 52849, closing test issue.
.