Hello Mikhail,

Am Montag, den 08.10.2007, 14:53 +0200 schrieb Mikhail Voitenko:
> Hi Marc,
> 
> This is a bug, I have just submitted an issue to myself. It is going to 
> be fixed in OOo2.4 currently. Please use the following link to find the 
> issue.
> http://www.openoffice.org/issues/show_bug.cgi?id=82393

Thanks for information and filing that one. :)

I read the issues text as "if all three parameters are available it
should work". So I tried:

<BASIC> 
global doc as object
global lck as object

sub testLocker
        doc = ThisComponent
        oCB = CreateUnoListener("my_", "com.sun.star.embed.XActionsApproval")
        args() = Array( CreateUnoValue("any", doc), _
                                        CreateUnoValue("any", 1), _
                                        oCB _
                                  )
        psm = GetProcessServiceManager()
        lck = 
psm.createInstanceWithArguments("com.sun.star.embed.InstanceLocker", args())
end sub

function my_approveAction(nAction as long) as boolean
        'msgbox "Ping!"
        my_approveAction = FALSE
end function

sub ReleaseLock
        if NOT IsNull(lck) then lck.dispose()
end sub
</BASIC>

And indeed the "Ping!" appeared, but after clicking away this message
the writer doc was closed. Is there another error or did I fail in
handing over the approve listening function?

(I did test returning TRUE in the listening callback to be sure, no
change)

TIA,
Marc


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to