Hi Stefan,

Alle 22:28, giovedì 8 febbraio 2007, Stefan Weigel ha scritto:
> Hi Paolo,
>
> Paolo Mantovani schrieb:
> > There are some reasons fon not using the method
> >  XSheetCellCursor::collapseToCurrentRegion()
> > instead? or perhaps am I missing something ?
>
> Oh yes, there is a reason: I am an absolute beginner with
> programming in OpenOffice.org and simply did not know about this method.
>
> Thank you for the hint.

The following sub should have the same effect of your original 
SelectCurrentRange

In effect you don't need to select the current region to use it in your 
following code, unless you do it in order to give some feedback to the user

sub SelectCurrentRegion
Dim oDoc, oSheet, oSelection, oCursor

        oDoc = ThisComponent
        oSheet = oDoc.CurrentController.ActiveSheet
        oSelection = oDoc.CurrentSelection
        
        oCursor = oSheet.createCursorByRange(oSelection)
        oCursor.collapseToCurrentRegion()
        oDoc.CurrentController.select(oCursor)
        
End Sub


>
> Coming from Microsoft´s VBA I am completely spoiled by the Visual
> Basic IDE, that automatically shows up all possible methods,
> properties and subobjects while typing. I have not managed yet to
> develop my strategy in order to easily find these things in
> OpenOffice.org Basic.

I use Xray from Bernard Marcelly.
Used in conjunction with the SDK it is an exceptional tool to investigate ooo 
API objects.

ciao
Paolo M





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to