-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

at the moment I am trying to convert some of my basic macros into a java 
component :-)
but get stuck with the following problem:

dispatching ".uno:ClosePreview" from java seems not to work in all cases,
if I open a message box directly after the "xDispatch.executeDispatch" the 
message
box will be displayed in the preview mode ... after closing the message box, we 
are
still in the preview mode  ... the dispatch got lost ???

I think this i caused due to the async behaviour of the dispatching framwork ...

I also tried xNotifyingDispatcher.dispatchWithNotification() without success 
... :-(

In Basic I used the following:

Function ClosePreview()

        Dim oView as Object
        Dim oDispatcher as Object
        Dim mNoArgs()
        Dim i as Integer

        oView = ThisComponent.getCurrentController()

        If Not hasUnoInterfaces(oView, "com.sun.star.sheet.XSpreadsheetView") 
Then
                oDispatcher = 
createUnoService("com.sun.star.frame.DispatchHelper")
                
oDispatcher.executeDispatch(ThisComponent.getCurrentController().Frame, 
".uno:ClosePreview", "",
0, mNoArgs())
                While Not hasUnoInterfaces(oView, 
"com.sun.star.sheet.XSpreadsheetView") and i < 10
                        Wait(0)
                        oView = ThisComponent.getCurrentController()
                        i = i + 1
                Wend
        EndIf

        MsgBox "Hello World..." & CStr(i)
End Function

Any hints ?

Oliver
- --

GnuPG key 0xCFD04A45: 8822 057F 4956 46D3 352C 1A06 4E2C AB40 CFD0 4A45
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE1haCTiyrQM/QSkURArqIAJ9jFRKTyvkmU/u0/oeqGcu481KXvgCff5CJ
L3IkL+IJav7TP1H5UhXoi/0=
=hPV6
-----END PGP SIGNATURE-----

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

Reply via email to