Issue 14927

Summary: Final goto in a macro does not deselect previous data
Product: Calc Reporter: drc <drc>
Component: codeAssignee: joerg.skottke
Status: CLOSED FIXED QA Contact: issues@sc <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.1 Beta2   
Target Milestone: ---   
Hardware: PC   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
Spreadsheet containing simple macros none

Description drc 2003-05-26 22:51:50 UTC
After running this recorded macro, the data area is still selected.  Delete 
will delete it!   Macro:
sub Alpha
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 = "DbName"
args1(0).Value = "Data"

dispatcher.executeDispatch(document, ".uno:SelectDB", "", 0, args1())

rem ----------------------------------------------------------------------
dim args2(6) as new com.sun.star.beans.PropertyValue
args2(0).Name = "ByRows"
args2(0).Value = true
args2(1).Name = "HasHeader"
args2(1).Value = false
args2(2).Name = "CaseSensitive"
args2(2).Value = false
args2(3).Name = "IncludeAttribs"
args2(3).Value = false
args2(4).Name = "UserDefIndex"
args2(4).Value = 0
args2(5).Name = "Col1"
args2(5).Value = 1
args2(6).Name = "Ascending1"
args2(6).Value = true

dispatcher.executeDispatch(document, ".uno:DataSort", "", 0, args2())

rem ----------------------------------------------------------------------
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "ToPoint"
args3(0).Value = "$A$1"

dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args3())


end sub
Comment 1 drc 2003-05-26 22:53:47 UTC
Created attachment 6456 [details]
Spreadsheet containing simple macros
Comment 2 frank 2003-05-27 10:09:45 UTC
Hi Joerg,

please have a look on it.

Change target if needed.

Frank
Comment 3 joerg.skottke 2003-05-27 11:17:10 UTC
The issue is that the cursor-movement does not disable the selection.
When moving to another cell by clicking or keystroke the selection is
removed and remains with the currently selected cell only. This does
not happen when recorded.

The args

args2(1).Name = "Sel"
args2(1).Value = true

are not set in this case.

This worked in 5.2

Comment 4 niklas.nebel 2003-05-27 19:11:04 UTC
accepting
Comment 5 daniel.rentz 2003-05-28 13:01:32 UTC
code changes reviewed
Comment 6 niklas.nebel 2003-05-28 13:05:15 UTC
Fixed in CWS calc12, will be in 1.1 RC. Changed files:
sc/source/ui/view/gridwin.cxx 1.41.42.1
sc/source/ui/view/tabvwsh3.cxx 1.16.50.1
Comment 7 niklas.nebel 2003-05-28 13:55:12 UTC
Back to QA for verification.
Comment 8 frank 2003-05-30 08:36:58 UTC
Changing Resolution back to fixed
Comment 9 frank 2003-05-30 08:37:35 UTC
found fixed on Solaris and Windows using cws calc12
Comment 10 joerg.skottke 2003-06-12 08:01:49 UTC
OK in M5, will be in 1.1 RC. This issue is closed.