From 13f35ce781b2a0e6d4af736379cf8f0789225c1b Mon Sep 17 00:00:00 2001 From: Kay Ramme Date: Mon, 21 May 2001 14:42:23 +0000 Subject: no document base available (#79698#) --- sj2/source/jscpp/sjapplet_impl.cxx | 32 ++++++++++++-------------- sj2/stardiv/applet/AppletExecutionContext.java | 8 +++++-- 2 files changed, 21 insertions(+), 19 deletions(-) (limited to 'sj2') diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx index 4f8ce4fa616a..e9711bb21455 100644 --- a/sj2/source/jscpp/sjapplet_impl.cxx +++ b/sj2/source/jscpp/sjapplet_impl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: sjapplet_impl.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: kr $ $Date: 2001-04-10 13:54:47 $ + * last change: $Author: kr $ $Date: 2001-05-21 15:42:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -114,17 +114,19 @@ void SjApplet2_Impl::init(Window * pParentWin, _pParentWin = pParentWin; // Java URL erzeugen - OUString url = rDocBase.GetMainURL(); - if (url.getLength()) { - //WorkAround, weil Java mit dem | nicht zurecht kommt - if(rDocBase.GetProtocol() == INET_PROT_FILE && url.pData->buffer[9] == INET_ENC_DELIM_TOKEN) { - OUString tmp = url.copy(0, 9); - tmp += OUString(INET_DELIM_TOKEN); - tmp += url.copy(10); - - url = tmp; - } - } + OUString url = OUString::createFromAscii("file:///"); +// OUString url = rDocBase.GetMainURL(); + +// if (url.getLength()) { +// //WorkAround, weil Java mit dem | nicht zurecht kommt +// if(rDocBase.GetProtocol() == INET_PROT_FILE && url.pData->buffer[9] == INET_ENC_DELIM_TOKEN) { +// OUString tmp = url.copy(0, 9); +// tmp += OUString(INET_DELIM_TOKEN); +// tmp += url.copy(10); + +// url = tmp; +// } +// } _xJavaVM = Reference(smgr->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.java.JavaVirtualMachine"))), UNO_QUERY); _xJavaThreadRegister_11 = Reference(_xJavaVM, UNO_QUERY); @@ -146,10 +148,6 @@ void SjApplet2_Impl::init(Window * pParentWin, _pJVM = (JavaVM*)nP; } - - OString tmp = OUStringToOString(url, RTL_TEXTENCODING_ASCII_US); - OSL_TRACE("applet url: %s\n", tmp.getStr()); - TKTThreadAttach jenv(_pJVM, _xJavaThreadRegister_11.get()); _jcAppletExecutionContext = jenv.pEnv->FindClass("stardiv/applet/AppletExecutionContext"); testJavaException(jenv.pEnv); diff --git a/sj2/stardiv/applet/AppletExecutionContext.java b/sj2/stardiv/applet/AppletExecutionContext.java index 0f8e1fbdb950..321d81eec875 100644 --- a/sj2/stardiv/applet/AppletExecutionContext.java +++ b/sj2/stardiv/applet/AppletExecutionContext.java @@ -2,9 +2,9 @@ * * $RCSfile: AppletExecutionContext.java,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kr $ $Date: 2001-04-10 13:56:23 $ + * last change: $Author: kr $ $Date: 2001-05-21 15:42:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -171,6 +171,8 @@ public final class AppletExecutionContext extends ExecutionContext if(_baseURL == null) _baseURL = _documentURL; + if(DEBUG) System.err.println("##### " + getClass().getName() + ".init - baseUrl:" + _baseURL); + _className = getParameter("code"); String defaultExtension = ".class"; String oldExtension = ".java"; @@ -361,6 +363,8 @@ public final class AppletExecutionContext extends ExecutionContext * Methods for AppletStub interface */ public void appletResize(int width, int height) { + if(DEBUG) System.err.println("##### " + getClass().getName() + ".appletResize: " + width + " " + height); + _container.setSize(width, height); if(_applet != null) _applet.setSize(width, height); -- cgit