I found what seems to be an easily replicable bug in the TextSection implementation :
I tried posting this earlier on API-DEV but didnt get a response, so i decided to post it here: <http://www.nabble.com/forum/ViewPost.jtp?post=13049246> I have a simple use case to duplicate the bug: a) Create an empty writer document. (OOo 2.3 ) b) Insert a section, call it "Section1". c) After this section, add a few paragraph breaks by hitting enter. d) Insert a section, call it "Section2". e) Now go to the space with line breaks between "Section1" and "Section2", and insert another section called "Section3" there. f) Finally click Format->Sections. and it displays the order of the sections as : Section1 Section2 Section3 When it should be: Section1 Section3 Section2 The API also displays the order incorrectly: <code> Dim sections sections = thisComponent.getTextSections().ElementNames Dim i Dim outStr outStr = "" For i=LBound(sections) to UBound(sections) outStr = sections(i) + Chr(13)+Chr(10) + outStr Next i Msgbox outStr </code> if I save the document, and reopen it, the order is displayed correctly. Is there any way to force the document to refresh itself to display the correct order without saving it ? (refresh() and reformat() doesnt work in this case) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
