Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||hide/unhide of text sections is not reliable|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||CONFIRMED ---||QA Contact:|
|Priority:||P3||CC:||baumux, chris_mux, issues, mux2005|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description clutz 2007-05-21 08:48:07 UTC
There's an example (created out of a real-word usecase) that shows that unhiding a text section that previously was hidden doesn't work reliable. With the help of a short macro it is possible to produce a text section with the property IsVisible=true, that is not visible in fact. I've got a textdocument that contains some text sections where all but one text sections should be invisible. The visible one represents a part of a text written in a specific language and our letterhead system controls the hiding/unhiding of the textsections depending on the language that is currently set in a variable of our letterhead system. After some cycles of hiding and unhiding the textsections, the problem occurs. The following macro simulate the cycles of hiding and unhiding the text sections: Sub showHideSections dim str as String str = "" sections = ThisComponent.getTextSections() for k=1 to 2 for i=0 to sections.getCount()-1 s = sections.getByIndex(i) s.IsVisible = true str = str & s.getName() & chr(10) s.IsVisible = false next i next k s.IsVisible = true msgbox str End Sub The macro iterates twice through all textsections in a document and switches their visibility states from IsVisible=true to IsVisible=false. The last textsection is set to be visible in the end, but the textsection is not shown in fact where it's property IsVisible=true. I will attach an example which could be used to reproduce the bug: 1) open the file showHideSectionsProblem.odt (YES to macros) 2) run the above macro (it's already included in the document as Standard.Module1.showHideSections) 3) you can see that the second table gets hidden as the respective textsection is hidden. But the last textsection called "Berenglisch GROUPS ('england')" should be visible in that place. 4) open the navigator (F5) and see that the textsection "Berenglisch GROUPS ('england')" is grey'ed to mark a invisible textsection. 5) in the navigator: call edit... on this textsection and see that the flag "hidden" is not set for the textsection "Berenglisch GROUPS ('england')". So this textsection should be visible.
Comment 1 clutz 2007-05-21 08:50:09 UTC
Created attachment 45281 [details] An example that shows that hiding/unhiding of textsections is not reliable
Comment 2 clutz 2007-05-21 08:56:36 UTC
Sorry, the last section that should be visible is called "Berdeutschland GROUPS ('deutschland')". Please use this instead of "Berenglisch GROUPS ('england')" btw. I was able to reproduce the bug on OOo2.2 (linux), OOo 2.0.4 (linux) and OOo 2.2 (windows)
Comment 3 clutz 2007-05-21 12:40:52 UTC
It seems that one cause for the bug is the fact that the sections adjoin. If I put at least one paragraph between the sections, the hide/unhide scenario works. This is of cause only a bad workaround since I need an empty paragraph between the sections and the paragraph will not be hidden (ugly spaces). But maybe this helps finding the cause.
Comment 4 clutz 2007-06-01 10:37:15 UTC
@mru: could you please assign this issue to someone who feels responsible?
Comment 5 michael.ruess 2007-06-01 13:17:14 UTC
MRU->OS: see attached document. After the macro has run, ALL sections in the document are hidden, though the Format.Section dialog states, that "Berdeutschland GROUPS ('deutschland')" is not hidden at all. Please have a look.
Comment 6 Martin Hollmichel 2007-09-10 13:37:04 UTC
move target to 3.x according http://wiki.services.openoffice.org/wiki/Target_3x