diff -uNr jscpp.bak/makefile.mk jscpp/makefile.mk --- oo_1.0_src/sj2/source/jscpp.bak/makefile.mk Wed Dec 4 00:26:56 2002 +++ oo_1.0_src/sj2/source/jscpp/makefile.mk Thu Dec 5 18:34:06 2002 @@ -2,9 +2,9 @@ # # $RCSfile$ # -# $Revision$ +# $Revision$ # -# last change: $Author$ $Date$ +# last change: $Author$ $Date$ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -68,10 +68,6 @@ .INCLUDE : $(PRJ)$/util$/makefile.pmk -UNOUCRDEP=$(SOLARBINDIR)$/applicat.rdb -UNOUCRRDB=$(SOLARBINDIR)$/applicat.rdb -UNOUCROUT=$(OUT)$/inc - # --- Files -------------------------------------------------------- UNOTYPES= \ diff -uNr jscpp.bak/sjapplet_impl.cxx jscpp/sjapplet_impl.cxx --- oo_1.0_src/sj2/source/jscpp.bak/sjapplet_impl.cxx Tue Feb 19 12:36:18 2002 +++ oo_1.0_src/sj2/source/jscpp/sjapplet_impl.cxx Thu Dec 5 18:34:06 2002 @@ -2,9 +2,9 @@ * * $RCSfile$ * - * $Revision$ + * $Revision$ * - * last change: $Author$ $Date$ + * last change: $Author$ $Date$ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -133,10 +133,10 @@ pEnv->CallStaticObjectMethod(jcToolkit, jmToolkit_getDefaultToolkit); testJavaException(pEnv); jclass jcMotifAppletViewer = pEnv->FindClass( - "sun/plugin/navig/motif/MotifAppletViewer"); testJavaException(pEnv); + "sun/plugin/navig/motif/MotifAppletViewer"); if(pEnv->ExceptionOccurred()) { - pEnv->ExceptionClear(); + pEnv->ExceptionClear(); jcMotifAppletViewer = pEnv->FindClass( "sun/plugin/viewer/MNetscapePluginContext"); testJavaException(pEnv); } @@ -226,11 +226,11 @@ if (_joAppletExecutionContext) { TKTThreadAttach jenv(_pJVM, _xJavaThreadRegister_11.get()); - _pEmbeddedWindow->dispose(jenv.pEnv); - delete _pEmbeddedWindow; + _pEmbeddedWindow->dispose(jenv.pEnv); + delete _pEmbeddedWindow; - jenv.pEnv->DeleteGlobalRef(_joAppletExecutionContext); - jenv.pEnv->DeleteGlobalRef(_jcAppletExecutionContext); + jenv.pEnv->DeleteGlobalRef(_joAppletExecutionContext); + jenv.pEnv->DeleteGlobalRef(_jcAppletExecutionContext); } } @@ -244,7 +244,7 @@ // Java URL erzeugen - OUString url = rDocBase.GetMainURL(); + OUString url = rDocBase.GetMainURL(INetURLObject::DECODE_TO_IURI); if(!url.getLength()) url = OUString(RTL_CONSTASCII_USTRINGPARAM("file:///")); @@ -340,6 +340,7 @@ joDocBase, joParameters, _pEmbeddedWindow->_joWindow, (jlong)0); testJavaException(jenv.pEnv); jenv.pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_init); testJavaException(jenv.pEnv); jenv.pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_startUp); testJavaException(jenv.pEnv); + } void SjApplet2_Impl::setSize(const Size & rSize) throw(com::sun::star::uno::RuntimeException) @@ -391,6 +392,11 @@ jmethodID jmAppletExecutionContext_shutdown = jenv.pEnv->GetMethodID(_jcAppletExecutionContext, "shutdown", "()V"); testJavaException(jenv.pEnv); jenv.pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_shutdown); testJavaException(jenv.pEnv); + + jmethodID jmWaitForDispose= jenv.pEnv->GetMethodID(_jcAppletExecutionContext,"waitForDispose","()V"); + testJavaException(jenv.pEnv); + //blocks until the applet has destroyed itself and the container was disposed (stardiv.applet.AppletExecutionContext.dispose) + jenv.pEnv->CallVoidMethod(_joAppletExecutionContext, jmWaitForDispose); if( _pParentWin ) {