Apache OpenOffice (AOO) Bugzilla – Issue 26330
Dynamic height of footer doesn't work with hidden paras in footer
Last modified: 2004-08-19 14:38:12 UTC
I have a document (template) with the following pagestyle properties: footerIsOn = true footerHeight = 0,5cm footerIsDynamicSpacing = false footerIsDynamicHeight = true The footer contains some paras with fields(HiddenParagraphs). All paras are visible. The height of the footer is about 3cm. By creating a new document based on the template, a macro (event: on_Create) sets the values of different textfields(SetExpression), so therefore some paras in the footer are now hidden, others are not. The height of the footer should now decrease to optimal height (and so it did in Star 5.2!!). But is does not (also not by refreshing). And now: If I set footerIsDynamicSpacing manually to true and back to false then the footer gets its optimal height. So I think there is a coherence with this new feature (to avoid misunderstanding, in German ("Dynamischen Abstand verwenden"). If desired, I can post the relevant documents. Peter
Hi Peter, >>If desired, I can post the relevant documents. yes, please do so. this would make it a lot easier for us to reproduce your issue. Thanks, Max
Created attachment 13800 [details] template with hidden paras in footer (stw,sxw and jpg)
Hi Max, please take a look at the attachment. The sxw-file doesn't show the real appearance after loading "AsTemplate" 'cause saving the document and reloading sets the footer to optimal height. That's why I've posted the jpg. To reproduce the behaviour, load the sxw-file, set the content of the variable "Sprechzeiten_Infozentrale" to "xxx". Look at the footer. The hidden paras are visible. Set the content back to an empty string (oops, that cannot be done with GUI, so take the following code): Sub For_Max() ChangeVariable(StarDesktop.CurrentComponent,"Sprechzeiten_Infozentrale" ,"") End Sub Sub ChangeVariable(oDoc as Object,byVal Feldname as String,byVal Feldinhalt as String) On local Error Goto ErrorHandler Dim oField, oFieldMaster as Object Dim sFieldName as String Dim sServiceArray() oFieldEnumeration = oDoc.TextFields.createEnumeration Do While oFieldEnumeration.hasMoreElements() oField = oFieldEnumeration.nextElement sServiceArray() = oField.SupportedServiceNames If Instr( sServiceArray(0), "TextField.SetExpression" ) > 0 Then If oField.VariableName = Feldname then oField.Content = Feldinhalt End If End IF loop oDoc.TextFields.Refresh Exit Sub ErrorHandler: MsgBox Error & " in Zeile " & erl & " der Sub ChangeVariable" End Sub The hidden paras now should be hidden. But they are visible until changing and commiting a value in format / page / footer dialog. Thanks Peter
Hi Peter, sorry, the macro "For_Max()" does not work here with a 1.1.1rc3 linux build. "Variable not defined in Zeile 96 der Sub ChangeVariable". I will attach the document.
Created attachment 13961 [details] basic error doc
Hi Max, 'Option Explicit' must be commented out. Please see the following document. Peter
Created attachment 13970 [details] file to reproduce behaviour of footer
Do you need more info? Sincerely Peter
I close this one in favour of issue 33182, which is more precise and much shorter. *** This issue has been marked as a duplicate of 33182 ***
closed.