OO-Snippets: unselect cell range

Commons

Keywordsselection, unselect, cursor, select, com.sun.star.sheet.SheetCellRanges
LanguageOOBasic
ApplicationCalc
AuthorsOliver Brinzing (initial)
Laurent Godard
Michael Hoennig
Niklas Nebel
Tom Schindl
Supported Versions
Supported OS
Question How can I unselect a cell range selected by user?
Answer

I'm using this to change the cursor position and unselecting the cell ...

Code-Snippet-Listing (snippet-source)

Sub MoveCursor

  oDocument = StarDesktop.getCurrentComponent
  oView = oDocument.getCurrentController

  'Move to a specified cell
  'oCell = oView.getActiveSheet.getCellByPosition(5,10)
  'Move at the beginning of the selection
   ocell=odocument.getcurrentselection

  oRanges = oDocument.CreateInstance("com.sun.star.sheet.SheetCellRanges")
  oView.Select(oRanges)

end sub

Changelog

DateUserModification
2004-06-22tomsontomModified to match new snippet-DTD
0000-00-00oliinitial version

and