Issue 52849 - Macro Recorder: delete contents fails for non-contiguous ranges
Summary: Macro Recorder: delete contents fails for non-contiguous ranges
Status: CLOSED DUPLICATE of issue 20046
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 2.0 Beta
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: joerg.skottke
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-03 22:28 UTC by azaz09
Modified: 2013-08-07 15:12 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description azaz09 2005-08-03 22:28:24 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
Comment 1 frank 2005-08-09 11:06:08 UTC
Hi Joerg,

please have a look at this one.

Frank
Comment 2 azaz09 2005-08-11 15:57:28 UTC
This problem also affects OOo 1.1.4.

Comment 3 dridgway 2005-12-05 17:04:54 UTC
Note that in original description, it's the behavior of the recorded macro
that's at issue, not the behavior while recording. Confirmed on Linux 2.0.1RC1
and Windows 2000 2.0.
Comment 4 joerg.skottke 2005-12-29 07:38:18 UTC
Hi azaz09,

thank you for this excellent bug report. I can confirm the issue but
unfortunately the macro recorder has no priority at this time. If it were a
regression there would be a chance that this could be fixed within a reasonable
timeframe, but it is not. This never worked (checked back to StarOffice 5.1a).

So i set this issue to Office later, make it a duplicate to issue #20046 and
close it.

*** This issue has been marked as a duplicate of 20046 ***
Comment 5 joerg.skottke 2005-12-29 07:39:35 UTC
setting closed