[api-dev] Calc Outline and cell address
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 Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org Indesko >> http://www.indesko.com Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org Livre "Programmation OpenOffice.org", Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [api-dev] Calc Outline and cell address
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 -- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Fwd: Re: [api-dev] Calc Outline and cell address]
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]
Re: [Fwd: Re: [api-dev] Calc Outline and cell address]
Hi Gerrit Following this thread in the archive I think your question has not yet been answered. thanks for tacking care For now I can only help with part 2 of your problem with the following code: Yes this is a way i did it Nevertheless i would have expect a method of the cell object returning the colletion of ranges it belong to, or a method of the namedRanges with the cell object as argument Concerning outline, the only way i found is to overload the levels with namedRanges and retreive the whole range to show/hide Thanks again for your response Laurent -- Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org Indesko >> http://www.indesko.com Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org Livre "Programmation OpenOffice.org", Eyrolles 2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]