To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=82420
------- Additional comments from [EMAIL PROTECTED] Fri Oct 26 18:34:54 +0000
2007 -------
By the fact, that *all* child sections are been returned, there can't be a wrong
order.
Use this code:
REM ***** BASIC *****
Option Explicit
Sub Main
SectionTest
End Sub
Sub SectionTest
Dim Sections As Object
Dim Elements() As String
Dim OutStr As String
Dim i As Integer
Dim j As Integer
Sections = ThisComponent.getTextSections()
Elements = Sections.ElementNames
OutStr = ""
For i = LBound( Elements() ) To UBound( Elements() )
OutStr = OutStr & Chr( 13 ) & Elements( i )
recursiveChilds( Sections.getByIndex( i ), 1, OutStr )
Next i
Msgbox OutStr
End Sub
Sub recursiveChilds( Section As Object, iLevel As Integer, s As String )
Dim i As Integer
Dim Childs() As Object
Childs() = Section.getChildSections()
For i = LBound( Childs() ) To UBound( Childs() )
s = s & Chr( 13 ) & String( 4 * iLevel, " " ) & "|-" & Childs(
i ).getName()
recursiveChilds( Childs( i ), iLevel + 1, s )
Next i
End Sub
---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]