Juergen Schmidt wrote:
Michael Prochaska wrote:
Hi,
thanks for the hint but this does not work for me :-(

I've added the following code:

Sub refresh()
Dim xFields
xFields = ThisComponent.getTextFields()
xFields.refresh
End Sub

Any ideas whats going wrong here?
i wouldn't use ThisComponent here and would specify the document explicitly to ensure that the correct document gets refreshed.
The usage of ThisComponent is always a little bit tricky.

But of course i don't know if it helps

Juergen




The condition in the Hidden Paragraph field is correct, when i do a mail
merge, the blank lines are suppressed...

Best regards,
Michael



Mi Michael,

Michael Prochaska wrote (18-5-2008 22:59)

i'm using OOo 2.4.0 and i want to force the evaluation process of the
condition of a hidden paragraph field.

http://api.openoffice.org/docs/common/ref/com/sun/star/text/textfield/HiddenParagraph.html

i think it might work like this (pseudo code):
1) enumerate all textfields
2) if field supports service hidden paragraph
3) evaluate the condition
4) if the condition is true
4.1) get the paragraph object to which the hiddenparagraph field is
bound
   4.2) hide the pragraph

i'm asking here bevause i'm not sure if this is possible. any hints how
to achiev this?
In OOo Basic I simply use
    xFields = ThisComponent.getTextFields()
    xFields.refresh
Using the GUI you mustr check or uncheck 'hidden Paragraph
using the dispatcher go' like
sub Main
rem ----------------------------------------------------------------------
rem define variables
dim document   as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ShowHiddenParagraphs"
args1(0).Value = true  (not hidden)

dispatcher.executeDispatch(document, ".uno:ShowHiddenParagraphs", "", 0, args1())


end sub


Kindest regards,
Cor
--

"The Year of 3" -2008- "Het jaar van 3"

Cor Nouws
Arnhem - Netherlands - nl.OpenOffice.org - marketing contact


---------------------------------------------------------------------
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]



---------------------------------------------------------------------
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]

Reply via email to