Andrew Douglas Pitonyak wrote:

I also was unable to find anything, and I did search and inspect...

Laurent Godard wrote:

Hi all,

i play with calc Outline and experiences some troubles

1- on a sheet, using showDetail and hideDetail
hideDetail works even if only the adresse one cell of the range is used as argument
showDetail needs the whole range address though
Is it normal ? How can i use the showDetail with knowing only on cell of the group

2 when i'm on a cell, is there any method to know if it belongs actually to a group and retreive the bounds of it ?
Didn't find anything at range, sheet and component level :(

Thanks in advance

Laurent



Laurent,

Following this thread in the archive I think your question has not yet
been answered.
For now I can only help with part 2 of your problem with the following code:


Sub cellInRange
      Dim sEnumName As String
      Dim sRangeName As String
      oDocument = ThisComponent
      oSheet = Thiscomponent.CurrentController.ActiveSheet
      oSelect = Thiscomponent.CurrentSelection.getRangeAddress
      nCellCol = oSelect.StartColumn
      nCellRow = oSelect.StartRow
      oRanges = oDocument.NamedRanges
      oEnum = oRanges.createEnumeration

      Do While oEnum.hasMoreElements()
          On Error Goto sheetError                  'Not all ranges will be in 
the current sheet.
          oRange = oEnum.nextElement
          sEnumName =  oRange.getName()
          oRange = oSheet.GetCellRangeByName( sEnumName )
          nStartCol = oRange.RangeAddress.StartColumn
          nEndCol= oRange.RangeAddress.EndColumn
          nStartRow = oRange.RangeAddress.StartRow
          nEndRow = oRange.RangeAddress.EndRow
          if nCellCol >= nStartCol and nCellCol <= nEndCol and \
                        nCellRow >= nStartRow and nCellRow <= nEndRow then
              sRangeName = sEnumName
              MsgBox "Cell in range " & sRangeName
              On Error Goto 0
              exit do
          end if
          sheetError:
          On Error Goto 0
        Loop

        if sRangeName = ""  then
             MsgBox "Cell is not in a named range"
      end if
End Sub


The Do While part was inspired by para. 10.3.3 of the Macro Document of
one Mr. Andrew Douglas Pitonyak...


I hope this helps,

Gerrit Jasper





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

Reply via email to