summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-09-18 11:54:06 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-09-18 11:54:06 +0000
commit1b64e03aedfd2e40e01ccc35dde249310a9737a3 (patch)
tree56987c950873bd16ebc17c11e0f1a643ca09057c
parentb5d0edea37b43a55f4d6a730bb5961250e1984c4 (diff)
CWS-TOOLING: integrate CWS dtrans2vcl
2009-09-09 19:47:56 +0200 pl r276016 : merge fix for #i104390# into moved code 2009-09-07 12:50:47 +0200 pl r275891 : remove nonexistant header 2009-09-04 16:47:05 +0200 pl r275819 : forgot calling convention for Windoze 2009-09-04 13:27:36 +0200 pl r275800 : #150926# remove X11 dependency 2009-09-04 13:19:08 +0200 pl r275799 : #150926# move mac dtrans service to vcl to be used in service implementation 2009-09-03 21:19:01 +0200 pl r275774 : fix warning, adjust comment 2009-09-03 18:36:01 +0200 pl r275768 : no more sjlib 2009-09-03 17:56:49 +0200 pl r275767 : remove unused X11 link dependency 2009-09-03 17:43:35 +0200 pl r275766 : headless not used in X11 case 2009-09-03 17:34:36 +0200 pl r275765 : #150926# bye bye sj2 2009-09-03 16:19:04 +0200 pl r275761 : #150926# bye bye sj2, x11 dependenices removed where not necessary 2009-09-01 17:22:54 +0200 pl r275674 : #150926# step 1: move X11 code from dtrans to vcl, adapt glue code
-rw-r--r--basic/prj/build.lst2
-rw-r--r--desktop/util/makefile.mk18
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx1
-rw-r--r--sfx2/source/appl/appcfg.cxx5
-rw-r--r--sfx2/source/appl/appuno.cxx8
-rw-r--r--sfx2/source/doc/makefile.mk3
-rw-r--r--sfx2/util/makefile.mk1
-rw-r--r--sj2/doc/Todo.txt108
-rw-r--r--sj2/doc/concepts.html844
-rw-r--r--sj2/inc/sjapplet.hxx85
-rw-r--r--sj2/prj/build.lst8
-rw-r--r--sj2/prj/d.lst9
-rw-r--r--sj2/source/inc/java_lang_object.hxx94
-rw-r--r--sj2/source/jscpp/makefile.mk56
-rw-r--r--sj2/source/jscpp/sjapplet.cxx126
-rw-r--r--sj2/source/jscpp/sjapplet_impl.cxx617
-rw-r--r--sj2/source/jscpp/sjapplet_impl.hxx56
-rw-r--r--sj2/stardiv/app/AppletMessageHandler.java117
-rw-r--r--sj2/stardiv/app/AppletProps.java190
-rw-r--r--sj2/stardiv/app/AppletViewer.java995
-rw-r--r--sj2/stardiv/app/AppletViewerFactory.java46
-rw-r--r--sj2/stardiv/app/MsgAppletViewer.java189
-rw-r--r--sj2/stardiv/app/makefile.mk69
-rw-r--r--sj2/stardiv/applet/AppletExecutionContext.java383
-rw-r--r--sj2/stardiv/applet/Document.java166
-rw-r--r--sj2/stardiv/applet/DocumentProxy.java194
-rw-r--r--sj2/stardiv/applet/LiveConnectable.java45
-rw-r--r--sj2/stardiv/applet/makefile.mk78
-rw-r--r--sj2/stardiv/applet/resources/MsgAppletViewer.java135
-rw-r--r--sj2/stardiv/applet/resources/makefile.mk54
-rw-r--r--sj2/stardiv/controller/SjSettings.java179
-rw-r--r--sj2/stardiv/controller/makefile.mk58
-rw-r--r--sj2/stardiv/security/resources/MsgAppletViewer.java91
-rw-r--r--sj2/stardiv/security/resources/makefile.mk54
-rw-r--r--sj2/util/makefile.mk97
-rw-r--r--sj2/util/makefile.pmk46
-rw-r--r--sj2/util/target.pmk42
37 files changed, 21 insertions, 5248 deletions
diff --git a/basic/prj/build.lst b/basic/prj/build.lst
index ec6bd0e839..994901580c 100644
--- a/basic/prj/build.lst
+++ b/basic/prj/build.lst
@@ -1,4 +1,4 @@
-sb basic : l10n offuh svtools sj2 xmlscript framework NULL
+sb basic : l10n offuh svtools xmlscript framework NULL
sb basic usr1 - all sb_mkout NULL
sb basic\inc nmake - all sb_inc NULL
sb basic\source\app nmake - all sb_app sb_class sb_inc NULL
diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk
index 69b9c2254f..3712e49e98 100644
--- a/desktop/util/makefile.mk
+++ b/desktop/util/makefile.mk
@@ -108,7 +108,6 @@ APP1STDLIBS = \
$(SAXLIB) \
$(FWILIB) \
$(ICUUCLIB) \
- $(SJLIB) \
$(I18NUTILLIB) \
$(ICULIB) \
$(JVMFWKLIB) \
@@ -120,11 +119,11 @@ APP1STDLIBS = \
$(VOSLIB)
-.IF "$(GUI)" == "UNX"
-.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD"
-APP1STDLIBS+= -lXext -lSM -lICE
-.ENDIF
-.ENDIF
+#.IF "$(GUI)" == "UNX"
+#.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD"
+#APP1STDLIBS+= -lXext -lSM -lICE
+#.ENDIF
+#.ENDIF
APP1DEPN= $(APP1RES) verinfo.rc
@@ -172,7 +171,6 @@ APP5STDLIBS = \
$(SAXLIB) \
$(FWILIB) \
$(ICUUCLIB) \
- $(SJLIB) \
$(I18NUTILLIB) \
$(ICULIB) \
$(JVMFWKLIB) \
@@ -183,9 +181,9 @@ APP5STDLIBS = \
$(SALHELPERLIB) \
$(VOSLIB)
-.IF "$(OS)" == "LINUX"
-APP5STDLIBS+= -lXext -lSM -lICE
-.ENDIF # LINUX
+#.IF "$(OS)" == "LINUX"
+#APP5STDLIBS+= -lXext -lSM -lICE
+#.ENDIF # LINUX
APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
APP5DEF= $(MISCX)$/$(TARGET).def
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index 478712de08..073deaa45f 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -485,7 +485,6 @@
#include "sal/types.h"
#include "setup_native/qswin32.h"
#include "shell/systemshell.hxx"
-#include "sj2/sjapplet.hxx"
#include "sot/clsids.hxx"
#include "sot/exchange.hxx"
#include "sot/factory.hxx"
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index d7be1bbf66..8f18b37067 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -62,7 +62,7 @@
#include <sot/exchange.hxx>
//#include <svtools/agprop.hxx>
-#include <sj2/sjapplet.hxx>
+//#include <sj2/sjapplet.hxx>
#include <svtools/isethint.hxx>
#include <unotools/configmgr.hxx>
@@ -850,6 +850,8 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
// INet Session neu aufsetzen
if ( bResetSession )
{
+ // no more sj2
+ #if 0
try
{
SjApplet2::settingsChanged();
@@ -858,6 +860,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
{
DBG_ERRORFILE( "SjApplet2::settingsChanged() throws an exception" );
}
+ #endif
}
// geaenderte Daten speichern
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 47f875466e..81d198412a 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -137,7 +137,7 @@ using namespace ::com::sun::star::io;
#include "brokenpackageint.hxx"
#include "eventsupplier.hxx"
#include "xpackcreator.hxx"
-#include "applet.hxx"
+// #include "applet.hxx"
#include "plugin.hxx"
#include "iframe.hxx"
#include <ownsubfilterservice.hxx>
@@ -2150,6 +2150,7 @@ SFX2_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo(
xNewKey = xKey->createKey( aTempStr );
xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") );
+ #if 0
// AppletObject
aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aImpl += ::sfx2::AppletObject::impl_getStaticImplementationName();
@@ -2158,7 +2159,8 @@ SFX2_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo(
aTempStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/UNO/SERVICES"));
xNewKey = xKey->createKey( aTempStr );
xNewKey->createKey( ::rtl::OUString::createFromAscii("com.sun.star.frame.SpecialEmbeddedObject") );
-
+ #endif
+
// IFrameObject
aImpl = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aImpl += ::sfx2::IFrameObject::impl_getStaticImplementationName();
@@ -2324,11 +2326,13 @@ SFX2_DLLPUBLIC void* SAL_CALL component_getFactory(
IF_NAME_CREATECOMPONENTFACTORY( TestMouseClickHandler )
#endif
IF_NAME_CREATECOMPONENTFACTORY( OPackageStructureCreator )
+ #if 0
if ( ::sfx2::AppletObject::impl_getStaticImplementationName().equals(
::rtl::OUString::createFromAscii( pImplementationName ) ) )
{
xFactory = ::sfx2::AppletObject::impl_createFactory();
}
+ #endif
IF_NAME_CREATECOMPONENTFACTORY( ::sfx2::PluginObject )
IF_NAME_CREATECOMPONENTFACTORY( ::sfx2::IFrameObject )
IF_NAME_CREATECOMPONENTFACTORY( ::sfx2::OwnSubFilterService )
diff --git a/sfx2/source/doc/makefile.mk b/sfx2/source/doc/makefile.mk
index 986755558c..1b42844491 100644
--- a/sfx2/source/doc/makefile.mk
+++ b/sfx2/source/doc/makefile.mk
@@ -55,7 +55,6 @@ SLOFILES = \
$(SLO)$/docinf.obj \
$(SLO)$/oleprops.obj \
$(SLO)$/iframe.obj \
- $(SLO)$/applet.obj \
$(SLO)$/plugin.obj \
$(SLO)$/docfile.obj \
$(SLO)$/objuno.obj \
@@ -90,6 +89,8 @@ SLOFILES = \
$(SLO)$/docstoragemodifylistener.obj \
$(SLO)$/querytemplate.obj
+# $(SLO)$/applet.obj \
+
# --- Tagets -------------------------------------------------------
diff --git a/sfx2/util/makefile.mk b/sfx2/util/makefile.mk
index 5ee6e64dac..6bdb4a8122 100644
--- a/sfx2/util/makefile.mk
+++ b/sfx2/util/makefile.mk
@@ -98,7 +98,6 @@ SHL1STDLIBS+=\
$(CPPULIB) \
$(VOSLIB) \
$(SALLIB) \
- $(SJLIB) \
$(LIBXML2LIB) \
diff --git a/sj2/doc/Todo.txt b/sj2/doc/Todo.txt
deleted file mode 100644
index 6520abaa10..0000000000
--- a/sj2/doc/Todo.txt
+++ /dev/null
@@ -1,108 +0,0 @@
-Erkenntnisse aus sj/sj1, die in sj2 beachtet werden müssen
-
-
-- Call von C++
-"javascript: ..." nicht wie event behandeln, insbesondere werden
-this und document nicht implizit als Search-Objekte gesetzt.
-
-
-- prototype Eigenschaft von Objekten:
-Manipuliert Klassen-Informationen, falls an einem beliebigen Objekt
-eine Property mit gleichem Namen angelegt wird, so gilt dieses
-Ueberschreiben jedoch nur fuer dieses eine Objekt !!!
-Im Sj/Sj1 Projekt ist dies jedoch nicht erfuellt !
-
-Beispiel:
-function Ctor() { ... }
-
-obj1 = new Ctor(); // obj1 obj2
-obj2 = new Ctor(); //-------------------------
-Ctor.prototype.toString = myToString; // myToString myToString
-obj1.toString = myToString2; // myToString2 myToString
-Ctor.prototype.toString = myToString3; // myToString2 myToString3
-
-
-- toString() und valueOf() Behandlung des BaseObj bei Type-Konversion
-
-========================================================================
-
-Bemerkungen zur Suchreihenfolge und zum Ueberladen von Funktionen:
-
-* fuer jede 'Klasse' (z.B. Math, Date, String) gibt es ein Konstruktor-
- Objekt in der JavaScript-Umgebung.
- In dem Konstruktor-Objekt werden die Properties der Klasse angelegt,
- z.B. sin, cos.
- Der Konstruktor setzt seine Properties an jedem neu erzeugten
- Objekt. Daher hat z.B. jedes Date-Objekt eine (default-behandelte)
- Property setMonth.
- Zum Setzten der Properties des Konstruktor an das neu erzeugte
- Objekt sollte die initProp()-Methode noch einen Bereich der zu
- kopierenden Properties bekommen, damit nicht alle nachtraeglich
- am Konstruktor-Objekt angelegten Properties auch am Objekt gesetzt
- werden.
-
-* jedes Objekt haelt eine Referenz auf seinen Konstruktor (entweder die
- vordefinierten Klassen wie Math, Date oder die Funktion mit der das
- Objekt erzeugt wurde).
-
-* fuer die Suchreihenfolge gibt es folgende drei Moeglichkeiten:
-
- - Default-behandelte Property:
- aStrg = new String( "gulp" );
- aStrg.toString() // --> verwendet toString-Property am
- // String-Konstruktor (default-Behandlung)
-
- - Default-Behandlung ueberladen am Konstruktor:
- aStrg = new String( "gulp" );
- String.prototype.toString = myToString; // UEBERLADEN !
- aStrg.toString() // --> verwendet myToString-Funktion.
- // Das prototype-Objekt wird am String-Ctor.
- // angelegt und ueberschreibt daher die
- // default-behandelte Property am Objekt !!!
- // Der Interpreter muss dann noch an einem
- // ggf. vorhandenen prototype-Objekt am
- // Konstruktor nach der Property suchen.
-
- - ueberladen am Objekt:
- aStrg = new String( "gulp" );
- String.prototype.toString = myToString; // am Ctor. ueberladen
- aStrg.toString = myToString2;
- aStrg.toString() // --> verwendet myToString2-Funktion.
- // Die Property toString wird am Objekt
- // ueberschrieben und somit das Flag, dass
- // die default-Behandlung anzeigt, zurueck
- // gesetzt. D.h. der Interpreter muss das
- // prototype-Objekt des Konstruktors NICHT
- // durchsuchen.
-
-
-========================================================================
-
-DEMNAECHST:
-
-Die Properties der Standard-Objekte (z.B. setSeconds() am Date)
-werden am prototype-Objekt des Konstruktors (z.B. DateCtor) angelegt.
-Bei der Suche nach Properties an einem beliebigen Objekt wird erst
-das Objekt durchsucht und anschliessend das prototype-Objekt des
-Konstruktors fuer das Objekt durchsucht. Dieses Verhalten gleicht
-dem Netscape-Verhalten (Stand 2.7.1997).
-
-ACHTUNG, AB 11.8:
-Das ist so nicht korrekt, da die entsprechenden Properties direkt
-am prototype-Objekt nicht bekannt sind. Die an den Objekten als
-Default geflagten Properties bilden daher das Netscape-Verhalten
-besser ab.
-
-
-========================================================================
-
-WEITERE OFFENE PROBLEME:
-------------------------
-
- * this auf der Wiese funktioniert noch nicht korrekt
-
- * Konversion von Typen ?
-
-
-
-
diff --git a/sj2/doc/concepts.html b/sj2/doc/concepts.html
deleted file mode 100644
index 49f336b131..0000000000
--- a/sj2/doc/concepts.html
+++ /dev/null
@@ -1,844 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
- <TITLE></TITLE>
- <META NAME="GENERATOR" CONTENT="StarOffice/4.0 (WinNT/Win95)">
- <META NAME="AUTHOR" CONTENT=" ">
- <META NAME="CREATED" CONTENT="19970401;13233926">
- <META NAME="CHANGEDBY" CONTENT=" ">
- <META NAME="CHANGED" CONTENT="19970529;8045806">
-</HEAD>
-<BODY>
-<H1>Stardivision erweiterte Java Grundkonzepte</H1>
-<H2><A NAME="Exceptions"></A>Exceptions:</H2>
-<P>Die Grundidee von Exceptions ist es einen Fehlerkontext
-aufzuspannen, der erst n&auml;her betrachtet werden mu&szlig;, wenn
-man Fehler korrigieren will. Der Programmcode sollte durch die
-Behandlung von Fehlern nicht undurchsichtig und unleserlich werden.
-Meiner Meinung nach sollten Exceptions deswegen auch nicht als
-zweiter Returnwert vergewaltigt werden.<BR><B>Ziel:</B> Nach dem
-Auftreten einer Exception sollte es m&ouml;glichst einfach sein das
-System in einen definierten arbeitsf&auml;higen Zustand zu
-versetzen.<BR>Es gibt grunds&auml;tzlich drei verschiedenen Arten von
-Exceptions. Diese unterscheiden sich durch den Zustand in dem sie das
-Objekt hinterlassen.</P>
-<OL>
- <LI><P><A NAME="Undefined Exception"></A>Die von der Methode
- benutzten Objekte sind in einem undefinierten Zustand. Jede auf dem
- Objekt aufgerufene Methode mu&szlig; nach einer solchen Exception
- nicht mehr ihre Spezifikation einhalten. Diese Exception wird im
- folgenden mit &#132;Undefined Exception&#147; benannt. Dabei ist zu
- beachten, da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>,
- au&szlig;er die angegebenen, benutzt werden. Au&szlig;erdem werden
- &#132;ReadOnly&#147; Resourcen nicht modifiziert.</P>
- <LI><P><A NAME="Defined Exception"></A>Die von der Methode benutzten
- Objekte sind in einem genau definierten Zustand, der aber von der
- Zusicherung der Methode abweicht. Diese Exception wird im folgenden
- mit &#132;Defined Exception&#147; benannt. Dabei ist zu beachten,
- da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>, au&szlig;er
- die angegebenen, benutzt werden. Au&szlig;erdem werden &#132;ReadOnly&#147;
- Resourcen nicht modifiziert.</P>
- <LI><P><A NAME="Transacted Exception"></A>Die von der Methode
- benutzten Objekte sind in ihrem vorherigen Zustand, der aber von der
- Zusicherung der Methode abweicht. Diese Exception wird im folgenden
- mit &#132;Transacted Exception&#147; benannt. Dabei ist zu beachten,
- da&szlig; keine weiteren <A HREF="#Resourcen">Resourcen</A>, au&szlig;er
- die angegebenen, benutzt werden. Au&szlig;erdem werden &#132;ReadOnly&#147;
- Resourcen nicht modifiziert. Diese Spezifikation trifft auch auf
- &#132;Defined Exception&#147; zu, wegen ihrer Bedeutung f&uuml;hre
- ich sie extra auf.</P>
-</OL>
-<P>Die Benutzbarkeit eines Objektes, nachdem eine Exception
-aufgetreten ist, ist vom obigen Typ der Exception abh&auml;ngig.</P>
-<P><FONT COLOR="#ff0000">Satz 1.1: Nachdem eine &#132;Undefined
-Exception&#147; aufgetreten ist, kann mit dem Objekt sowie allen
-&#132;ReadWrite&#147; Resourcen nicht mehr weiter gearbeitet werden.</FONT></P>
-<P><FONT COLOR="#ff0000">Satz 1.2: Nachdem eine &#132;Defined
-Exception&#147; aufgetreten ist, kann aufgrund des genau definierten
-Zustandes weiter gearbeitet werden.</FONT></P>
-<P><FONT COLOR="#ff0000">Satz 1.3: Nach einer &#132;Transacted
-Exception&#147; ist der gleiche Zustand wie vor dem Aufruf
-wiederhergestellt.</FONT></P>
-<P>Es sollten m&ouml;glichst nur &#132;Transacted Exception&#147;
-ausgel&ouml;st werden. Bei komplizierten Methoden l&auml;&szlig;t
-sich aber eine &#132;Defined Exception&#147; nicht immer vermeiden.
-Eine &#132;Undefined Exception&#147; deutet immer auf eine
-Programmierfehler hin. Der Typ der Exeption kann nur in Zusammenhang
-mit der Methode in der sie Auftritt ermittelt werden.</P>
-<P><FONT COLOR="#ff0000">Satz 1.4: Durch die Klasse der Exception
-kann niemals alleine der Typ (undefined, defined oder transacted)
-entschieden werden.</FONT></P>
-<H2><A NAME="Resourcen"></A>Resourcen (under construction)</H2>
-<P>Die Grundidee von Resourcen ist die Aufteilung eines Gebildes in
-weitere Einheiten. Auf diesen k&ouml;nnen dann verschiedene Auftr&auml;ge
-gleichzeitig arbeiten, wenn sie nicht dieselben Resourcen benutzen.
-Z.B. kann man in einer Textverarbeitung die einzelnen Dokumente als
-Einheiten betrachten. Auftr&auml;ge, die sich nur auf ein Dokument
-beziehen, k&ouml;nnen parallel zu anderen Dokumenten bearbeitet
-werden.<BR>Mit Resourcen sind im System bzw. der Applikation
-vorhandene Objekte, Services, Kan&auml;le ... gemeint, die zur Zeit
-nur von einem Thread benutzt werden k&ouml;nnen. Als Konsequenz
-m&uuml;ssen Resourcen einem Thread zugeordnet werden, bevor dieser
-sie benutzt.<BR><B>Ziel:</B> Es mu&szlig; m&ouml;glich sein, 1.
-Auftr&auml;ge parallel abzuarbeiten, 2. die Frage &#132;Warum k&ouml;nnen
-zwei Auftr&auml;ge nicht parallel arbeiten?&#147; beantwortet zu
-k&ouml;nnen.<BR>Es gibt verschiedene M&ouml;glichkeiten diese
-Zuordnung vorzunehmen. Zwei stelle ich kurz vor.</P>
-<OL>
- <LI><P><A NAME="Prealloc Resource Konzept"></A>Eine Art der
- Zuordnung ist das vorherige Anfordern aller f&uuml;r den Auftrag
- ben&ouml;tigten Resourcen. Ist dies m&ouml;glich, kann der Auftrag
- ohne weitere St&ouml;rungen ablaufen. Die Resourcen d&uuml;rfen
- freigegeben werden, bevor der Auftrag beendet ist. Dies gilt
- nat&uuml;rlich nur f&uuml;r nicht mehr verwendete Resourcen. Es darf
- ebenfalls das Zuordnungsrecht von lesend und schreibend auf lesend
- zur&uuml;ckgenommen werden. Diese Zuornungsart wird im weiteren mit
- &#132;Prealloc Resource Konzept&#147; bezeichnet.</P>
- <LI><P><A NAME="Ondemand Resource Konzept"></A>Eine andere Art der
- Zuordnung ist das Anfordern der Resourcen, wenn sie ben&ouml;tigt
- werden. Dabei kann es zu St&ouml;rungen kommen, wenn sich
- verschiedene Auftr&auml;ge um die gleiche Resource bewerben. Die
- Resourcen d&uuml;rfen freigegeben werden, bevor der Auftrag beendet
- ist. Dies gilt nat&uuml;rlich nur f&uuml;r nicht mehr verwendete
- Resourcen. Es darf ebenfalls das Zuordnungsrecht von lesend und
- schreibend auf lesend zur&uuml;ckgenommen werden. Diese Zuornungsart
- wird im weiteren mit &#132;Ondemand Resource Konzept&#147;
- bezeichnet.</P>
-</OL>
-<P>Es gibt noch weitere M&ouml;glichkeiten Auftr&auml;ge zu
-bearbeiten, die die gleichen Resourcen benutzen. H&auml;ufig findet
-man solche L&ouml;sungen bei Datenbankanwendungen.<BR>In der
-folgenden Tabelle stehen sich die beiden Konzepte mit ihren Vor- und
-Nachteilen und ihren Anforderungen gegen&uuml;ber.</P>
-<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 FRAME=BOX RULES=ALL>
- <COLGROUP>
- <COL WIDTH=85*>
- <COL WIDTH=85*>
- <COL WIDTH=85*>
- </COLGROUP>
- <THEAD>
- <TR>
- <TH WIDTH=33% VALIGN=TOP>
- <P><BR></TH>
- <TD WIDTH=33% VALIGN=TOP><DL>
- <DD>Prealloc Resource Konzept </DD>
- </DL>
- </TD>
- <TD WIDTH=33% VALIGN=TOP>
- <DL>
- <DD>Ondemand Resource Konzept </DD>
- </DL>
- </TD>
- </TR>
- </THEAD>
- <TBODY>
- <TR>
- <TD VALIGN=TOP>
- <P>Alle Resourcen m&uuml;ssen vor der Auftragsausf&uuml;hrung
- bekannt sein.</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- <TD VALIGN=TOP>
- <P>Nein</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>Nicht mehr ben&ouml;tigte Resourcen d&uuml;rfen freigegeben
- werden.</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>Es kann zu Verklemmungen oder &#132;Races&#147; kommen.</TD>
- <TD VALIGN=TOP>
- <P>Nein</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>In Bearbeitung befindliche Auftr&auml;ge m&uuml;ssen, aufgrund
- fehlender Resourcen, abgebrochen werden.</TD>
- <TD VALIGN=TOP>
- <P>Nein</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>Der Zustand der Resourcen ist zu jedem Zeitpunkt der
- Auftragsabarbeitung bekannt.</TD>
- <TD VALIGN=TOP>
- <P>Ja</TD>
- <TD VALIGN=TOP>
- <P>Nein</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>Algorithmus zur Resourcevergabe.</TD>
- <TD VALIGN=TOP>
- <P>Einfach, da nur &uuml;berpr&uuml;ft werden mu&szlig;, ob alle
- ben&ouml;tigten Resourcen verf&uuml;gbar sind.</TD>
- <TD VALIGN=TOP>
- <P>Komplex, da neben dem Anfordern von Resourcen auch noch
- &uuml;berpr&uuml;ft werden mu&szlig;, ob das System <A HREF="#lebendig">lebendig</A>
- ist.</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P>Parallelit&auml;t</TD>
- <TD VALIGN=TOP>
- <P>Hoch, da unabh&auml;ngige Auftr&auml;ge meistens nur lesend
- auf gemeinsame Resourcen zugreifen.</TD>
- <TD VALIGN=TOP>
- <P>Sehr hoch, da die ben&ouml;tigten Resourcen erst angefordert
- werden, wenn man sie braucht.</TD>
- </TR>
- </TBODY>
-</TABLE>
-<P ALIGN=LEFT>Meiner Meinung nach ist nur das &#132;Prealloc Resource
-Konzept&#147; ohne richtige Programmierwerkzeuge zur Entwicklung
-paralleler Algorithmen (z.B. Netzprogrammierung) wenigstens ein
-bi&szlig;chen beherschbar.</P>
-<P ALIGN=LEFT>Es stellt sich die Frage wie das &#132;Prealloc
-Resource Konzept&#147; in einem Komponenten-Modell und in einem
-Objekt-Environment integriert werden kann. Ein Objekt-Environment ist
-ein mehr oder weniger dynamische Menge von Objekten die miteinander
-in Verbindung stehen. Aus dem obigen Beispiel k&ouml;nnte man die
-Verbindung der Textverarbeitung zu ihren Dokumenten als
-Objekt-Environment bezeichnen. Ein Objekt in diesem Environment kann
-nun &uuml;ber seine Verbindungen mit anderen Objekten kommunizieren.
-Die Schnittstellen mit denen &uuml;ber die Verbindung kommuniziert
-wird nennt man Komponenten-Modell. Die Idee des Objekt-Environments
-ist es weitere Objekte m&ouml;glichst einfach zu integrieren. So
-k&ouml;nnten in unserem Beispiel weitere Dokumenttypen wie ein
-HTML-Dokument eingebunden werden. Die Schittstellen m&uuml;&szlig;ten
-nur dem, von der Textverarbeitung geforderten, Komponenten-Modell
-gen&uuml;gen. Liefert aber das Modell, wie heute &uuml;blich, keine
-Information &uuml;ber die ben&ouml;tigten Resourcen bei Benutzung der
-Schnittstellen, dann k&ouml;nnen Verklemmungen bzw. Inkonsistenzen
-nicht vermieden werden. Aus diesem Grunde ist es notwendig, das
-Resource-Konzept in das Komponenten-Modell zu integrieren.<BR><B>Ziel:</B>
-Es mu&szlig; ein Kompromi&szlig; zwischen hoher Nebenl&auml;ufigkeit
-und der damit verbundenen Komplexit&auml;t, sowie einfacher
-Programmierung und geringer Nebenl&auml;ufigkeit gefunden
-werden.<BR><B>Folgen:</B> In einem Objekt-Environment m&uuml;ssen die
-einzelnen Objekte also dynamisch auf Verbindungen zu Objekten mit
-hoher oder geringer Nebenl&auml;ufigkeit reagieren. Die Komplexit&auml;t
-dieser Aufgabe darf aber nicht in die Objekte verlagert werden, da
-von einem seriellen Objekt (bzw. dessen Programmierer) nicht die
-Steuerung nebenl&auml;ufiger Auftr&auml;ge verlangt werden
-kann.<BR><B>L&ouml;sungsansatz:</B> Die Behandlung der
-Nebenl&auml;ufigkeit wird nicht in einer einfachen Komponente
-implementiert. Das bedeutet sie mu&szlig; mit einer
-Default-Behandlung zufrieden sein, die minimale Nebel&auml;ufigkeit
-nach sich zieht. Eine Komponente kann sich aber in die Vergabe der
-Resourcen einmischen. So kann sie ihren Grad der Nebenl&auml;ufigkeit
-erh&ouml;hen. Dies ist dann aber auch mit erh&ouml;htem
-Implementationsaufwand zu bezahlen. Auf der anderen Seite macht es
-aber keinen Sinn serielle oder Komponenten mit zu gro&szlig;em
-Resourcebedarf einzubinden, wenn das Objekt-Environment danach
-praktisch nicht mehr lauff&auml;hig ist. Das bedeutet, da&szlig; das
-Objekt-Environment auch Forderungen bez&uuml;glich des Resourcebedarf
-an die Komponenten stellen darf.</P>
-<H3>Anforderungen</H3>
-<OL>
- <LI><P ALIGN=LEFT>Es mu&szlig; ein Modell geben, in dem alle
- vorhandenen Resourcen und deren Beziehung zueinander eingetragen
- werden. Dadurch kann abgesch&auml;tzt werden, welchen Resourcebedarf
- eine Komponente hat. Das &#132;Sch&auml;tzen&#147; ist w&ouml;rtlich
- zu nehmen. (Im Zusammenhang mit <A HREF="#Security">Security</A>
- wird man aber auch noch sehen, da&szlig; der Zugriff auf bestimmte
- Resourcen nicht m&ouml;glich ist.) F&uuml;r das &#132;Prealloc
- Resource Konzept&#147; gilt, es m&uuml;ssen mindestens die
- ben&ouml;tigten Resourcen verf&uuml;gbar sein. Zur Not sind diese
- alle.</P>
- <LI><P ALIGN=LEFT>Eine nebenl&auml;ufige Komponente mu&szlig; in
- jeder ihrer von au&szlig;en erreichbaren Methoden kontrollieren, ob
- die entsprechenden Resourcen f&uuml;r sie angefordert wurden. Damit
- serielle Komponenten diese Methoden nutzen k&ouml;nnen, k&ouml;nnen
- die ben&ouml;tigten Resourcen angefordert werden, wenn vorher noch
- <B>keine einzige</B> durch den ausf&uuml;hrenden Auftrag belegt war.
- Zur Erl&auml;uterung: Serielle Komponenten belegen keine Resourcen.
- Damit w&uuml;rde jeder Aufruf einer nebenl&auml;ufigen Komponente
- scheitern. Um dies zu vermeiden, werden die Resourcen in der
- nebenl&auml;ufigen Komponente angefordert.</P>
- <LI><P ALIGN=LEFT>Serielle Komponenten m&uuml;ssen also damit
- rechnen eine Fehlermeldung &uuml;ber nicht verf&uuml;gbare Resourcen
- zu bekommen.</P>
-</OL>
-<H3>Szenarien</H3>
-<P>Von unserem bisherigen Beispiel ausgehend, gibt es eine
-Applikation in der sich drei Dokumente befinden. Ein serielles
-Textdokument, ein nebenl&auml;ufiges Tabellendokument und ein
-nebenl&auml;ufiges Pr&auml;sentationsdokument. Die Applikation selbst
-ist nebenl&auml;ufig. Die Relationen gehen von der Applikation zu den
-Dokumenten und umgekehrt. Die Dokumente kennen sich nicht.</P>
-<P>Fall 1:<BR>In das serielle Textdokument soll eine Zeichenfolge
-eingef&uuml;gt werden. Da es sich um eine serielle Komponente
-handelt, kann dieses Einf&uuml;gen nicht von selbst ausgel&ouml;st
-werden, es mu&szlig; von einer nebenl&auml;ufigen Komponente, hier
-die Applikation, angesto&szlig;en werden. Die Applikation ist aber
-verpflichtet die Resourcen vorher zu reservieren. F&uuml;r diese
-Absch&auml;tzung gibt es drei realistische M&ouml;glichkeiten. 1. Sie
-reserviert nur das Textdokument selbst. Das bedeutet, das
-Textdokument kann mit keinem anderen Objekt, auch nicht mit der
-Applikation, kommunizieren. 2. Die Applikation und das Textdokument
-wird reserviert. Es ist also nur der Zugriff auf die anderen
-Dokumente verwehrt. 3. Alle Objekte werden reserviert. Geht es nach
-dem &#132;Prealloc Resource Konzept&#147; mu&szlig; 3. gew&auml;hlt
-werden. Aufgrund von Sicherheitsbeschr&auml;nkungen werden wir aber
-noch sehen, das serielle Komponenten in ihrer Auftragsbearbeitung
-gestoppt werden k&ouml;nnen. Wenn der Abbruch eines Auftrags m&ouml;glich
-ist, spielt es aber keine Rolle durch wen (Resourcen oder <A HREF="#Security">Security</A>)
-dies geschehen ist.</P>
-<P>Fall 2:<BR>In das nebenl&auml;ufige Tabellendokument soll eine
-Zeichenfolge eingef&uuml;gt werden. Dieser Auftrag kann von der
-Applikation oder der Komponente selbst ausgel&ouml;st werden. In
-jedem Fall m&uuml;ssen die Resourcen vor der Auftragsbearbeitung
-reserviert werden. Man kann dies auch der Komponente &uuml;berlassen
-(siehe Anforderung 2.), aber man scheitert, wenn zwei Auftr&auml;ge
-zu einem Auftrag zusammengefa&szlig;t werden sollen. Dies passiert
-z.B., wenn der Auftrag &#132;Text ersetzen&#147; aus den Auftr&auml;gen
-&#132;L&ouml;schen&#147; und &#132;Einf&uuml;gen&#147; besteht. Auf
-jeden Fall wird nur das Tabellendokument selbst reserviert, da das
-Einf&uuml;gen keine Auswirkung auf andere Komponenten hat.</P>
-<P>Fall 3:<BR>In das nebenl&auml;ufige Tabellendokument wird der
-Applikationsname aus der Applikation eingef&uuml;gt. Dazu fragt das
-Tabellendokument nach den ben&ouml;tigten Resourcen, um den Namen zu
-holen und ihn einzuf&uuml;gen. Zum Holen wird die Applikation
-ben&ouml;tigt und zum Einf&uuml;gen das Tabellendokument. Beide
-m&uuml;ssen vor der Auftragsausf&uuml;hrung reserviert werden.</P>
-<P>Fall 4:<BR>Das nebenl&auml;ufige Tabellendokument f&uuml;gt
-selektierten Text aus dem seriellen Textdokument ein. Da das
-Textdokument seinen Resourcebedarf nicht mitteilt, wird einer aus
-Fall eins abgesch&auml;tzte Bedarf genommen. Man kann sehen, da&szlig;
-der Auftrag f&uuml;r alle drei M&ouml;glichkeiten erteilt werden
-kann. Seine Nebenl&auml;ufigkeit wird dann durch die Absch&auml;tzung
-eingeschr&auml;nkt. Zus&auml;tzlich m&uuml;ssen nat&uuml;rlich die
-ben&ouml;tigten Resourcen f&uuml;r das Einf&uuml;gen geholt werden.
-Alle m&uuml;ssen vor der Auftragsausf&uuml;hrung reserviert werden.</P>
-<H3>Programmierkonzepte</H3>
-<P>Welche Konzepte k&ouml;nnen in einer objektorientierten Sprache
-wie c++ oder Java oder einer prozeduralen Sprache wie Fortran oder
-&#132;c&#147; eingesetzt werden, um Nebenl&auml;ufigkeit zu
-erreichen. </P>
-<OL>
- <LI><P>Es gibt zwei M&ouml;glichkeiten eine Resource zu belegen. Das
- ist Exclusive (lesen, schreiben) und &#132;ReadOnly&#147;. Eine
- Resource kann von mehreren Auftr&auml;gen benutzt werden, wenn diese
- nur &#132;ReadOnly&#147; ben&ouml;tigen.</P>
- <LI><P>Es gibt Resourcen f&uuml;r die man die Resourceverteilung
- optimieren kann. Ein Objekt welches nicht ge&auml;ndert werden kann
- und das w&auml;hrend der Auftragsausf&uuml;hrung immer konsistent
- ist kann die Anforderung &#132;Exclusiv&#147; automatisch auf
- &#132;ReadOnly&#147; abschw&auml;chen. Dies lohnt sich, wenn man
- serielle Komponenten hat, die nichts &uuml;ber die
- Resourceanforderungen mitteilen. Als Beispiel m&ouml;chte ich eine
- Instanz der Klasse String in Java nennen. Ein weitere Art von
- Resourcen fordern bei Auftr&auml;gen an sie 1. keine weiteren
- Auftr&auml;ge an, 2. beenden sie die Auftr&auml;ge schnell und 3.
- die Reihenfolge der &Auml;nderung an ihnen ist f&uuml;r andere nicht
- wichtig. Dies ist zum Beispiel bei der Speicherverwaltung in c der
- Fall. Diese Art der Resource darf zu einem sp&auml;teren Zeitpunkt
- angefordert werden. Sie mu&szlig; sofort benutzt und wieder
- freigegeben werden. Aus diesem Grund erledigen solche Resourcen das
- Anfordern und Freigeben selbst.</P>
- <LI><P>Bevor ein Auftrag ausgef&uuml;hrt werden kann, m&uuml;ssen
- alle von ihm ben&ouml;tigten Resourcen reserviert werden. Dies ist
- f&uuml;r einen Auftrag, der aus mehreren Teilauftr&auml;gen besteht,
- aufwendig. Eine Optimierung kann darin bestehen die Teilauftr&auml;ge
- asynchron auszuf&uuml;hren. Allerdings dringt diese Verhaltensweise
- nach au&szlig;en. Z.B. m&uuml;ssen Auftr&auml;ge, die diesen dann
- asynchronen Auftrag nutzen, dann auch asynchron sein. Eine weitere
- Optimierung in der Autragsvergabe gibt es, wenn ein Autrag die
- Resourcervergabe nicht &auml;ndert. Es ist dann m&ouml;glich mehr
- Auftr&auml;ge vorzuziehen.</P>
- <LI><P>Es mu&szlig; eine Queue geben, in die Auftr&auml;ge eingef&uuml;gt
- werden k&ouml;nnen. Konfliktfreie Auftr&auml;ge k&ouml;nnen parallel
- ausgef&uuml;hrt werden. <B>Achtung:</B> Der Resourcebedarf eines
- Auftrages kann nur bestimmt werden, wenn alle ben&ouml;tigten
- Resourcen &#132;ReadOnly&#147; reserviert werden k&ouml;nnen, es sei
- denn kein vor ihm laufender Auftrag &auml;ndert die Resourcevergabe.
- Warum ist das so? Ein Auftrag kann eine Resource dahingehend &auml;ndern,
- da&szlig; danach andere Resourcen ben&ouml;tigt werden als vorher.
- Der vorher bestimmte Bedarf ist dann falsch.</P>
- <LI><P>Das Modell der Resourcen kann vergr&ouml;bert oder verfeinert
- werden. In einem Tabellendokument k&ouml;nnte man jede einzelne
- Zelle zu einer Resource machen. Um die Komplexit&auml;t der
- Resourcemodells zu vereinfachen kann man aber weiter alle Zellen der
- Dokument-Resource zuordnen. Wird also aus einer anderen Komponente
- die Zelle angefordert, wird automatisch das ganze Dokument
- reserviert. Daraus ergeben sich zwei Vorteile: 1. F&uuml;r den
- Auftraggeber ist die Vergr&ouml;berung transparent und 2. Kann die
- Resource an dem Objekt reserviert werden, das man ohnehin kennt.</P>
- <LI><P>Das Resource-Modell ist hierarchisch. Eine Resource kann nur
- einer Vergr&ouml;berung zugeordnet werden. Die Tabellenzellen d&uuml;rfen
- also nur dem Tabellendokument zugeordnet werden. Daraus ergibt sich,
- da&szlig; innerhalb einer solchen Hierarchie nebenl&auml;ufig
- gearbeitet werden kann. Es d&uuml;rfen dann aber keine Resourcen
- au&szlig;erhalb der Hierarchie benutzt werden, selbst wenn diese
- reserviert sind.</P>
-</OL>
-<H3>Probleme und L&ouml;sungen</H3>
-<P>&Uuml;ber den Benutzer m&uuml;ssen Daten abgefragt werden, die
-&uuml;ber die Benutzung von Resourcen entscheidet (z.B.
-Dateiname):<BR>Ein solcher Auftrag mu&szlig; in zwei Teilauftr&auml;ge
-unterteilt werden. Der erste erledigt die Abfrage. Danach werden alle
-Resourcen freigegeben und dann fordert der zweite seine Resourcen und
-wird bearbeitet. Eventuell kann ein solcher Auftrag den vorherigen
-ersetzten, um zu verhindern das andere abh&auml;ngige Auftr&auml;ge
-vor dem Aufgeteilten bearbeitet werden.</P>
-<P>Ich habe mich bei einem Objekt als Listener angemeldet:<BR>Es gibt
-zwei Arten von Benachrichtigungen die ich erhalte. 1. Aufgrund der
-Ausf&uuml;hrung eines Auftrages und 2. einen Event von einer
-nebenl&auml;ufigen Komponente. Im ersten Fall &uuml;berpr&uuml;fe ich
-den Resourcebedarf und f&uuml;hre dann den Auftrag aus. Im zweiten
-Fall reserviere ich die ben&ouml;tigten Resourcen und f&uuml;hren den
-Auftrag aus. Sind Resourcen reserviert, ist dies Fall eins, sonst
-Fall zwei.</P>
-<P>Ich bin Broadcaster:<BR>Broadcaste ich aufgrund eines Auftrags tue
-ich nichts weiter. L&ouml;se ich den Broadcast ohne Auftrag aus, mu&szlig;
-ich die Resourcen f&uuml;r die Listener bestimmen und sie vor dem
-Aufruf reservieren. Die einzelnen Listener werden als unabh&auml;ngig
-betrachtet. Im Detail findet folgender Ablauf statt. 1. Die Liste der
-Listener wird kopiert. 2. F&uuml;r den ersten Listener wird der
-Resourcebedarf ermittelt.</P>
-<H3>Implementation</H3>
-<P>Die Basis f&uuml;r die Implementation des Resourcekonzeptes legen
-die Klassen <A HREF="stardiv.resource.Resource.html#Resource">Resource</A>,
-<A HREF="stardiv.resource.ResourceList.html#ResourceList">ResourceList</A>,
-<A HREF="stardiv.resource.ResourceLockException.html#ResourceLockException">ResourceLockException</A>,
-<A HREF="stardiv.resource.Task.html#Task">Task</A>, <A HREF="stardiv.resource.TaskManager.html#TaskManager">TaskManager</A>,
-<A HREF="stardiv.resource.TaskThread.html#Task">TaskThread</A>,
-<A HREF="stardiv.resource.ThreadData.html#ThreadData">ThreadData</A>
-und das Interface <A HREF="stardiv.resource.Resourceable.html#Resourceable">Resourceable</A>
-fest. Um ein Objekt in das Resourcekonzept einbinden zu k&ouml;nnen
-sind folgende Schritte notwendig:<BR>1. Das Resourceable Interface
-mu&szlig; implementiert werden. 2. Ein Konstruktor mit der dem
-Objekte zugewiesenen Resource. 3. Jede public Methode bekommt eine
-*_Resource(...) Methode zur Seite, mit der der Resourcebedarf
-ermittelt werden kann. 4. Innerhalb der public Methode wird der
-Resourcebedarf ermittelt. 5. Mit dieser Information die als
-ResourceListe vorliegt, wird eine Auftrag (Task) erzeugt. 6. Dieser
-Auftrag wird beim TaskManager angemeldet. 7. Nach der Zuteilung durch
-den TaskManager wird der Auftrag ausgef&uuml;hrt. 8. Alle Resourcen
-und der Auftrag werden wieder freigegeben.<BR>Diese Liste ist
-detailliert aber nicht <B>vollst&auml;ndig</B>. In der Klasse
-Resource steht imm eine Beispiel, welches aktuell sein sollte.</P>
-<P>Folgende Programmierrichtlinien gibt es, um das &#132;Prealloc
-Resource Konzept&#147; in Java zu integrieren:</P>
-<OL>
- <LI><P ALIGN=LEFT>Es mu&szlig; das Interface <A HREF="stardiv.resource.Resourceable.html#Resourceable">Resourceable</A>
- implementiert werden. Mit Hilfe dieses Interfaces kann der
- Resourcebedarf eines Objektes erfragt werden. Diese Richtlinien
- gelten dann auch f&uuml;r die Superklasse.</P>
- <LI><P ALIGN=LEFT>???Es mu&szlig; das Interface <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
- implementiert werden. Damit kann &uuml;berpr&uuml;ft werden, ob an
- den Resourcen Ver&auml;nderungen vorgenommen wurden.</P>
- <LI><P ALIGN=LEFT>Nur Methoden die &uuml;ber die Lebensdauer des
- Objektes keine ver&auml;nderten Werte liefern d&uuml;rfen immer
- gerufen werden. Das sind zum Beispiel alle Methoden der Klasse
- java.lang.Object.</P>
- <LI><P ALIGN=LEFT>Um den Resourcebedarf einzelner Methoden genauer
- zu ermitteln kann eine Methode mit dem, um _Resource( ResourceList
- aRL, boolean bCheck, ... ) erweiterten Namen, gerufen werden. Ein
- Beispiel befindet sich in der Klasse <A HREF="stardiv.resource.Resource.html#Resource">Resource</A>.</P>
-</OL>
-<H2><A NAME="Security"></A>Security</H2>
-<H2><A NAME="Data Requests"></A>Data Requests</H2>
-<P>Diese Schnittstelle soll das Anfordern von Daten vereinheitlichen.
-Das Problem, welches zu diesem Ansatz f&uuml;hrte, ist das Lesen von
-Daten &uuml;ber einen &#132;langsamen&#147; Internet-Stream. Das
-bedeutet es werden Daten ben&ouml;tigt, die erst noch &uuml;bertragen
-werden m&uuml;ssen. Da das Pull-Modell immer einen eigenen Thread
-vorraussetzt, um die restliche Anwendung nicht zu blockieren, habe
-ich das Push-Modell gew&auml;hlt.<BR><B>Ziel:</B> F&uuml;r die
-Implementation sollte es m&ouml;glichst transparent sein, wie die
-Daten herangeschafft werden. Als zweites soll die Schnittstelle f&uuml;r
-denjenigen einfach sein, der alle Daten sofort bereith&auml;lt.<BR><B>L&ouml;sung:</B>
-Der Datenverarbeiter ist passiv. Das bedeutet, beim Entgegennehmen
-der Daten beginnt er nicht sie zu verarbeiten. Dies mu&szlig; extra
-angesto&szlig;en werden. Zweitens, der Datenverarbeiter h&auml;lt den
-Status des Datenlieferanten. Dies k&ouml;nnen EOF, f&uuml;r alle
-Daten gelesen, READY, f&uuml;r sind Daten da, PENDING, es kommen noch
-weitere Daten und NO_SOURCE, es wurden nicht alle Daten verarbeitet
-und es kommen keine weiteren Daten mehr. <B>Achtung</B> der Status
-ist nur zu bestimmten Zeitpunkten g&uuml;ltig. Der Datenverarbeiter
-darf nur im Zustand PENDING Daten bekommen. Diese Annahme sch&uuml;tzt
-ihn vor der Implementation eines Puffers. Das <A HREF="stardiv.concepts.QueryData.html#QueryData">QueryData</A>
-- Interface ist die Spezifikation f&uuml;r dieses Verhalten.</P>
-<H2><A NAME="Modify"></A>Modify</H2>
-<P>Das Ziel ist nur eine Schnittstelle zu erstellen, mit der ein
-Objekt auf &Auml;nderungen &uuml;berpr&uuml;ft werden kann. Da es f&uuml;r
-ein Objekt verschiedene M&ouml;glichkeiten gibt &Auml;nderungen an
-sich zu pr&uuml;fen (z.B. &Auml;nderungsz&auml;hler, Kopie), mu&szlig;
-die Schnittstelle m&ouml;glichst flexibel sein, um vielen
-Implementationen gerecht zu werden. Die L&ouml;sung sind zwei
-Methoden. Mit der einen (getModifyHandle()) kann der Zeitpunkt
-festgemacht werden, zu dem m&ouml;gliche &Auml;nderungen &uuml;berpr&uuml;ft
-werden sollen. Der R&uuml;ckgabewert ist eine beliebiges Objekt, so
-da&szlig; in ihm die ben&ouml;tigte &Uuml;berpr&uuml;fungsinformation
-(z.B. der &Auml;nderungsz&auml;hler) untergebracht werden kann.
-Danach kann mit der zweiten Methode (isModified(Object)) &uuml;berpr&uuml;ft
-werden, ob eine &Auml;nderung stattgefunden hat. Das Interface f&uuml;r
-dieses Konzept hei&szlig;t <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
-.</P>
-<H2><A NAME="LifeConnect"></A>LifeConnect</H2>
-<P>LifeConnect ist die Kommunikation zwischen PlugIns, Applets und
-JavaScript. Die Kommunikation kann in beide Richtungen erfolgen.Unter
-JavaScript kann auf alle Systemklassen zugegriffen werden. Die
-Abbildung der JavaScript-Aufrufe nach Java ist die Aufgabe der Klasse
-<A HREF="stardiv.js.ip.CallJava.html#CallJava">CallJava</A>. Dazu
-wird das in Java 1.1 implementierte Package java.lang.reflect
-benutzt. Da JavaScript eine nicht typisierte Sprache ist, werden die
-Werte nach JavaScript-Regeln in die entsprechenden Javatypen
-umgesetzt. Bez&uuml;glich der Sicherheit wird ein JavaScript-Programm
-auf die gleiche Stufe wie ein Applet gestellt. Um den Zugriff der
-Applets auf JavaScript zu gestatten, mu&szlig; das HTML-Tag MYSCRIPT
-angegeben werden. Auf die Java-Klassen kann in JavaScript mit dem
-Prefix &#132;Package&#147; zugegriffen werden (sun, java und netscape
-ben&ouml;tigen keinen Prefix). Die Klassen netscape.plugin.Plugin,
-netscape.javascript.JSObject und netscape.javascript.JSException
-dienen zur Kommunikation von Java mit JavaScript.</P>
-<P>Konvertierungstabelle anhand der Spezifikation &#132;JavaScript
-Language Specifications&#147; 3.1.2 TypeConversion</P>
-<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 CELLSPACING=0 FRAME=HSIDES RULES=ALL>
- <COLGROUP>
- <COL WIDTH=26*>
- <COL WIDTH=40*>
- <COL WIDTH=47*>
- <COL WIDTH=47*>
- <COL WIDTH=47*>
- <COL WIDTH=47*>
- </COLGROUP>
- <THEAD>
- <TR>
- <TH WIDTH=10% VALIGN=TOP>
- <P><BR></TH>
- <TH WIDTH=16% VALIGN=TOP>
- <P><I>byte</I></TH>
- <TH WIDTH=19% VALIGN=TOP>
- <P><I>short</I></TH>
- <TH WIDTH=19% VALIGN=TOP>
- <P><I>char</I></TH>
- <TH WIDTH=19% VALIGN=TOP>
- <P><I>int</I></TH>
- <TH WIDTH=19% VALIGN=TOP>
- <P><I>long</I></TH>
- </TR>
- </THEAD>
- <TBODY>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Undef.</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Function</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(10) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(12) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(13) valueOf/error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Object</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(10) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(12) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(13) valueOf/error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Object (null)</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(10) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(12) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(13) 0</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>double</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(10) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(12) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(13) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>boolean</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Leer String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(10) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(11) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(12) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(13) error/ Zahl</TD>
- </TR>
- </TBODY>
-</TABLE><DL>
- <DT><BR></DT>
-</DL>
-<TABLE WIDTH=100% BORDER=1 CELLPADDING=5 CELLSPACING=0 FRAME=BOX RULES=ALL>
- <COLGROUP>
- <COL WIDTH=27*>
- <COL WIDTH=59*>
- <COL WIDTH=44*>
- <COL WIDTH=35*>
- <COL WIDTH=36*>
- <COL WIDTH=55*>
- </COLGROUP>
- <THEAD>
- <TR>
- <TH WIDTH=10% VALIGN=TOP>
- <P><BR></TH>
- <TH WIDTH=23% VALIGN=TOP>
- <P><I>float</I></TH>
- <TH WIDTH=17% VALIGN=TOP>
- <P><I>double</I></TH>
- <TH WIDTH=14% VALIGN=TOP>
- <P><I>boolean</I></TH>
- <TH WIDTH=14% VALIGN=TOP>
- <P><I>String</I></TH>
- <TH WIDTH=22% VALIGN=TOP>
- <P><I>Object</I></TH>
- </TR>
- </THEAD>
- <TBODY>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Undef.</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Fehler</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>false</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>&#132;undefined&#147;</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>null</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Function</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(14) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) valueOf/ true</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) JS-Code der Funktion</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) netscape .javascript. JSObject</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Object</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(14) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) valueOf/error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) valueOf/ true</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) valueOf / toString
- </TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) Java-Cast/ error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Object (null)</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(14) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) false</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) &#132;null&#147;</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) null</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>double</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(14) Zahl oder Fehler, wenn Bereichs-&uuml;berschreitung</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(7) 0, NaN -&gt; false !0, -+Infinite -&gt; true</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(8) Zahl, NaN, Infinity oder -Infinity</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(9) Number/ error
- </TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>boolean</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) 0/1</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) boolean</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) &#132;false&#147;/ &#147;true&#147;</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) Boolean/ error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>Leer String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>error</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) false</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) String/ error</TD>
- </TR>
- <TR>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(14) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) error/ Zahl</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) true</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(30) String</TD>
- <TD VALIGN=TOP>
- <P ALIGN=LEFT>(15) String/ error</TD>
- </TR>
- </TBODY>
-</TABLE>
-<P><BR></P>
-<P>Der Algorithmus zum mappen der polymorphen Methoden in Java:<BR>1.
-Die Anzahl der Parameter mu&szlig; &uuml;bereinstimmen.<BR>2. Die
-Parameter m&uuml;ssen, nach der obigen Tabelle, konvertiert werden
-k&ouml;nnen.<BR>3. Es gibt ein Punktesystem, nach dem die Methode
-ausgew&auml;hlt wird. Die Punkte stehen in Klammern in den
-Tabelleneintr&auml;gen. Die Konvertierungspunkte f&uuml;r Zahlen sind
-typabh&auml;ngig und nicht wertabh&auml;ngig. Dadurch ist
-sichergestellt, das nicht unterschiedliche Methoden bei sich
-&auml;ndernden Werten gerufen werden. Kommt es allerdings zu einem
-Konvertierungsfehler (&Uuml;berlauf), dann wird versucht eine andere
-Methode zu finden.<BR>4. Es wird vorausgesetzt, da&szlig; die
-Methoden &#132;valueOf&#147; und &#132;toString&#147; keine
-Seiteneffekte haben. Sie d&uuml;rfen also beliebig oft aufgerufen
-werden.<BR>5. Es wird nur null auf eine Java-Array abgebildet.</P>
-<H2><A NAME="Testen"></A>Testen</H2>
-<P>Das Ziel dieses Abschnitts ist es Vorgehensweisen zu entwickeln,
-mit denen sich die Java Grundkonzepte testen lassen. Folgende
-Checkliste ist f&uuml;r jede Methode abzuarbeiten.</P>
-<OL>
- <LI><P>Zu jeder Klasse gibt es eine entsprechende Testklasse. Diese
- steht im Package &#132;test&#147;.... Der Name der Klasse wird mit
- &#132;Test&#147; erweitert. Beispiel: stardiv.memory.BitArray wird
- zu test.memory.BitArrayTest. Jede dieser Klassen hat eine Methode
- &#132;public static void main( String [] )&#147;. Diese Methode wird
- aufgerufen, um den Test aller Methoden anzusto&szlig;en. Der Test
- ist nicht interaktiv. Wird ein Fehler festgestellt, wird das
- Programm mit exit( -1 ) verlassen.</P>
- <LI><P>Jede Methode mu&szlig; unabh&auml;ngig von ihren Environment
- getestet werden. Alle Resourcen f&uuml;r die Methode werden als
- Dummy f&uuml;r den Test implementiert. Diese Forderung f&uuml;hrt zu
- sauberen Schnittstellen, da ansonsten f&uuml;r den Test ja ganze
- Objekte implementiert werden m&uuml;ssen.</P>
- <LI><P>Das Testprotokoll protokolliert mit &#132;System.out.println&#147;.
- Vor dem Test der einzelnen Methoden wird in einer Zeile kurz &uuml;ber
- den Test informiert. Scheitert der Test, dann wird eine
- Fehlermeldung ausgegeben in der &#132;failed&#147; enthalten sein
- mu&szlig;. </P>
- <LI><P>Um <A HREF="#Defined Exception">Defined Exception</A> und
- <A HREF="#Transacted Exception">Transacted Exception</A> testen zu
- k&ouml;nnen, sollten die <A HREF="stardiv.concepts.Resource.html#Resource">Resource</A>
- und <A HREF="stardiv.concepts.ModifyTestable.html#ModifyTestable">ModifyTestable</A>
- Interfaces implementiert werden. Es kann damit automatisch gepr&uuml;ft
- werden, ob sich eine Resource unerlaubter Weise ge&auml;ndert hat.</P>
-</OL>
-<H2>Begriffe</H2>
-<P><A NAME="lebendig"></A>Lebendig: Ein System wird als lebendig
-bezeichnet, wenn alle in ihm befindlichen Auftr&auml;ge
-fertiggestellt werden k&ouml;nnen. Sie sich also nicht in einer
-Verklemmung oder einem &#132;Race&#147; befinden.</P>
-</BODY>
-</HTML> \ No newline at end of file
diff --git a/sj2/inc/sjapplet.hxx b/sj2/inc/sjapplet.hxx
deleted file mode 100644
index 1125b519c8..0000000000
--- a/sj2/inc/sjapplet.hxx
+++ /dev/null
@@ -1,85 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: sjapplet.hxx,v $
- * $Revision: 1.6 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _SJ_SJAPPLET_HXX
-#define _SJ_SJAPPLET_HXX
-
-#include "com/sun/star/uno/Reference.hxx"
-#include <tools/string.hxx>
-
-class INetURLObject;
-class Size;
-class SjJScriptAppletObject;
-class SvCommandList;
-class Window;
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-} } } }
-
-struct SjApplet2_Impl;
-
-enum SjNetAccess
-{
- NET_UNRESTRICTED, NET_NONE, NET_HOST
-};
-
-class SjApplet2
-{
- SjApplet2_Impl * _pImpl;
-
-public:
- static void settingsChanged(void);
-
- SjApplet2();
- virtual ~SjApplet2();
- void Init(
- com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext > const & context,
- Window * pParentWin, const INetURLObject & rDocBase,
- const SvCommandList & rCmdList);
- void setSizePixel( const Size & );
- void appletRestart();
- void appletReload();
- void appletStart();
- void appletStop();
- void appletClose();
-
- // Fuer SO3, Wrapper fuer Applet liefern
- SjJScriptAppletObject * GetJScriptApplet();
-
- virtual void appletResize( const Size & ) = 0;
- virtual void showDocument( const INetURLObject &, const XubString & ) = 0;
- virtual void showStatus( const XubString & ) = 0;
-// virtual SjJSbxObject * getJScriptWindowObj() = 0;
-};
-
-
-
-#endif // _REF_HXX
diff --git a/sj2/prj/build.lst b/sj2/prj/build.lst
deleted file mode 100644
index 82fe969d02..0000000000
--- a/sj2/prj/build.lst
+++ /dev/null
@@ -1,8 +0,0 @@
-j2 sj2 : jvmaccess sandbox svtools NULL
-j2 sj2 usr1 - all j2_mkout NULL
-j2 sj2\stardiv\applet nmake - all j2_starappl j2_contr NULL
-j2 sj2\stardiv\applet\resources nmake - all j2_appres j2_starappl NULL
-j2 sj2\stardiv\controller nmake - all j2_contr NULL
-j2 sj2\stardiv\app nmake - all j2_starapp j2_starappl j2_contr NULL
-j2 sj2\source\jscpp nmake - all j2_jscpp j2_starapp NULL
-j2 sj2\util nmake - all j2_util j2_jscpp NULL
diff --git a/sj2/prj/d.lst b/sj2/prj/d.lst
deleted file mode 100644
index c70fb0ef2b..0000000000
--- a/sj2/prj/d.lst
+++ /dev/null
@@ -1,9 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\sj2
-..\%__SRC%\class\classes.jar %_DEST%\bin%_EXT%\classes.jar
-..\inc\sjapplet.hxx %_DEST%\inc%_EXT%\sj2\sjapplet.hxx
-
-..\%__SRC%\lib\sj.lib %_DEST%\lib%_EXT%\sj.lib
-..\%__SRC%\lib\lib*.so %_DEST%\lib%_EXT%
-..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib
-..\%__SRC%\slb\sj.lib %_DEST%\lib%_EXT%\xsj.lib
-..\%__SRC%\bin\j?????_g.dll %_DEST%\bin%_EXT%\j?????_g.dll
diff --git a/sj2/source/inc/java_lang_object.hxx b/sj2/source/inc/java_lang_object.hxx
deleted file mode 100644
index c756dc8c0b..0000000000
--- a/sj2/source/inc/java_lang_object.hxx
+++ /dev/null
@@ -1,94 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: java_lang_object.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include <jni.h>
-#ifdef OS2
-#include <typedefs.h>
-#endif
-
-#ifndef _SJ_JAVA_LANG_OBJECT_HXX
-#define _SJ_JAVA_LANG_OBJECT_HXX
-
-#include <tools/string.hxx>
-
-
-#ifdef HAVE_64BIT_POINTERS
-#error "no 64 bit pointer"
-#else
-#ifdef OS2
-#define INT64_TO_PVOID(x) (void *)x.lo
-inline jlong Make_Os2_Int64( INT32 hi, INT32 lo ) {jlong x = CONST64( hi, lo ); return x; }
-#define PVOID_TO_INT64(x) Make_Os2_Int64( 0, (INT32)x )
-#else //OS2
-#define PVOID_TO_INT64(x) (jlong)(INT32)x
-#define INT64_TO_PVOID(x) (void *)x
-#endif //Os2
-#endif
-
-//=====================================================================
-class java_lang_Class;
-class java_lang_Object
-{
- // Zuweisungsoperator und Copy Konstruktor sind verboten
- java_lang_Object& operator = (java_lang_Object&) { return *this;};
- java_lang_Object(java_lang_Object&) {};
-
- static jclass getMyClass();
- // nur zum Zerstoeren des C++ Pointers in vom JSbxObject
- // abgeleiteten Java Objekten
- //static jclass getJSbxObjectClass();
-
-protected:
- // der JAVA Handle zu dieser Klasse
- jobject object;
- // Klassendefinition
-
- // neu in SJ2:
- static jclass theClass; // die Klasse braucht nur einmal angefordert werden !
- static jclass theJSbxObjectClass; // die Klasse braucht nur einmal angefordert werden !
- static ULONG nObjCount; // Zaehler fuer die Anzahl der Instanzen
-
-public:
- // der Konstruktor, der fuer die abgeleiteten Klassen verwendet
- // werden soll.
- java_lang_Object( JNIEnv * pEnv, jobject myObj );
- // der eigentliche Konstruktor
- java_lang_Object();
-
- virtual ~java_lang_Object();
-
- void saveRef( JNIEnv * pEnv, jobject myObj );
- jobject getJavaObject() const { return object; }
- java_lang_Object * GetWrapper() { return this; }
-
- java_lang_Class * getClass();
-
-};
-
-#endif
diff --git a/sj2/source/jscpp/makefile.mk b/sj2/source/jscpp/makefile.mk
deleted file mode 100644
index 9c0e1d8992..0000000000
--- a/sj2/source/jscpp/makefile.mk
+++ /dev/null
@@ -1,56 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.9 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sj2
-TARGET=jscpp
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(GUIBASE)"=="aqua"
-CFLAGSCXX+=$(OBJCXXFLAGS)
-.ENDIF # "$(GUIBASE)"=="aqua"
-
-SLOFILES= \
- $(SLO)$/sjapplet.obj \
- $(SLO)$/sjapplet_impl.obj
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/sj2/source/jscpp/sjapplet.cxx b/sj2/source/jscpp/sjapplet.cxx
deleted file mode 100644
index 0f8173bd56..0000000000
--- a/sj2/source/jscpp/sjapplet.cxx
+++ /dev/null
@@ -1,126 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: sjapplet.cxx,v $
- * $Revision: 1.16 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "sal/config.h"
-
-#include "sjapplet.hxx"
-
-#include "osl/diagnose.h"
-#include "rtl/string.hxx"
-#include "rtl/ustring.hxx"
-
-#include "sjapplet_impl.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-
-SjApplet2::SjApplet2()
- : _pImpl(new SjApplet2_Impl())
-{
-}
-
-SjApplet2::~SjApplet2()
-{
- delete _pImpl;
-}
-
-//=========================================================================
-void SjApplet2::Init(
- com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext > const & context,
- Window * pParentWin, const INetURLObject & rDocBase,
- const SvCommandList & rCmdList)
-{
- try {
- if(_pImpl)
- _pImpl->init(pParentWin, context, rDocBase, rCmdList);
- }
- catch(RuntimeException & runtimeException) {
-#if OSL_DEBUG_LEVEL > 1
- OString message = OUStringToOString(runtimeException.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_TRACE("sjapplet.cxx: SjApplet2::Init - exception occurred: %s\n", message.getStr());
-#else
- (void) runtimeException; // avoid warning
-#endif
-
- delete _pImpl;
- _pImpl = 0;
- }
-}
-
-//=========================================================================
-void SjApplet2::setSizePixel( const Size & rSize )
-{
- if(_pImpl)
- _pImpl->setSize(rSize);
-}
-
-void SjApplet2::appletRestart()
-{
- if(_pImpl)
- _pImpl->restart();
-}
-
-void SjApplet2::appletReload()
-{
- if(_pImpl)
- _pImpl->reload();
-}
-
-void SjApplet2::appletStart()
-{
- if(_pImpl)
- _pImpl->start();
-}
-
-void SjApplet2::appletStop()
-{
- if(_pImpl)
- _pImpl->stop();
-}
-
-void SjApplet2::appletClose()
-{
- if(_pImpl)
- _pImpl->close();
-}
-
-// Fuer SO3, Wrapper fuer Applet liefern
-SjJScriptAppletObject * SjApplet2::GetJScriptApplet()
-{
- OSL_TRACE("SjApplet2::GetJScriptApplet\n");
-
- return NULL;
-}
-
-// Settings are detected by the JavaVM service
-// This function is not necessary anymore
-void SjApplet2::settingsChanged(void)
-{}
diff --git a/sj2/source/jscpp/sjapplet_impl.cxx b/sj2/source/jscpp/sjapplet_impl.cxx
deleted file mode 100644
index 31a419e154..0000000000
--- a/sj2/source/jscpp/sjapplet_impl.cxx
+++ /dev/null
@@ -1,617 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: sjapplet_impl.cxx,v $
- * $Revision: 1.32 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "sjapplet_impl.hxx"
-
-#ifdef WNT
-#include <tools/prewin.h>
-#include <windows.h>
-#include <tools/postwin.h>
-#elif (defined QUARTZ)
-#include "premac.h"
-#include <Cocoa/Cocoa.h>
-#include "postmac.h"
-#elif (defined UNX)
-#include <tools/prex.h>
-#include "X11/Xlib.h"
-#include <tools/postx.h>
-#endif
-
-#include "rtl/ustring.hxx"
-#include <rtl/process.h>
-#include <osl/mutex.hxx>
-
-#include <tools/urlobj.hxx>
-#include <tools/debug.hxx>
-
-#include <svtools/ownlist.hxx>
-
-#include <vcl/svapp.hxx>
-#include <vcl/window.hxx>
-#include <vcl/wrkwin.hxx>
-#include <vcl/syschild.hxx>
-#include <vcl/sysdata.hxx>
-#include <com/sun/star/java/XJavaVM.hpp>
-#include "com/sun/star/lang/XMultiComponentFactory.hpp"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "jvmaccess/classpath.hxx"
-
-using namespace ::rtl;
-using namespace ::osl;
-#ifdef SOLAR_JAVA
-using namespace ::com::sun::star::java;
-#endif // SOLAR_JAVA
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-namespace css = ::com::sun::star;
-#ifdef SOLAR_JAVA
-
-static void testJavaException(JNIEnv * pEnv) throw(com::sun::star::uno::RuntimeException)
-{
- jthrowable jtThrowable = pEnv->ExceptionOccurred();
- if(jtThrowable) { // is it a java exception ?
-#if OSL_DEBUG_LEVEL > 1
- pEnv->ExceptionDescribe();
-#endif
- pEnv->ExceptionClear();
-
- jclass jcThrowable = pEnv->FindClass("java/lang/Throwable");
- jmethodID jmThrowable_getMessage = pEnv->GetMethodID(jcThrowable, "getMessage", "()Ljava/lang/String;");
-
- jstring jsMessage = (jstring)pEnv->CallObjectMethod(jtThrowable, jmThrowable_getMessage);
-
- rtl::OUString ouMessage;
- if(jsMessage) {
- const jchar * jcMessage = pEnv->GetStringChars(jsMessage, NULL);
- ouMessage = rtl::OUString(jcMessage);
- pEnv->ReleaseStringChars(jsMessage, jcMessage);
- }
-
- throw css::uno::RuntimeException(ouMessage, css::uno::Reference<XInterface>());
- }
-}
-#else // !SOLAR_JAVA
-static void throwException() throw(com::sun::star::uno::RuntimeException)
-{
- throw css::uno::RuntimeException(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Java applets not supported.")), css::uno::Reference<XInterface>());
-}
-#endif
-
-#ifdef SOLAR_JAVA
-#if defined (UNX) && !defined(QUARTZ)
-struct EmbeddedWindow {
- jobject _joWindow;
-
- EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException);
- void dispose(JNIEnv * pEnv);
-};
-
-EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData)
- throw(com::sun::star::uno::RuntimeException) : _joWindow(0)
-{
- // ensure that all operations for the window contained in pEnvData
- // have been processed by the Xserver since java will access that
- // window by a separate connection to the Xserver
- XSync( (Display*)pEnvData->pDisplay, False);
- try
- { //java < 1.5
- jclass jcToolkit = pEnv->FindClass("java/awt/Toolkit"); testJavaException(pEnv);
- jmethodID jmToolkit_getDefaultToolkit = pEnv->GetStaticMethodID(
- jcToolkit, "getDefaultToolkit", "()Ljava/awt/Toolkit;" ); testJavaException(pEnv);
- pEnv->CallStaticObjectMethod(jcToolkit, jmToolkit_getDefaultToolkit); testJavaException(pEnv);
-
- jclass jcMotifAppletViewer = pEnv->FindClass(
- "sun/plugin/navig/motif/MotifAppletViewer");
- if(pEnv->ExceptionOccurred())
- {
- pEnv->ExceptionClear();
- jcMotifAppletViewer = pEnv->FindClass(
- "sun/plugin/viewer/MNetscapePluginContext"); testJavaException(pEnv);
- }
-
- jclass jcClassLoader = pEnv->FindClass("java/lang/ClassLoader"); testJavaException(pEnv);
- jmethodID jmClassLoader_loadLibrary = pEnv->GetStaticMethodID(
- jcClassLoader, "loadLibrary",
- "(Ljava/lang/Class;Ljava/lang/String;Z)V" ); testJavaException(pEnv);
- jstring jsplugin = pEnv->NewStringUTF("javaplugin_jni"); testJavaException(pEnv);
- pEnv->CallStaticVoidMethod(jcClassLoader, jmClassLoader_loadLibrary,
- jcMotifAppletViewer, jsplugin, JNI_FALSE); testJavaException(pEnv);
-
- jmethodID jmMotifAppletViewer_getWidget = pEnv->GetStaticMethodID(
- jcMotifAppletViewer, "getWidget", "(IIIII)I" ); testJavaException(pEnv);
- jint ji_widget = pEnv->CallStaticIntMethod(jcMotifAppletViewer,
- jmMotifAppletViewer_getWidget, pEnvData->aWindow,
- 0, 0, 1, 1); testJavaException(pEnv);
- jclass jcFrame = pEnv->FindClass("sun/awt/motif/MEmbeddedFrame"); testJavaException(pEnv);
- jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(J)V" ); testJavaException(pEnv);
- jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
- pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jlong)ji_widget); testJavaException(pEnv);
- _joWindow = pEnv->NewGlobalRef(joFrame);
- }
- catch (RuntimeException & )
- {
- }
-
- if (_joWindow)
- return;
- //try Java > 1.5
-#ifdef SOLARIS
- jclass jcFrame = pEnv->FindClass("sun/awt/motif/MEmbeddedFrame"); testJavaException(pEnv);
- jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
- jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(JZ)V" ); testJavaException(pEnv);
- pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jlong) pEnvData->aWindow, JNI_FALSE); testJavaException(pEnv);
- _joWindow = pEnv->NewGlobalRef(joFrame);
-#elif LINUX
- jclass jcFrame = pEnv->FindClass("sun/awt/X11/XEmbeddedFrame"); testJavaException(pEnv);
- jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
- jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(J)V" ); testJavaException(pEnv);
-
- pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jlong) pEnvData->aWindow); testJavaException(pEnv);
- _joWindow = pEnv->NewGlobalRef(joFrame);
-#endif
-}
-
-#else // UNX && !QUARTZ
-
-struct EmbeddedWindow {
-jobject _joWindow;
-
-EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException);
-void dispose(JNIEnv * pEnv);
-};
-
-
-#ifdef WNT
-EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException)
-{
-jclass jcFrame = pEnv->FindClass("sun/awt/windows/WEmbeddedFrame"); testJavaException(pEnv);
-jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(I)V"); testJavaException(pEnv);
-
-jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
-pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jint)pEnvData->hWnd); testJavaException(pEnv);
-
-_joWindow = pEnv->NewGlobalRef(joFrame);
-}
-
-#elif defined QUARTZ
-EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException)
-{
- /* The WNT code (above) that this code derives from, may be using quite old
- ways of interacting with native windows. More modern approaches seems to
- point towards JAWT_* and com.apple.eawt */
-#if 0
-// FIXME: this is not going to work on cocoa
-jclass jcFrame = pEnv->FindClass("apple/awt/CEmbeddedFrame"); testJavaException(pEnv);
-jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "(I)V"); testJavaException(pEnv);
-
-jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
-pEnv->CallVoidMethod(joFrame, jmFrame_rinit, (jint)pEnvData->pView); testJavaException(pEnv);
-
-_joWindow = pEnv->NewGlobalRef(joFrame);
-#endif
-}
-
-#else
-
-EmbeddedWindow::EmbeddedWindow(JNIEnv * pEnv, SystemEnvData const * pEnvData) throw(com::sun::star::uno::RuntimeException)
-{
-jclass jcFrame = pEnv->FindClass("java/awt/Frame"); testJavaException(pEnv);
-jmethodID jmFrame_rinit = pEnv->GetMethodID(jcFrame, "<init>", "()V"); testJavaException(pEnv);
-jobject joFrame = pEnv->AllocObject(jcFrame); testJavaException(pEnv);
-pEnv->CallVoidMethod(joFrame, jmFrame_rinit); testJavaException(pEnv);
-
-_joWindow = pEnv->NewGlobalRef(joFrame);
-}
-
-#endif
-
-#endif // UNX && !QUARTZ
-
-void EmbeddedWindow::dispose(JNIEnv * pEnv)
-{
-jclass jcWindow = pEnv->FindClass("java/awt/Window"); testJavaException(pEnv);
-jmethodID jmWindow_dispose = pEnv->GetMethodID(jcWindow, "dispose", "()V" ); testJavaException(pEnv);
-
-pEnv->CallVoidMethod(_joWindow, jmWindow_dispose); testJavaException(pEnv);
-pEnv->DeleteGlobalRef(_joWindow);
-
-_joWindow = 0;
-}
-#endif // SOLAR_JAVA
-
-
-#ifdef SOLAR_JAVA
-SjApplet2_Impl::SjApplet2_Impl() throw(com::sun::star::uno::RuntimeException)
- :
- _joAppletExecutionContext(0),
- _jcAppletExecutionContext(0)
-
-{}
-#else // !SOLAR_JAVA
-SjApplet2_Impl::SjApplet2_Impl() throw(com::sun::star::uno::RuntimeException)
-{}
-#endif
-
-
-SjApplet2_Impl::~SjApplet2_Impl() throw()
-{
-#ifdef SOLAR_JAVA
- if (_joAppletExecutionContext)
- {
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
- _pEmbeddedWindow->dispose(pEnv);
- delete _pEmbeddedWindow;
-
- pEnv->DeleteGlobalRef(_joAppletExecutionContext);
- pEnv->DeleteGlobalRef(_jcAppletExecutionContext);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- }
- }
-#endif
-}
-
-void SjApplet2_Impl::init(
- Window * pParentWin,
- css::uno::Reference< css::uno::XComponentContext > const & context,
- const INetURLObject & rDocBase, const SvCommandList & rCmdList)
- throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- _pParentWin = pParentWin;
-
-
- // Java URL erzeugen
- rtl::OUString url = rDocBase.GetMainURL(INetURLObject::DECODE_TO_IURI);
-
- if(!url.getLength())
- url = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("file:///"));
-
- 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) {
- rtl::OUString tmp = url.copy(0, 9);
- tmp += String(INET_DELIM_TOKEN);
- tmp += url.copy(10);
-
- url = tmp;
- }
- }
-
-
-#if OSL_DEBUG_LEVEL > 1
- rtl::OString tmp = rtl::OUStringToOString(url, RTL_TEXTENCODING_ASCII_US);
- OSL_TRACE("SjApplet2_Impl::init - mainUrl: %s\n", tmp.getStr());
-#endif
-
- css::uno::Reference<XJavaVM> _xJavaVM = css::uno::Reference<XJavaVM>(
- (css::uno::Reference< css::lang::XMultiComponentFactory >(
- context->getServiceManager(), css::uno::UNO_QUERY_THROW)->
- createInstanceWithContext(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.java.JavaVirtualMachine")),
- context)),
- UNO_QUERY);
- Sequence<sal_Int8> processID(17);
- rtl_getGlobalProcessId((sal_uInt8 *)processID.getArray());
- processID[16] = 0;
-
- OSL_ENSURE(sizeof (sal_Int64)
- >= sizeof (jvmaccess::VirtualMachine *),
- "Pointer cannot be represented as sal_Int64");
- sal_Int64 nPointer = reinterpret_cast< sal_Int64 >(
- static_cast< jvmaccess::VirtualMachine * >(0));
- _xJavaVM->getJavaVM(processID) >>= nPointer;
- _virtualMachine = reinterpret_cast< jvmaccess::VirtualMachine * >(nPointer);
- if (!_virtualMachine.is())
- return;
-
- try
- {
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
-
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
-
- _jcAppletExecutionContext = jvmaccess::ClassPath::loadClass(
- context, pEnv,
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "vnd.sun.star.expand:$ORIGIN/classes/classes.jar")),
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "stardiv.applet.AppletExecutionContext")));
- testJavaException(pEnv);
- _jcAppletExecutionContext = (jclass) pEnv->NewGlobalRef(_jcAppletExecutionContext ); testJavaException(pEnv);
-
- jclass jcURL = pEnv->FindClass("java/net/URL"); testJavaException(pEnv);
- jmethodID jmURL_rinit = pEnv->GetMethodID(jcURL, "<init>", "(Ljava/lang/String;)V"); testJavaException(pEnv);
- jobject joDocBase = pEnv->AllocObject(jcURL); testJavaException(pEnv);
- jstring jsURL = pEnv->NewString(url.getStr(), url.getLength()); testJavaException(pEnv);
- pEnv->CallVoidMethod(joDocBase, jmURL_rinit, jsURL); testJavaException(pEnv);
-
- jclass jcHashtable = pEnv->FindClass("java/util/Hashtable"); testJavaException(pEnv);
- jmethodID jmHashtable_rinit = pEnv->GetMethodID(jcHashtable, "<init>", "()V"); testJavaException(pEnv);
- jmethodID jmHashtable_put = pEnv->GetMethodID(jcHashtable, "put",
- "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); testJavaException(pEnv);
- jobject joParameters = pEnv->AllocObject(jcHashtable); testJavaException(pEnv);
- pEnv->CallVoidMethod(joParameters, jmHashtable_rinit); testJavaException(pEnv);
-
- for(sal_uInt32 i = 0; i < rCmdList.Count(); ++i) {
- const SvCommand & rCmd = rCmdList[i];
- String aCmd = rCmd.GetCommand();
- String aLoweredCmd = aCmd.ToLowerAscii();
-
-#if OSL_DEBUG_LEVEL > 1
- rtl::OUString command = aCmd;
- rtl::OUString value = rCmd.GetArgument();
- rtl::OString cmd_tmp = rtl::OUStringToOString(command, RTL_TEXTENCODING_ASCII_US);
- rtl::OString value_tmp = rtl::OUStringToOString(value, RTL_TEXTENCODING_ASCII_US);
- OSL_TRACE("command: %s=%s", cmd_tmp.getStr(), value_tmp.getStr());
-#endif
- jstring jsCommand = pEnv->NewString(aLoweredCmd.GetBuffer(), aLoweredCmd.Len()); testJavaException(pEnv);
- jstring jsArg = pEnv->NewString(rCmd.GetArgument().GetBuffer(), rCmd.GetArgument().Len()); testJavaException(pEnv);
- pEnv->CallObjectMethod(joParameters, jmHashtable_put, jsCommand, jsArg); testJavaException(pEnv);
- }
-
- SystemEnvData const * pEnvData = ((SystemChildWindow *)pParentWin)->GetSystemData();
- _pEmbeddedWindow = new EmbeddedWindow(pEnv, pEnvData);
-
- jmethodID jmAppletExecutionContext_rinit = pEnv->GetMethodID(_jcAppletExecutionContext, "<init>",
- "(Ljava/net/URL;Ljava/util/Hashtable;Ljava/awt/Container;J)V"); testJavaException(pEnv);
- jmethodID jmAppletExecutionContext_init = pEnv->GetMethodID(_jcAppletExecutionContext, "init", "()V"); testJavaException(pEnv);
- jmethodID jmAppletExecutionContext_startUp = pEnv->GetMethodID(_jcAppletExecutionContext, "startUp", "()V"); testJavaException(pEnv);
-
- _joAppletExecutionContext = pEnv->AllocObject(_jcAppletExecutionContext); testJavaException(pEnv);
- _joAppletExecutionContext = pEnv->NewGlobalRef(_joAppletExecutionContext); testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_rinit,
- joDocBase, joParameters, _pEmbeddedWindow->_joWindow, (jlong)0); testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_init); testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_startUp); testJavaException(pEnv);
-
- }
- catch(jvmaccess::VirtualMachine::AttachGuard::CreationException & )
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "sjapplet_impl.cxx: Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::setSize(const Size & rSize) throw(com::sun::star::uno::RuntimeException)
-{
-
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
-
- _pParentWin->SetSizePixel(rSize);
-
- jmethodID jmAppletExecutionContext_resize = pEnv->GetMethodID(
- _jcAppletExecutionContext, "appletResize", "(II)V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext,
- jmAppletExecutionContext_resize, (jint)rSize.Width(),
- (jint)rSize.Height());
- testJavaException(pEnv);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::setSize, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::restart() throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
- jmethodID jmAppletExecutionContext_restart = pEnv->GetMethodID(
- _jcAppletExecutionContext, "restart", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_restart);
- testJavaException(pEnv);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::restart, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::reload() throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
- jmethodID jmAppletExecutionContext_reload = pEnv->GetMethodID(
- _jcAppletExecutionContext, "reload", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_reload);
- testJavaException(pEnv);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::reload, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::start() throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
- jmethodID jmAppletExecutionContext_sendStart = pEnv->GetMethodID(
- _jcAppletExecutionContext, "sendStart", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_sendStart);
- testJavaException(pEnv);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::restart, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::stop() throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
- jmethodID jmAppletExecutionContext_sendStop = pEnv->GetMethodID(
- _jcAppletExecutionContext, "sendStop", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_sendStop);
- testJavaException(pEnv);
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::restart, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
-void SjApplet2_Impl::close() throw(com::sun::star::uno::RuntimeException)
-{
-#ifdef SOLAR_JAVA
- try
- {
- if ( ! _virtualMachine.is())
- return;
- jvmaccess::VirtualMachine::AttachGuard vmAttachGuard(_virtualMachine);
- JNIEnv * pEnv = vmAttachGuard.getEnvironment();
-
- jmethodID jmAppletExecutionContext_shutdown = pEnv->GetMethodID(
- _jcAppletExecutionContext, "shutdown", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_shutdown);
- testJavaException(pEnv);
-
- jmethodID jmWaitForDispose= pEnv->GetMethodID(
- _jcAppletExecutionContext,"waitForDispose","()V");
- testJavaException(pEnv);
- //blocks until the applet has destroyed itself and the container was disposed
- //(stardiv.applet.AppletExecutionContext.dispose)
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmWaitForDispose);
-
- // now that the applet is disposed, we dispose the AppletExecutionContext, that will end the thread
- // which dispatches the applet methods, such as init, start, stop , destroy.
- jmethodID jmAppletExecutionContext_dispose= pEnv->GetMethodID(
- _jcAppletExecutionContext,"dispose", "()V");
- testJavaException(pEnv);
- pEnv->CallVoidMethod(_joAppletExecutionContext, jmAppletExecutionContext_dispose);
- testJavaException(pEnv);
-
- if( _pParentWin )
- {
- WorkWindow* pAppWin = Application::GetAppWindow();
- if(pAppWin)
- {
- while(_pParentWin->GetChildCount())
- {
- Window* pChild = _pParentWin->GetChild(0);
- pChild->Show( FALSE );
- pChild->SetParent( pAppWin );
- }
- }
- }
- }
- catch (jvmaccess::VirtualMachine::AttachGuard::CreationException &)
- {
- throw RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "SjApplet2_Impl::close, Could not create jvmaccess::"
- "VirtualMachine::AttachGuard!")), 0);
- }
-#else // !SOLAR_JAVA
- throwException();
-#endif
-}
-
diff --git a/sj2/source/jscpp/sjapplet_impl.hxx b/sj2/source/jscpp/sjapplet_impl.hxx
deleted file mode 100644
index c8d83b0832..0000000000
--- a/sj2/source/jscpp/sjapplet_impl.hxx
+++ /dev/null
@@ -1,56 +0,0 @@
-#include <cstdarg>
-
-#ifdef SOLAR_JAVA
-#include <jni.h>
-#endif // SOLAR_JAVA
-
-#ifdef SOLAR_JAVA
-#include <com/sun/star/java/XJavaVM.hpp>
-#include <com/sun/star/java/XJavaThreadRegister_11.hpp>
-#else
-#include <com/sun/star/uno/RuntimeException.hpp>
-#endif // SOLAR_JAVA
-
-#include "rtl/ref.hxx"
-#include "com/sun/star/uno/Reference.hxx"
-#include "jvmaccess/virtualmachine.hxx"
-
-class Window;
-class INetURLObject;
-class SvCommandList;
-class Size;
-namespace com { namespace sun { namespace star { namespace uno {
- class XComponentContext;
-} } } }
-
-#ifdef SOLAR_JAVA
-struct EmbeddedWindow;
-#endif // SOLAR_JAVA
-
-struct SjApplet2_Impl {
-#ifdef SOLAR_JAVA
- Window * _pParentWin;
-
- rtl::Reference<jvmaccess::VirtualMachine> _virtualMachine;
-
- jobject _joAppletExecutionContext;
- jclass _jcAppletExecutionContext;
-
- EmbeddedWindow * _pEmbeddedWindow;
-#endif // SOLAR_JAVA
- SjApplet2_Impl() throw(com::sun::star::uno::RuntimeException);
- ~SjApplet2_Impl() throw();
-
- void init(Window * pParentWin,
- com::sun::star::uno::Reference<
- com::sun::star::uno::XComponentContext > const & context,
- const INetURLObject & rDocBase,
- const SvCommandList & rCmdList) throw(com::sun::star::uno::RuntimeException);
-
- void setSize(const Size & rSize) throw(com::sun::star::uno::RuntimeException);
- void restart() throw(com::sun::star::uno::RuntimeException);
- void reload() throw(com::sun::star::uno::RuntimeException);
- void start() throw(com::sun::star::uno::RuntimeException);
- void stop() throw(com::sun::star::uno::RuntimeException);
- void close() throw(com::sun::star::uno::RuntimeException);
-};
diff --git a/sj2/stardiv/app/AppletMessageHandler.java b/sj2/stardiv/app/AppletMessageHandler.java
deleted file mode 100644
index 742d41d91a..0000000000
--- a/sj2/stardiv/app/AppletMessageHandler.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AppletMessageHandler.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package stardiv.app;
-
-import java.util.ResourceBundle;
-import java.util.MissingResourceException;
-import java.text.MessageFormat;
-
-/**
- * An hanlder of localized messages.
- *
- * @version 1.8, 03/03/97
- * @author Koji Uno
- */
-public class AppletMessageHandler {
- private static ResourceBundle rb;
- private String baseKey = null;
-
- static {
- try {
- rb = ResourceBundle.getBundle("stardiv.app.MsgAppletViewer");
- } catch (MissingResourceException e) {
- System.out.println(e.getMessage());
- }
- };
-
- public AppletMessageHandler(String baseKey) {
- this.baseKey = baseKey;
- }
-
- public String getMessage(String key) {
- return (String)rb.getString(getQualifiedKey(key));
- }
-
- public String getMessage(String key, Object arg){
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
- MessageFormat msgfmt = new MessageFormat(basemsgfmt);
- Object msgobj[] = new Object[1];
- if (arg == null) {
- arg = "null"; // mimic java.io.PrintStream.print(String)
- }
- msgobj[0] = arg;
- return msgfmt.format(msgobj);
- }
-
- public String getMessage(String key, Object arg1, Object arg2) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
- MessageFormat msgfmt = new MessageFormat(basemsgfmt);
- Object msgobj[] = new Object[2];
- if (arg1 == null) {
- arg1 = "null";
- }
- if (arg2 == null) {
- arg2 = "null";
- }
- msgobj[0] = arg1;
- msgobj[1] = arg2;
- return msgfmt.format(msgobj);
- }
-
- public String getMessage(String key, Object arg1, Object arg2, Object arg3) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
- MessageFormat msgfmt = new MessageFormat(basemsgfmt);
- Object msgobj[] = new Object[3];
- if (arg1 == null) {
- arg1 = "null";
- }
- if (arg2 == null) {
- arg2 = "null";
- }
- if (arg3 == null) {
- arg3 = "null";
- }
- msgobj[0] = arg1;
- msgobj[1] = arg2;
- msgobj[2] = arg3;
- return msgfmt.format(msgobj);
- }
-
- public String getMessage(String key, Object arg[]) {
- String basemsgfmt = (String)rb.getString(getQualifiedKey(key));
- MessageFormat msgfmt = new MessageFormat(basemsgfmt);
- return msgfmt.format(arg);
- }
-
- public String getQualifiedKey(String subKey) {
- return baseKey + "." + subKey;
- }
-}
diff --git a/sj2/stardiv/app/AppletProps.java b/sj2/stardiv/app/AppletProps.java
deleted file mode 100644
index 01d879648b..0000000000
--- a/sj2/stardiv/app/AppletProps.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AppletProps.java,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package stardiv.app;
-
-import stardiv.app.AppletMessageHandler;
-import stardiv.applet.AppletExecutionContext;
-
-import java.awt.*;
-import java.io.*;
-import java.util.Properties;
-import sun.net.www.http.HttpClient;
-import sun.net.ftp.FtpClient;
-
-public class AppletProps extends Frame {
- TextField proxyHost;
- TextField proxyPort;
- Choice networkMode;
- Choice accessMode;
- Choice unsignedMode;
-
- AppletExecutionContext appletExecutionContext;
-
- AppletProps(AppletExecutionContext appletExecutionContext) {
- this.appletExecutionContext = appletExecutionContext;
-
- setTitle(amh.getMessage("title"));
- Panel p = new Panel();
- p.setLayout(new GridLayout(0, 2));
-
- p.add(new Label(amh.getMessage("label.http.server", "Http proxy server:")));
- p.add(proxyHost = new TextField());
-
- p.add(new Label(amh.getMessage("label.http.proxy")));
- p.add(proxyPort = new TextField());
-
- p.add(new Label(amh.getMessage("label.network")));
- p.add(networkMode = new Choice());
- networkMode.addItem(amh.getMessage("choice.network.item.none"));
- networkMode.addItem(amh.getMessage("choice.network.item.applethost"));
- networkMode.addItem(amh.getMessage("choice.network.item.unrestricted"));
-
- String securityMode = System.getProperty("appletviewer.security.mode");
- securityMode = (securityMode == null) ? "none" : securityMode;
- securityMode = securityMode.equals("host") ? "applethost" : securityMode;
- networkMode.select(amh.getMessage("choice.network.item." + securityMode));
-
- p.add(new Label(amh.getMessage("label.class")));
- p.add(accessMode = new Choice());
- accessMode.addItem(amh.getMessage("choice.class.item.restricted"));
- accessMode.addItem(amh.getMessage("choice.class.item.unrestricted"));
-
- accessMode.select(Boolean.getBoolean("package.restrict.access.sun")
- ? amh.getMessage("choice.class.item.restricted")
- : amh.getMessage("choice.class.item.unrestricted"));
-
- p.add(new Label(amh.getMessage("label.unsignedapplet")));
- p.add(unsignedMode = new Choice());
- unsignedMode.addItem(amh.getMessage("choice.unsignedapplet.no"));
- unsignedMode.addItem(amh.getMessage("choice.unsignedapplet.yes"));
-
- add("Center", p);
- p = new Panel();
- p.add(new Button(amh.getMessage("button.apply")));
- p.add(new Button(amh.getMessage("button.reset")));
- p.add(new Button(amh.getMessage("button.cancel")));
- add("South", p);
- setLocation(200, 150);
- pack();
- reset();
- }
-
- void reset() {
- // if (Boolean.getBoolean("package.restrict.access.sun")) {
- // accessMode.select(amh.getMessage("choice.class.item.restricted"));
- // } else {
- // accessMode.select(amh.getMessage("choice.class.item.unrestricted"));
- // }
-
- if (System.getProperty("http.proxyHost") != null) {
- proxyHost.setText(System.getProperty("http.proxyHost"));
- proxyPort.setText(System.getProperty("http.proxyPort"));
- // HttpClient.proxyPort = Integer.valueOf(System.getProperty("http.proxyPort")).intValue();
- }
- else {
- proxyHost.setText("");
- proxyPort.setText("");
- }
-
- // if (Boolean.getBoolean("appletviewer.security.allowUnsigned")) {
- // unsignedMode.select(amh.getMessage("choice.unsignedapplet.yes"));
- // } else {
- // unsignedMode.select(amh.getMessage("choice.unsignedapplet.no"));
- // }
- }
-
- void apply() {
- // Get properties, set version
- Properties props = System.getProperties();
- if (proxyHost.getText().length() > 0) {
- props.put("http.proxyHost", proxyHost.getText().trim());
- props.put("http.proxyPort", proxyPort.getText().trim());
- } else {
- props.remove("http.proxyHost");
- }
- if ("None".equals(networkMode.getSelectedItem())) {
- props.put("appletviewer.security.mode", "none");
- } else if ("Unrestricted".equals(networkMode.getSelectedItem())) {
- props.put("appletviewer.security.mode", "unrestricted");
- } else {
- props.put("appletviewer.security.mode", "host");
- }
-
- if ("Restricted".equals(accessMode.getSelectedItem())) {
- props.put("package.restrict.access.sun", "true");
- props.put("package.restrict.access.netscape", "true");
- props.put("package.restrict.access.stardiv", "true");
- } else {
- props.put("package.restrict.access.sun", "false");
- props.put("package.restrict.access.netscape", "false");
- props.put("package.restrict.access.stardiv", "false");
- }
-
- if ("Yes".equals(unsignedMode.getSelectedItem())) {
- props.put("appletviewer.security.allowUnsigned", "true");
- } else {
- props.put("appletviewer.security.allowUnsigned", "false");
- }
-
- // Save properties
- try {
- reset();
-
- FileOutputStream out = new FileOutputStream(AppletViewer.theUserPropertiesFile);
- props.save(out, "AppletViewer");
- out.close();
- setVisible( false );
- } catch (IOException e) {
- System.out.println(amh.getMessage("apply.exception", e));
- e.printStackTrace();
- reset();
- }
- }
-
- public boolean action(Event evt, Object obj) {
- if (amh.getMessage("button.apply").equals(obj)) {
- apply();
- return true;
- }
- if (amh.getMessage("button.reset").equals(obj)) {
- reset();
- return true;
- }
- if (amh.getMessage("button.cancel").equals(obj)) {
- setVisible( false );
- return true;
- }
- return false;
- }
-
- private static AppletMessageHandler amh = new AppletMessageHandler("appletprops");
-
-}
diff --git a/sj2/stardiv/app/AppletViewer.java b/sj2/stardiv/app/AppletViewer.java
deleted file mode 100644
index 47e7eef92e..0000000000
--- a/sj2/stardiv/app/AppletViewer.java
+++ /dev/null
@@ -1,995 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AppletViewer.java,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.app;
-
-import java.awt.Toolkit;
-
-import java.net.InetAddress;
-
-//import stardiv.applet.AppletMessageHandler;
-import stardiv.applet.AppletExecutionContext;
-import stardiv.applet.DocumentProxy;
-
-//import stardiv.js.ip.RootTaskManager;
-//import stardiv.js.ip.BaseObj;
-//import stardiv.js.ide.Ide;
-//import stardiv.js.ne.RunTime;
-//import stardiv.js.base.IdentifierPool;
-//import stardiv.js.base.Identifier;
-//import stardiv.memory.AtomUnion;
-//import stardiv.js.ip.Ctor;
-import stardiv.controller.SjSettings;
-
-import java.util.*;
-import java.io.*;
-import java.awt.*;
-import java.awt.event.*;
-import java.applet.*;
-import java.net.URL;
-import java.net.MalformedURLException;
-
-
-/**
- * A frame to show the applet tag in.
- */
-class TextFrame extends Frame {
- /**
- * Create the tag frame.
- */
- TextFrame(int x, int y, String title, String text) {
- setTitle(title);
- TextArea txt = new TextArea(20, 60);
- txt.setText(text);
- txt.setEditable(false);
-
- add("Center", txt);
-
- Panel p = new Panel();
- add("South", p);
- Button b = new Button(amh.getMessage("button.dismiss", "Dismiss"));
- p.add(b);
-
- class ActionEventListener implements ActionListener {
- public void actionPerformed(ActionEvent evt) {
- dispose();
- }
- }
- b.addActionListener(new ActionEventListener());
-
- pack();
- setLocation(x, y);
- setVisible(true);
-
- WindowListener windowEventListener = new WindowAdapter() {
-
- public void windowClosing(WindowEvent evt) {
- dispose();
- }
- };
-
- addWindowListener(windowEventListener);
- }
- private static AppletMessageHandler amh = new AppletMessageHandler("textframe");
-
-}
-
-/**
- * The toplevel applet viewer.
- */
-public class AppletViewer extends Frame implements Observer {
- com.sun.star.lib.sandbox.ResourceViewer resourceViewer;
-
- /**
- * Some constants...
- */
- private static String defaultSaveFile = "Applet.ser";
-
- /**
- * Look here for the properties file
- */
- public static File theUserPropertiesFile;
- public static File theAppletViewerPropsFile;
-
- //private Ide aIde;
- //private RootTaskManager aRTM;
- //private BaseObj aRootObj;
-
- private AppletExecutionContext appletExecutionContext = null;
- Hashtable atts = null;
-
- static DocumentProxy documentViewer = null;
-
- /**
- * The status line.
- */
- Label label;
-
- /**
- * output status messages to this stream
- */
-
- PrintStream statusMsgStream;
-
- static Vector contexts = new Vector();
-
- private final class UserActionListener implements ActionListener {
- public void actionPerformed(ActionEvent evt) {
- processUserAction(evt);
- }
- }
-
- static {
- String sep = File.separator;
-
- File userHome = new File(System.getProperty("user.home"));
-
- File AVHome = new File(userHome, ".hotjava");
- // ensure the props folder can be made
- AVHome.mkdirs();
-
- theUserPropertiesFile = new File(AVHome, "properties");
- File JH = new File(System.getProperty("java.home"));
- theAppletViewerPropsFile = new File(JH, "lib" + sep + "appletviewer.properties");
- };
-
- /**
- * Create the applet viewer
- */
- public AppletViewer(int x, int y, URL doc, Hashtable atts, PrintStream statusMsgStream) {
-// resourceViewer = new stardiv.util.ResourceViewer();
-// resourceViewer.show();
- //sun.awt.ScreenUpdater does not exist in Java 1.4
-// System.err.println("#*#*#*:" + sun.awt.ScreenUpdater.updater);
- this.statusMsgStream = statusMsgStream;
- this.atts = atts;
-
- setTitle(amh.getMessage("tool.title", atts.get("code")));
-
- MenuBar mb = new MenuBar();
-
- Menu m = new Menu(amh.getMessage("menu.applet"));
-
- addMenuItem(m, "menuitem.restart");
- addMenuItem(m, "menuitem.reload");
- addMenuItem(m, "menuitem.stop");
- addMenuItem(m, "menuitem.save");
- addMenuItem(m, "menuitem.start");
- addMenuItem(m, "menuitem.clone");
- m.add(new MenuItem("-"));
- addMenuItem(m, "menuitem.tag");
- addMenuItem(m, "menuitem.info");
- addMenuItem(m, "menuitem.edit").setEnabled( false );
- addMenuItem(m, "menuitem.encoding");
- m.add(new MenuItem("-"));
- addMenuItem(m, "menuitem.print");
- m.add(new MenuItem("-"));
- addMenuItem(m, "menuitem.props");
- m.add(new MenuItem("-"));
- addMenuItem(m, "menuitem.close");
- // if (factory.isStandalone()) {
- addMenuItem(m, "menuitem.quit");
- // }
-
- mb.add(m);
-
- setMenuBar(mb);
-
- addWindowListener(new WindowAdapter() {
- public void windowClosing(WindowEvent evt) {
- appletExecutionContext.shutdown();
- }
-
- public void windowIconified(WindowEvent evt) {
- appletExecutionContext.sendLoad();
- }
-
- public void windowDeiconified(WindowEvent evt) {
- appletExecutionContext.sendStart();
- }
- });
-
- add("South", label = new Label(amh.getMessage("label.hello")));
-
- appletExecutionContext = new AppletExecutionContext(doc, atts, this, 0);
- appletExecutionContext.init();
-
- appletExecutionContext.addObserver(this);
- contexts.addElement(appletExecutionContext);
-
- pack();
- setVisible(true);
-
-// appletExecutionContext.send();
- appletExecutionContext.startUp();
-
-/*
- if( atts.get( "mayscript" ) != null ) {
- aIde = new Ide();
- aRTM = aIde.getActRootTaskManager();
- aRootObj = new BaseObj( aRTM );
- //Ctor aCtor = new AppletCtor( aRTM, "Window" );
- //aRootObj.initProperties( aCtor, aCtor.getStaticPropCount(), aCtor.getBasePropCount() );
- //aRootObj.setCtor( aCtor );
- aRTM.setRootObj( aRootObj );
- RunTime aRT = new RunTime( aRootObj, aRTM );
- aIde.setRootObj( aRootObj );
-
- AtomUnion aAU = new AtomUnion();
- BaseObj aDocument = new BaseObj( aRTM );
- aAU.setObject( aDocument );
- Identifier aId = IdentifierPool.aGlobalPool.addIdentifier( "RootObject" );
- aRootObj.newProperty( aId, aAU );
- IdentifierPool.aGlobalPool.releaseIdentifier( aId );
-
- String pName = (String)atts.get( "name" );
- if( pName != null ) {
- BaseObj aApplet = new BaseObj( aRTM );
- aAU.setObject( aApplet );
- aId = IdentifierPool.aGlobalPool.addIdentifier( pName );
- aDocument.newProperty( aId, aAU );
- IdentifierPool.aGlobalPool.releaseIdentifier( aId );
- }
- }
- */
- }
-
- public MenuItem addMenuItem(Menu m, String s) {
- MenuItem mItem = new MenuItem(amh.getMessage(s));
- mItem.addActionListener(new UserActionListener());
- return m.add(mItem);
- }
-
- /**
- * Ignore.
- */
- public void showDocument(URL url) {
- }
-
- /**
- * Ignore.
- */
- public void showDocument(URL url, String target) {
- }
-
- /**
- * Show status.
- */
- public void showStatus(String status) {
- label.setText(status);
- }
-
- public void update(Observable observable, Object status) {
- showStatus((String)status);
- }
-
- public Object getJavaScriptJSObjectWindow() {
- //if( aRootObj != null )
- // return aRootObj.getJSObject();
- return null;
- }
-
-
- /**
- * System parameters.
- */
- static Hashtable systemParam = new Hashtable();
-
- static {
- systemParam.put("codebase", "codebase");
- systemParam.put("code", "code");
- systemParam.put("alt", "alt");
- systemParam.put("width", "width");
- systemParam.put("height", "height");
- systemParam.put("align", "align");
- systemParam.put("vspace", "vspace");
- systemParam.put("hspace", "hspace");
- }
-
- /**
- * Print the HTML tag.
- */
- public static void printTag(PrintStream out, Hashtable atts) {
- out.print("<applet");
-
- String v = (String)atts.get("codebase");
- if (v != null) {
- out.print(" codebase=\"" + v + "\"");
- }
-
- v = (String)atts.get("code");
- if (v == null) {
- v = "applet.class";
- }
- out.print(" code=\"" + v + "\"");
- v = (String)atts.get("width");
- if (v == null) {
- v = "150";
- }
- out.print(" width=" + v);
-
- v = (String)atts.get("height");
- if (v == null) {
- v = "100";
- }
- out.print(" height=" + v);
-
- v = (String)atts.get("name");
- if (v != null) {
- out.print(" name=\"" + v + "\"");
- }
- out.println(">");
-
- // A very slow sorting algorithm
- int len = atts.size();
- String params[] = new String[len];
- len = 0;
- for (Enumeration e = atts.keys() ; e.hasMoreElements() ;) {
- String param = (String)e.nextElement();
- int i = 0;
- for (; i < len ; i++) {
- if (params[i].compareTo(param) >= 0) {
- break;
- }
- }
- System.arraycopy(params, i, params, i + 1, len - i);
- params[i] = param;
- len++;
- }
-
- for (int i = 0 ; i < len ; i++) {
- String param = params[i];
- if (systemParam.get(param) == null) {
- out.println("<param name=" + param +
- " value=\"" + atts.get(param) + "\">");
- }
- }
- out.println("</applet>");
- }
-
- /**
- * Make sure the atrributes are uptodate.
- */
- public void updateAtts() {
- Dimension d = getSize();
- Insets in = getInsets();
- atts.put("width", new Integer(d.width - (in.left + in.right)).toString());
- atts.put("height", new Integer(d.height - (in.top + in.bottom)).toString());
- }
-
- /**
- * Save the applet to a well known file (for now) as a serialized object
- */
- void appletSave() {
- // REMIND -- should check that the applet has really stopped
- FileDialog fd = new FileDialog(this, "Serialize Applet into File", FileDialog.SAVE);
- // needed for a bug under Solaris...
- fd.setDirectory(System.getProperty("user.dir"));
- fd.setFile(defaultSaveFile);
- fd.show();
- String fname = fd.getFile();
- if (fname == null) {
- return; // cancelled
- }
- String dname = fd.getDirectory();
- File file = new File(dname, fname);
-
- try {
- OutputStream s = new FileOutputStream(file);
- ObjectOutputStream os = new ObjectOutputStream(s);
- showStatus(amh.getMessage("appletsave.err1",
- appletExecutionContext.getApplet().toString(), file.toString()));
- os.writeObject(appletExecutionContext.getApplet());
- } catch (IOException ex) {
- System.err.println(amh.getMessage("appletsave.err2", ex));
- }
- }
-
- /**
- * Clone the viewer and the applet.
- */
- void appletClone() {
- Point p = getLocation();
- updateAtts();
- // factory.createAppletViewer(p.x + 30, p.y + 10,
- // pHelper.panel.documentURL, (Hashtable)pHelper.panel.atts.clone());
- }
-
- /**
- * Show the applet tag.
- */
- void appletTag() {
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- updateAtts();
- printTag(new PrintStream(out), atts);
- showStatus(amh.getMessage("applettag"));
-
- Point p = getLocation();
- new TextFrame(p.x + 50, p.y + 20, amh.getMessage("applettag.textframe"), out.toString());
- }
-
- /**
- * Show the applet info.
- */
- void appletInfo() {
- String str = appletExecutionContext.getApplet().getAppletInfo();
- if (str == null) {
- str = amh.getMessage("appletinfo.applet");
- }
- str += "\n\n";
-
- String atts[][] = appletExecutionContext.getApplet().getParameterInfo();
- if (atts != null) {
- for (int i = 0 ; i < atts.length ; i++) {
- str += atts[i][0] + " -- " + atts[i][1] + " -- " + atts[i][2] + "\n";
- }
- } else {
- str += amh.getMessage("appletinfo.param");
- }
-
- Point p = getLocation();
- new TextFrame(p.x + 50, p.y + 20, amh.getMessage("appletinfo.textframe"), str);
-
- }
-
- /**
- * Show character encoding type
- */
- void appletCharacterEncoding() {
- showStatus(amh.getMessage("appletencoding", encoding));
- }
-
- /**
- * Edit the applet.
- */
- void appletEdit() {
- }
-
- /**
- * Print the applet.
- */
- void appletPrint() {
- PrintJob pj = Toolkit.getDefaultToolkit().
- getPrintJob(this, amh.getMessage("appletprint.printjob"), (Properties)null);
-
-
- if (pj != null) {
- Dimension pageDim = pj.getPageDimension();
- int pageRes = pj.getPageResolution();
- boolean lastFirst = pj.lastPageFirst();
-
- Graphics g = pj.getGraphics();
- if (g != null) {
- appletExecutionContext.getApplet().printComponents(g);
- g.dispose();
- } else {
- statusMsgStream.println(amh.getMessage("appletprint.fail"));
- }
- statusMsgStream.println(amh.getMessage("appletprint.finish"));
- pj.end();
-
- } else {
- statusMsgStream.println(amh.getMessage("appletprint.cancel"));
- }
- }
-
- /**
- * Properties.
- */
- AppletProps props;
- public synchronized void networkProperties() {
- if (props == null) {
- props = new AppletProps(appletExecutionContext);
- }
- props.addNotify();
- props.setVisible(true);
- }
-
- /**
- * Close this viewer.
- * Stop, Destroy, Dispose and Quit an AppletView, then
- * reclaim resources and exit the program if this is
- * the last applet.
- */
- public void appletClose() {
- appletExecutionContext.shutdown();
- contexts.removeElement(this);
-
- if (contexts.size() == 0) {
- appletSystemExit();
- }
- }
-
-
-// public static void writeClasses() {
-// try {
-// java.io.FileOutputStream file = new FileOutputStream("classes.txt");
-// java.io.PrintStream printStream = new java.io.PrintStream(file);
-
-// printStream.println("- .* .*");
-// Enumeration elements = stardiv.util.HardClassContext.classList.elements();
-// while(elements.hasMoreElements()) {
-// String string = (String)elements.nextElement();
-
-// String packageName = "";
-// String className = string;
-
-// int lastIndex = string.lastIndexOf('.');
-// if(lastIndex > -1) {
-// packageName = string.substring(0, lastIndex);
-// className = string.substring(lastIndex + 1);
-// }
-
-// printStream.print("+ ");
-// int index;
-// while((index = packageName.indexOf('.')) > -1) {
-// printStream.print(packageName.substring(0, index) + "\\\\");
-// packageName = packageName.substring(index + 1);
-// }
-// printStream.print(packageName + " ");
-
-// while((index = className.indexOf('$')) > -1) {
-// printStream.print(className.substring(0, index) + "\\$");
-// className = className.substring(index + 1);
-// }
-// printStream.println(className + "\\.class");
-// }
-// file.close();
-// }
-// catch(java.io.IOException eio) {
-// System.err.println("IOException:" + eio);
-// }
-// }
-
- /**
- * Exit the program.
- * Exit from the program (if not stand alone) - do no clean-up
- */
- private void appletSystemExit() {
- // if (factory.isStandalone())
- System.exit(0);
- }
-
- /**
- * Quit all viewers.
- * Shutdown all viewers properly then
- * exit from the program (if not stand alone)
- */
- protected void appletQuit() {
- appletExecutionContext.shutdown();
- appletSystemExit();
- }
-
- /**
- * Handle events.
- */
- public void processUserAction(ActionEvent evt) {
-
- String label = ((MenuItem)evt.getSource()).getLabel();
-
- if (amh.getMessage("menuitem.restart").equals(label)) {
- appletExecutionContext.restart();
- return;
- }
-
- if (amh.getMessage("menuitem.reload").equals(label)) {
- appletExecutionContext.reload();
- return;
- }
-
- if (amh.getMessage("menuitem.clone").equals(label)) {
- appletClone();
- return;
- }
-
- if (amh.getMessage("menuitem.stop").equals(label)) {
- appletExecutionContext.sendStop();
- return;
- }
-
- if (amh.getMessage("menuitem.save").equals(label)) {
- appletSave();
- return;
- }
-
- if (amh.getMessage("menuitem.start").equals(label)) {
- appletExecutionContext.sendStart();
- return;
- }
-
- if (amh.getMessage("menuitem.tag").equals(label)) {
- appletTag();
- return;
- }
-
- if (amh.getMessage("menuitem.info").equals(label)) {
- appletInfo();
- return;
- }
-
- if (amh.getMessage("menuitem.encoding").equals(label)) {
- appletCharacterEncoding();
- return;
- }
-
- if (amh.getMessage("menuitem.edit").equals(label)) {
- appletEdit();
- return;
- }
-
- if (amh.getMessage("menuitem.print").equals(label)) {
- appletPrint();
- return;
- }
-
- if (amh.getMessage("menuitem.props").equals(label)) {
- networkProperties();
- return;
- }
-
- if (amh.getMessage("menuitem.close").equals(label)) {
- appletClose();
- return;
- }
-
- if (/*factory.isStandalone() && */amh.getMessage("menuitem.quit").equals(label)) {
- appletQuit();
- return;
- }
- //statusMsgStream.println("evt = " + evt);
- }
-
- /**
- * Prepare the enviroment for executing applets.
- */
- public static void init() {
- Properties props = new Properties();
- props.put( "http.proxyHost", "wwwproxy" );
- props.put( "http.proxyPort", "3128" );
- props.put( "ftpProxySet", "true" );
- props.put( "ftpProxyHost", "wwwproxy" );
- props.put( "ftpProxyPort", "3128" );
- props.put( "ftpProxyPort", "3128" );
- props.put( "stardiv.debug.trace", "window" );
- props.put( "stardiv.debug.warning", "window" );
- props.put( "stardiv.debug.error", "window" );
- props.put( "stardiv.security.defaultSecurityManager", "true" );
-
- // Try loading the appletviewer properties file to get messages, etc.
-// try {
-// FileInputStream in = new FileInputStream(theAppletViewerPropsFile);
-// props.load(new BufferedInputStream(in));
-// in.close();
-// } catch (Exception e) {
-// System.out.println(amh.getMessage("init.err"));
-// }
-
- // Try loading the saved user properties file to override some
- // of the above defaults.
- try {
- FileInputStream in = new FileInputStream(theUserPropertiesFile);
- props.load(new BufferedInputStream(in));
- in.close();
- } catch (Exception e) {
- /* is it really necessary to say this?
- This is always the case the first time we run..
- System.out.println("[no properties loaded, using defaults]"); */
- }
-
- // Install a property list.
-
- SjSettings.changeProperties(props);
- }
-
- /**
- * The current character.
- */
- static int c;
-
- /**
- * Scan spaces.
- */
- public static void skipSpace(Reader in) throws IOException {
- while ((c >= 0) && ((c == ' ') || (c == '\t') || (c == '\n') || (c == '\r'))) {
- c = in.read();
- }
- }
-
- /**
- * Scan identifier
- */
- public static String scanIdentifier(Reader in) throws IOException {
- StringBuffer buf = new StringBuffer();
- while (true) {
- if (((c >= 'a') && (c <= 'z')) ||
- ((c >= 'A') && (c <= 'Z')) ||
- ((c >= '0') && (c <= '9')) || (c == '_')) {
- buf.append((char)c);
- c = in.read();
- } else {
- return buf.toString();
- }
- }
- }
-
- /**
- * Scan tag
- */
- public static Hashtable scanTag(Reader in) throws IOException {
- Hashtable atts = new Hashtable();
- skipSpace(in);
- while (c >= 0 && c != '>') {
- String att = scanIdentifier(in);
- String val = "";
- skipSpace(in);
- if (c == '=') {
- int quote = -1;
- c = in.read();
- skipSpace(in);
- if ((c == '\'') || (c == '\"')) {
- quote = c;
- c = in.read();
- }
- StringBuffer buf = new StringBuffer();
- while ((c > 0) &&
- (((quote < 0) && (c != ' ') && (c != '\t') &&
- (c != '\n') && (c != '\r') && (c != '>'))
- || ((quote >= 0) && (c != quote)))) {
- buf.append((char)c);
- c = in.read();
- }
- if (c == quote) {
- c = in.read();
- }
- skipSpace(in);
- val = buf.toString();
- }
- //statusMsgStream.println("PUT " + att + " = '" + val + "'");
- atts.put(att.toLowerCase(), val);
- skipSpace(in);
- }
- return atts;
- }
-
- static int x = 100;
- static int y = 50;
-
- static String encoding = null;
-
- static private Reader makeReader(InputStream is) {
- if (encoding != null) {
- try {
- return new BufferedReader(new InputStreamReader(is, encoding));
- } catch (IOException x) { }
- }
- InputStreamReader r = new InputStreamReader(is);
- encoding = r.getEncoding();
- return new BufferedReader(r);
- }
-
- /**
- * Scan an html file for <applet> tags
- */
- public static void parse(URL url) throws IOException {
- parse(url, System.out);
- }
-
- public static void parse(URL url, PrintStream statusMsgStream) throws IOException {
-
- // warning messages
- String requiresNameWarning = amh.getMessage("parse.warning.requiresname");
- String paramOutsideWarning = amh.getMessage("parse.warning.paramoutside");
- String requiresCodeWarning = amh.getMessage("parse.warning.requirescode");
- String requiresHeightWarning = amh.getMessage("parse.warning.requiresheight");
- String requiresWidthWarning = amh.getMessage("parse.warning.requireswidth");
- String appNotLongerSupportedWarning = amh.getMessage("parse.warning.appnotLongersupported");
-
- java.net.URLConnection conn = url.openConnection();
- Reader in = makeReader(conn.getInputStream());
- /* The original URL may have been redirected - this
- * sets it to whatever URL/codebase we ended up getting
- */
- url = conn.getURL();
-
- Hashtable atts = null;
- while(true) {
- c = in.read();
- if (c == -1)
- break;
-
- if (c == '<') {
- c = in.read();
- if (c == '/') {
- c = in.read();
- String nm = scanIdentifier(in);
- if (nm.equalsIgnoreCase("applet")) {
- if (atts != null) {
- new AppletViewer(x, y, url, atts, System.out);
- x += 50;
- y += 20;
- // make sure we don't go too far!
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- if (x > d.width - 30)
- x = 100;
- if (y > d.height - 30)
- y = 50;
- }
- atts = null;
- }
- }
- else {
- String nm = scanIdentifier(in);
- if (nm.equalsIgnoreCase("param")) {
- Hashtable t = scanTag(in);
- String att = (String)t.get("name");
- if (att == null) {
- statusMsgStream.println(requiresNameWarning);
- } else {
- String val = (String)t.get("value");
- if (val == null) {
- statusMsgStream.println(requiresNameWarning);
- } else if (atts != null) {
- atts.put(att.toLowerCase(), val);
- } else {
- statusMsgStream.println(paramOutsideWarning);
- }
- }
- }
- else if (nm.equalsIgnoreCase("applet")) {
- atts = scanTag(in);
- if (atts.get("code") == null && atts.get("object") == null) {
- statusMsgStream.println(requiresCodeWarning);
- atts = null;
- } else if (atts.get("width") == null) {
- statusMsgStream.println(requiresWidthWarning);
- atts = null;
- } else if (atts.get("height") == null) {
- statusMsgStream.println(requiresHeightWarning);
- atts = null;
- }
- }
- else if (nm.equalsIgnoreCase("app")) {
- statusMsgStream.println(appNotLongerSupportedWarning);
- Hashtable atts2 = scanTag(in);
- nm = (String)atts2.get("class");
- if (nm != null) {
- atts2.remove("class");
- atts2.put("code", nm + ".class");
- }
- nm = (String)atts2.get("src");
- if (nm != null) {
- atts2.remove("src");
- atts2.put("codebase", nm);
- }
- if (atts2.get("width") == null) {
- atts2.put("width", "100");
- }
- if (atts2.get("height") == null) {
- atts2.put("height", "100");
- }
- printTag(statusMsgStream, atts2);
- statusMsgStream.println();
- }
- }
- }
- }
- in.close();
- }
-
- /**
- * Print usage
- */
- static void usage() {
- System.out.println(amh.getMessage("usage"));
- }
-
- static boolean didInitialize = false;
-
- /**
- * mainInit can be called by direct clients
- */
- public static void mainInit() {
- if (! didInitialize) {
- didInitialize = true;
-
- init();
-
- }
- }
-
- /**
- * Main
- */
- public static void main(String argv[]) {
- mainInit();
-
- // Parse arguments
- if (argv.length == 0) {
- System.out.println(amh.getMessage("main.err.inputfile"));
- usage();
- return;
- }
-
- // Parse the documents
- for (int i = 0 ; i < argv.length ; i++) {
- try {
- URL url = null;
-
- if (argv[i].equals("-encoding")) {
- if(i + 1 < argv.length) {
- i++;
- encoding = argv[i];
- continue;
- } else {
- usage();
- System.exit(1);
- }
- }
- else
- if (argv[i].indexOf(':') <= 1) {
- String userDir = System.getProperty("user.dir");
- String prot;
- // prepend native separator to path iff not present
- if (userDir.charAt(0) == '/' ||
- userDir.charAt(0) == java.io.File.separatorChar) {
- prot = "file:";
- } else {
- prot = "file:/";
- }
- url = new URL(prot + userDir.replace(File.separatorChar, '/')
- + "/");
- url = new URL(url, argv[i]);
- } else {
- url = new URL(argv[i]);
- }
-
- parse(url);
- documentViewer = DocumentProxy.getDocumentProxy(url, Toolkit.getDefaultToolkit());
- } catch (MalformedURLException e) {
- System.out.println(amh.getMessage("main.err.badurl", argv[i], e.getMessage()));
- System.exit(1);
- } catch (IOException e) {
- System.out.println(amh.getMessage("main.err.io", e.getMessage()));
- if (argv[i].indexOf(':') < 0) {
- System.out.println(amh.getMessage("main.err.readablefile", argv[i]));
- } else {
- System.out.println(amh.getMessage("main.err.correcturl", argv[i]));
- }
- System.exit(1);
- }
- }
- /*
- if (documentViewer.countApplets() == 0) {
- System.out.println(amh.getMessage("main.warning"));
- usage();
- System.exit(1);
- }*/
- }
- private static AppletMessageHandler amh = new AppletMessageHandler("appletviewer");
-}
diff --git a/sj2/stardiv/app/AppletViewerFactory.java b/sj2/stardiv/app/AppletViewerFactory.java
deleted file mode 100644
index 23a37aa77e..0000000000
--- a/sj2/stardiv/app/AppletViewerFactory.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AppletViewerFactory.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-/*
- * AppletViewerFactory.java
- */
-
-package stardiv.app;
-
-import java.util.Hashtable;
-import java.net.URL;
-import java.awt.MenuBar;
-
-public
-interface AppletViewerFactory {
- public AppletViewer createAppletViewer(int x, int y, URL doc, Hashtable atts);
- public MenuBar getBaseMenuBar();
- public boolean isStandalone();
-}
diff --git a/sj2/stardiv/app/MsgAppletViewer.java b/sj2/stardiv/app/MsgAppletViewer.java
deleted file mode 100644
index 12d91c6e16..0000000000
--- a/sj2/stardiv/app/MsgAppletViewer.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: MsgAppletViewer.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.app;
-
-import java.util.ListResourceBundle;
-
-public class MsgAppletViewer extends ListResourceBundle {
-
- public Object[][] getContents() {
- return contents;
- }
-
- static final Object[][] contents = {
- {"textframe.button.dismiss", "Dismiss"},
- {"appletviewer.tool.title", "Applet Viewer: {0}"},
- {"appletviewer.menu.applet", "Applet"},
- {"appletviewer.menuitem.restart", "Restart"},
- {"appletviewer.menuitem.reload", "Reload"},
- {"appletviewer.menuitem.stop", "Stop"},
- {"appletviewer.menuitem.save", "Save..."},
- {"appletviewer.menuitem.start", "Start"},
- {"appletviewer.menuitem.clone", "Clone..."},
- {"appletviewer.menuitem.tag", "Tag..."},
- {"appletviewer.menuitem.info", "Info..."},
- {"appletviewer.menuitem.edit", "Edit"},
- {"appletviewer.menuitem.encoding", "Character Encoding"},
- {"appletviewer.menuitem.print", "Print..."},
- {"appletviewer.menuitem.props", "Properties..."},
- {"appletviewer.menuitem.close", "Close"},
- {"appletviewer.menuitem.quit", "Quit"},
- {"appletviewer.label.hello", "Hello..."},
- {"appletviewer.status.start", "starting applet..."},
- {"appletviewer.appletsave.err1", "serializing an {0} to {1}"},
- {"appletviewer.appletsave.err2", "in appletSave: {0}"},
- {"appletviewer.applettag", "Tag shown"},
- {"appletviewer.applettag.textframe", "Applet HTML Tag"},
- {"appletviewer.appletinfo.applet", "-- no applet info --"},
- {"appletviewer.appletinfo.param", "-- no parameter info --"},
- {"appletviewer.appletinfo.textframe", "Applet Info"},
- {"appletviewer.appletprint.printjob", "Print Applet"},
- {"appletviewer.appletprint.fail", "Printing failed."},
- {"appletviewer.appletprint.finish", "Finished printing."},
- {"appletviewer.appletprint.cancel", "Printing cancelled."},
- {"appletviewer.appletencoding", "Character Encoding: {0}"},
- {"appletviewer.init.err", "[no appletviewer.properties file found!]"},
- {"appletviewer.parse.warning.requiresname", "Warning: <param name=... value=...> tag requires name attribute."},
- {"appletviewer.parse.warning.paramoutside", "Warning: <param> tag outside <applet> ... </applet>."},
- {"appletviewer.parse.warning.requirescode", "Warning: <applet> tag requires code attribute."},
- {"appletviewer.parse.warning.requiresheight", "Warning: <applet> tag requires height attribute."},
- {"appletviewer.parse.warning.requireswidth", "Warning: <applet> tag requires width attribute."},
- {"appletviewer.parse.warning.appnotLongersupported", "Warning: <app> tag no longer supported, use <applet> instead:"},
- {"appletviewer.usage", "usage: appletviewer [-debug] [-J<javaflag>] [-encoding <character encoding type> ] url|file ..."},
- {"appletviewer.main.err.inputfile", "No input files specified."},
- {"appletviewer.main.err.badurl", "Bad URL: {0} ( {1} )"},
- {"appletviewer.main.err.io", "I/O exception while reading: {0}"},
- {"appletviewer.main.err.readablefile", "Make sure that {0} is a file and is readable."},
- {"appletviewer.main.err.correcturl", "Is {0} the correct URL?"},
- {"appletviewer.main.warning", "Warning: No Applets were started. Make sure the input contains an <applet> tag."},
- {"appletioexception.loadclass.throw.interrupted", "class loading interrupted: {0}"},
- {"appletioexception.loadclass.throw.notloaded", "class not loaded: {0}"},
- {"appletclassloader.loadcode.verbose", "Opening stream to: {0} to get {1}"},
- {"appletclassloader.filenotfound", "File not found when looking for: {0}"},
- {"appletclassloader.fileformat", "File format exception when loading: {0}"},
- {"appletclassloader.fileioexception", "I/O exception when loading: {0}"},
- {"appletclassloader.fileexception", "{0} exception when loading: {1}"},
- {"appletclassloader.filedeath", "{0} killed when loading: {1}"},
- {"appletclassloader.fileerror", "{0} error when loading: {1}"},
- {"appletclassloader.findclass.verbose.findclass", "{0} find class {1}"},
- {"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
- {"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
- {"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
- {"appletclassloader.getresourceasstream.verbose", "Found resource: {0} as a system resource"},
- {"appletcopyright.title", "Copyright Notice"},
- {"appletcopyright.button.accept", "Accept"},
- {"appletcopyright.button.reject", "Reject"},
- {"appletcopyright.defaultcontent", "Copyright (c) 1995, 1996, 1997 Sun Microsystems, Inc."},
- {"appletcopyright.copyrightfile", "COPYRIGHT"},
- {"appletcopyright.copyrightencoding", "8859_1"},
- {"appletpanel.runloader.err", "Either object or code parameter!"},
- {"appletpanel.runloader.exception", "exception while deserializing {0}"},
- {"appletpanel.destroyed", "Applet destroyed."},
- {"appletpanel.loaded", "Applet loaded."},
- {"appletpanel.started", "Applet started."},
- {"appletpanel.inited", "Applet initialized."},
- {"appletpanel.stopped", "Applet stopped."},
- {"appletpanel.disposed", "Applet disposed."},
- {"appletpanel.nocode", "APPLET tag missing CODE parameter."},
- {"appletpanel.notfound", "load: class {0} not found."},
- {"appletpanel.nocreate", "load: {0} can''t be instantiated."},
- {"appletpanel.noconstruct", "load: {0} is not public or has no public constructor."},
- {"appletpanel.death", "killed"},
- {"appletpanel.exception", "exception: {0}."},
- {"appletpanel.exception2", "exception: {0}: {1}."},
- {"appletpanel.error", "error: {0}."},
- {"appletpanel.error2", "error: {0}: {1}."},
- {"appletpanel.notloaded", "Init: applet not loaded."},
- {"appletpanel.notinited", "Start: applet not initialized."},
- {"appletpanel.notstarted", "Stop: applet not started."},
- {"appletpanel.notstopped", "Destroy: applet not stopped."},
- {"appletpanel.notdestroyed", "Dispose: applet not destroyed."},
- {"appletpanel.notdisposed", "Load: applet not disposed."},
- {"appletpanel.bail", "Interrupted: bailing out."},
- {"appletpanel.filenotfound", "File not found when looking for: {0}"},
- {"appletpanel.fileformat", "File format exception when loading: {0}"},
- {"appletpanel.fileioexception", "I/O exception when loading: {0}"},
- {"appletpanel.fileexception", "{0} exception when loading: {1}"},
- {"appletpanel.filedeath", "{0} killed when loading: {1}"},
- {"appletpanel.fileerror", "{0} error when loading: {1}"},
- {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requires non-null loader"},
- {"appletprops.title", "AppletViewer Properties"},
- {"appletprops.label.http.server", "Http proxy server:"},
- {"appletprops.label.http.proxy", "Http proxy port:"},
- {"appletprops.label.network", "Network access:"},
- {"appletprops.choice.network.item.none", "None"},
- {"appletprops.choice.network.item.applethost", "Applet Host"},
- {"appletprops.choice.network.item.unrestricted", "Unrestricted"},
- {"appletprops.label.class", "Class access:"},
- {"appletprops.choice.class.item.restricted", "Restricted"},
- {"appletprops.choice.class.item.unrestricted", "Unrestricted"},
- {"appletprops.label.unsignedapplet", "Allow unsigned applets:"},
- {"appletprops.choice.unsignedapplet.no", "No"},
- {"appletprops.choice.unsignedapplet.yes", "Yes"},
- {"appletprops.button.apply", "Apply"},
- {"appletprops.button.cancel", "Cancel"},
- {"appletprops.button.reset", "Reset"},
- {"appletprops.apply.exception", "Failed to save properties: {0}"},
- {"appletsecurityexception.checkcreateclassloader", "Security Exception: classloader"},
- {"appletsecurityexception.checkaccess.thread", "Security Exception: thread"},
- {"appletsecurityexception.checkaccess.threadgroup", "Security Exception: threadgroup: {0}"},
- {"appletsecurityexception.checkexit", "Security Exception: exit: {0}"},
- {"appletsecurityexception.checkexec", "Security Exception: exec: {0}"},
- {"appletsecurityexception.checklink", "Security Exception: link: {0}"},
- {"appletsecurityexception.checkpropsaccess", "Security Exception: properties"},
- {"appletsecurityexception.checkpropsaccess.key", "Security Exception: properties access {0}"},
- {"appletsecurityexception.checkread.exception1", "Security Exception: {0}, {1}"},
- {"appletsecurityexception.checkread.exception2", "Security Exception: file.read: {0}"},
- {"appletsecurityexception.checkread", "Security Exception: file.read: {0} == {1}"},
- {"appletsecurityexception.checkwrite.exception", "Security Exception: {0}, {1}"},
- {"appletsecurityexception.checkwrite", "Security Exception: file.write: {0} == {1}"},
- {"appletsecurityexception.checkread.fd", "Security Exception: fd.read"},
- {"appletsecurityexception.checkwrite.fd", "Security Exception: fd.write"},
- {"appletsecurityexception.checklisten", "Security Exception: socket.listen: {0}"},
- {"appletsecurityexception.checkaccept", "Security Exception: socket.accept: {0}:{1}"},
- {"appletsecurityexception.checkconnect.networknone", "Security Exception: socket.connect: {0}->{1}"},
- {"appletsecurityexception.checkconnect.networkhost1", "Security Exception: Couldn''t connect to {0} with origin from {1}."},
- {"appletsecurityexception.checkconnect.networkhost2", "Security Exception: Couldn''t resolve IP for host {0} or for {1}. "},
- {"appletsecurityexception.checkconnect.networkhost3", "Security Exception: Could not resolve IP for host {0}. See the trustProxy property."},
- {"appletsecurityexception.checkconnect", "Security Exception: connect: {0}->{1}"},
- {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
- {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
- {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
- {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
- {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
- {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
- {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
- {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
- {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
- {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
- {"appletsecurityexception.checkconnect.unknown", "unknown class loader type. unable to check for checking connect"},
- {"appletsecurityexception.getresource.noclassaccess", "Cannot use getResource to access .class file: {0} in JDK1.1"},
- };
-}
diff --git a/sj2/stardiv/app/makefile.mk b/sj2/stardiv/app/makefile.mk
deleted file mode 100644
index 4e4b5f36a3..0000000000
--- a/sj2/stardiv/app/makefile.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sj2
-TARGET=app
-
-PACKAGE=stardiv$/app
-JARFILES=sandbox.jar
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(JDK)" == "gcj"
-all:
- @echo This dir cannot be build with gcj because of sun.net.ftp.FtpClient
-.ELSE
-# --- Files --------------------------------------------------------
-
-JAVAFILES= \
- AppletViewer.java \
- AppletViewerFactory.java \
- AppletProps.java \
- AppletMessageHandler.java \
- MsgAppletViewer.java
-
-JAVACLASSFILES= \
- $(CLASSDIR)$/$(PACKAGE)$/AppletViewer.class \
- $(CLASSDIR)$/$(PACKAGE)$/AppletViewerFactory.class \
- $(CLASSDIR)$/$(PACKAGE)$/AppletProps.class \
- $(CLASSDIR)$/$(PACKAGE)$/AppletMessageHandler.class \
- $(CLASSDIR)$/$(PACKAGE)$/MsgAppletViewer.class
-
-
-# --- Targets ------------------------------------------------------
-.ENDIF
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/sj2/stardiv/applet/AppletExecutionContext.java b/sj2/stardiv/applet/AppletExecutionContext.java
deleted file mode 100644
index ddf81c1a15..0000000000
--- a/sj2/stardiv/applet/AppletExecutionContext.java
+++ /dev/null
@@ -1,383 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: AppletExecutionContext.java,v $
- * $Revision: 1.9 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package stardiv.applet;
-
-import java.applet.Applet;
-import java.applet.AppletStub;
-import java.applet.AppletContext;
-import java.applet.AudioClip;
-
-import java.awt.BorderLayout;
-import java.awt.Container;
-import java.awt.Dimension;
-import java.awt.Panel;
-import java.awt.Toolkit;
-import java.awt.Window;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-
-import java.net.URL;
-import java.net.MalformedURLException;
-
-import java.util.Hashtable;
-import java.util.Vector;
-
-import sun.misc.Queue;
-
-import com.sun.star.lib.sandbox.ClassContextProxy;
-import com.sun.star.lib.sandbox.ExecutionContext;
-import com.sun.star.lib.sandbox.JarEntry;
-import com.sun.star.lib.sandbox.ResourceProxy;
-import com.sun.star.lib.sandbox.SandboxSecurity;
-import com.sun.star.lib.sandbox.CodeSource;
-
-import stardiv.controller.SjSettings;
-
-public final class AppletExecutionContext extends ExecutionContext
- implements AppletStub, LiveConnectable
-{
- private static final boolean DEBUG = false; // Enable / disable debug output
-
- private Applet _applet;
- private Container _container;
-
- private DocumentProxy _documentProxy;
- private Hashtable _parameters;
-
- private String _className;
- private Vector _jarResourceProxys = new Vector();
-
- private URL _documentBase = null;
- private URL _baseURL = null;
-
- private Toolkit _toolkit;
-
- //************** C++ WRAPPER ******************
- private long pCppJSbxObject;
-
- synchronized public void ClearNativeHandle() {
- pCppJSbxObject = 0;
- if(DEBUG)System.err.println("### AppletExecutionContext.ClearNativeHandle");
- }
-
- public AppletExecutionContext(long pCppJSbxObject) {
- this.pCppJSbxObject = pCppJSbxObject;
- }
- //************** C++ WRAPPER ******************
-
- public AppletExecutionContext( URL documentBase,
- Hashtable parameters,
- Container container,
- long pCppJSbxObject)
- {
- this(pCppJSbxObject);
-
- if(DEBUG) System.err.println("#### AppletExecutionContext.<init>:" + documentBase + " " + parameters + " " + container + " " + pCppJSbxObject);
- _documentBase = documentBase;
- _parameters = parameters;
- _container = container;
-
- _toolkit = container.getToolkit();
-
- _documentProxy = DocumentProxy.getDocumentProxy(documentBase, _toolkit);
- addObserver(_documentProxy);
- }
-
- public void init() {
- _baseURL = null;
-
- try {
- String codeBase = getParameter("codebase");
-
- if (!codeBase.endsWith("/")) {
- codeBase += "/";
- }
- _baseURL = new URL(_documentBase, codeBase);
- }
- catch (MalformedURLException e) {
- if(DEBUG) System.err.println("#### AppletExecutionContext: Could not create base Url");
- }
-
- if(_baseURL == null)
- _baseURL = _documentBase;
-
- if(DEBUG) System.err.println("##### " + getClass().getName() + ".init - baseUrl:" + _baseURL);
-
- _className = getParameter("code");
- String defaultExtension = ".class";
- String oldExtension = ".java";
-
- int extensionIndex = _className.lastIndexOf('.');
- String extension = "";
-
- if (extensionIndex != -1) {
- extension = _className.substring(extensionIndex);
-
- if(!extension.equals(defaultExtension) && !extension.equals(oldExtension)) {
- extension = defaultExtension;
- }
- else
- _className = _className.substring(0, extensionIndex);
- }
-
- String nm = "applet-" + _className;
-
- _documentProxy.addExecutionContext(this, _className);
-
- super.init(nm, ClassContextProxy.create(_baseURL, null, null, false));
-
- // Set the property stardiv.security.noExit to true. That value will be used in
- // SjSettings.changeProperties in the constructor of the SecurityManager SandboxSecurity
- if (System.getSecurityManager() == null)
- System.setProperty("stardiv.security.noExit", "true");
- // SjSettings.changeProperties puts a lot of applet relating properties into the system properties
- // and it sets the SecurityManager
- SjSettings.changeProperties( System.getProperties());
-
- if(DEBUG) System.err.println("#####" + getClass().getName() + ".init: _className=" + _className + " _baseURL=" + _baseURL);
- }
-
- void sDispose(long timeout) {
- if(DEBUG) System.err.println("#### AppletExecutionContext.sDispose");
-
- _container = null;
- _jarResourceProxys = null;
-
- super.dispose(timeout);
- }
-
- public void dispose(long timeout) {
- sDispose(timeout); // call direct
-
-/* Deadlock with TKT
- class DisposeEvent extends java.awt.AWTEvent
- implements java.awt.peer.ActiveEvent,
- java.awt.ActiveEvent
- {
- private AppletExecutionContext executionContext;
- private long timeout;
-
- public DisposeEvent(AppletExecutionContext executionContext, long timeout) {
- super(executionContext, 0);
-
- this.executionContext = executionContext;
- this.timeout = timeout;
- }
-
- public void dispatch() {
- executionContext.sDispose(timeout);
- }
- }
-
- toolkit.getSystemEventQueue().postEvent(new DisposeEvent(this, timeout));
-*/
- }
-
- protected int getIntParameter(String name) {
- int value = 0;
- String string = getParameter(name);
- if(string != null)
- value = Integer.valueOf(string).intValue();
-
- return value;
- }
-
- protected void xload()
- throws ClassNotFoundException,
- InstantiationException,
- IllegalAccessException
- {
- String archives = getParameter("archive");
-
- try {
- if(archives != null) {
- int index = archives.indexOf(",");
- while(index > -1) {
- try { // try to load archive
- loadArchive(archives.substring(0, index));
- }
- catch(MalformedURLException malformedURLException) {
- System.err.println("#### can't load archive:" + archives.substring(0, index));
- }
- catch(IOException ioException) {
- System.err.println("#### can't load archive:" + archives.substring(0, index) + " reason:" + ioException);
- }
-
- archives = archives.substring(index + 1).trim();
-
- index = archives.indexOf(",");
- }
- if(archives.length() > 0) loadArchive(archives);
- }
-
- Class appletClass = classContext.loadClass(_className);
- synchronized(_className) {
- _applet = (Applet)appletClass.newInstance();
- _applet.setStub(this);
-
- appletResize(_container.getSize().width, _container.getSize().height);
-
- _className.notifyAll();
- }
- }
- catch(IOException eio) {
- throw new ClassNotFoundException(eio.getMessage());
- }
- }
-
- protected void xinit() {
- java.awt.Dimension size = new Dimension(getIntParameter("width"), getIntParameter("height"));
-
- _container.setLayout(null);
- _container.setVisible(true);
- _container.setSize(size);
- _container.add(_applet);
-
- _applet.setVisible(false);
- _applet.setSize(size);
-
- _container.validate();
-
- _applet.init();
- }
-
- protected void xstart() {
- _applet.setVisible(true);
- _container.validate();
-
- _applet.start();
- }
-
- protected void xstop() {
- _applet.stop();
- }
-
- protected void xdestroy() {
- if(DEBUG) System.err.println("##### " + getClass().getName() + ".xdestroy");
-
- _applet.destroy();
- _applet.setVisible(false);
- _applet.setStub(null);
-
- _documentProxy.removeExecutionContext(_applet.getClass().getName());
- }
-
- protected void xdispose() {
- if(DEBUG) System.err.println("##### " + getClass().getName() + ".xdispose");
-
- if(_container != null) {
- _container.remove(_applet);
-
- if(_container instanceof Window)
- ((Window)_container).dispose();
- }
-
- _applet = null;
- }
-
- private void loadArchive(String archive) throws MalformedURLException, IOException {
- ResourceProxy jarResourceProxy = ResourceProxy.load(new URL(_baseURL, archive), null /*_protectionDomain*/);
- jarResourceProxy.loadJar(_baseURL);
- _jarResourceProxys.addElement(jarResourceProxy);
- }
-
- public Applet getApplet() {
- synchronized(_className) {
- if(_applet == null) {
- if(DEBUG)System.err.println("#### AppletExecutionContext.getApplet - waiting for applet");
- try {
- _className.wait();
- }
- catch(InterruptedException interruptedException) {
- System.err.println("#### AppletExecutionContext.getApplet:" + interruptedException);
- }
- if(DEBUG)System.err.println("#### AppletExecutionContext.getApplet - got it");
- }
- }
- return _applet;
- }
-
- /*
- * 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);
- }
-
- public AppletContext getAppletContext() {
- return _documentProxy;
- }
-
- public URL getCodeBase() {
- return classContext.getBase();
- }
-
- public URL getDocumentBase() {
- return _documentProxy.getDocumentBase();
- }
-
- public String getParameter(String name) {
- String string = (String)_parameters.get(name.toLowerCase());
- if(string != null)
- string = string.trim();
-
- return string;
- }
-
- public boolean isActive() {
- return getStatus() == STARTED && pCppJSbxObject != 0;
- }
-
- public void finalize() {
- if(DEBUG) System.err.println("#### AppletExecutionContext finalized");
- }
-
- // sollte eigentlich im DocumentProxy sein, geht aber nicht
- private native void xshowStatus(String status);
- private native void xshowDocument(URL url, String aTarget);
-
- void printStatus(String status) {
- if(pCppJSbxObject != 0) xshowStatus(status);
- }
-
- void printDocument(URL url, String aTarget) {
- if(pCppJSbxObject != 0) xshowDocument(url, aTarget);
- }
-
- native public Object getJavaScriptJSObjectWindow();
-}
diff --git a/sj2/stardiv/applet/Document.java b/sj2/stardiv/applet/Document.java
deleted file mode 100644
index b1eb9c5a7a..0000000000
--- a/sj2/stardiv/applet/Document.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: Document.java,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.applet;
-
-import java.awt.Image;
-
-// import java.applet.Applet;
-// import java.applet.AppletContext;
-// import java.applet.AudioClip;
-
-
-import java.io.IOException;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Observer;
-import java.util.Observable;
-
-import java.net.URL;
-
-import java.applet.Applet;
-import java.applet.AppletContext;
-import java.applet.AudioClip;
-
-import com.sun.star.lib.sandbox.ExecutionContext;
-import com.sun.star.lib.sandbox.ResourceProxy;
-
-class Document implements LiveConnectable {
- private Hashtable executionContexts = new Hashtable();
- private URL documentBase = null;
- private java.awt.Toolkit toolkit;
-
- Document(URL url, java.awt.Toolkit toolkit) {
- // Create the document base.
- //For example, suppose an applet is contained within the document:
- //http://java.sun.com/products/jdk/1.2/index.html
- //The document base is:
- //http://java.sun.com/products/jdk/1.2/
-
- String s= url.toString();
- int index= s.lastIndexOf('/');
- if( index != -1)
- {
- s=s.substring(0, index + 1);
- }
- try{
- documentBase = new URL(s);
- }catch(Exception e){
- }
- this.toolkit = toolkit;
- }
-
- void addExecutionContext(ExecutionContext executionContext, String name) {
- executionContexts.put(name, executionContext);
- }
-
- void removeExecutionContext(String name) {
- executionContexts.remove(name);
- }
-
- Enumeration getExecutionContexts() {
- return executionContexts.elements();
- }
-
- URL getDocumentBase() {
- return documentBase;
- }
-
- ExecutionContext getExecutionContext(String name) {
- return (ExecutionContext)executionContexts.get(name);
- }
-
- Enumeration getExcutionContexts() {
- return executionContexts.elements();
- }
-
- /**
- * Get the javascript environment for this applet.
- */
- /*
- public native Object getJavaScriptJSObjectWindow();
- public native void appletResize( int width, int height );
- public native void showDocument( URL url, String aTarget );
- public native void showStatus( String status );
- */
-
- public AudioClip getAudioClip(URL url) {
- ResourceProxy resourceProxy = ResourceProxy.load(url, null);
- AudioClip audioClip = resourceProxy.getAudioClip();
-
- return audioClip;
- }
-
- public Image getImage(URL url) {
- ResourceProxy resourceProxy = ResourceProxy.load(url, null);
- Image image = toolkit.createImage(resourceProxy.getImageProducer());
-
- return image;
- }
-
- AppletExecutionContext getAppletExecutionContext() {
- AppletExecutionContext appletExecutionContext = null;
-
- for(Enumeration e = executionContexts.elements(); e.hasMoreElements();) {
- Object object = e.nextElement();
- if(object instanceof AppletExecutionContext) {
- appletExecutionContext = (AppletExecutionContext)object;
- }
- }
- return appletExecutionContext;
- }
-
-
- void showDocument(URL url, String aTarget) {
- AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
- if(appletExecutionContext != null) appletExecutionContext.printDocument(url, aTarget);
- }
-
- public void showDocument(URL url) {
- showDocument(url, "_top");
- }
-
- void showStatus(String status) {
- status = (status == null) ? "" : status;
-
- AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
- if(appletExecutionContext != null) appletExecutionContext.printStatus(status);
- }
-
- public Object getJavaScriptJSObjectWindow() {
- Object object = null;
-
- AppletExecutionContext appletExecutionContext = getAppletExecutionContext();
- if(appletExecutionContext != null)
- object = appletExecutionContext.getJavaScriptJSObjectWindow();
-
- return object;
- }
-}
diff --git a/sj2/stardiv/applet/DocumentProxy.java b/sj2/stardiv/applet/DocumentProxy.java
deleted file mode 100644
index 02017c4898..0000000000
--- a/sj2/stardiv/applet/DocumentProxy.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: DocumentProxy.java,v $
- * $Revision: 1.4 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.applet;
-
-import java.awt.Toolkit;
-import java.awt.Image;
-
-import java.applet.Applet;
-import java.applet.AppletContext;
-import java.applet.AudioClip;
-
-import java.io.IOException;
-
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Observer;
-import java.util.Observable;
-import java.util.Iterator;
-import java.io.InputStream;
-
-import java.net.URL;
-
-import com.sun.star.lib.sandbox.Cachable;
-import com.sun.star.lib.sandbox.ExecutionContext;
-import com.sun.star.lib.sandbox.WeakRef;
-import com.sun.star.lib.sandbox.WeakTable;
-import com.sun.star.lib.sandbox.ResourceProxy;
-
-public class DocumentProxy implements AppletContext, Cachable, Observer, LiveConnectable {
- static private int instances;
-
- synchronized static public DocumentProxy getDocumentProxy(URL url, Toolkit toolkit) {
- DocumentProxy documentProxy = (DocumentProxy)WeakTable.get("Document: " + url);
-
- if(documentProxy == null) {
- documentProxy = new DocumentProxy(url, toolkit);
- WeakTable.put("Document: " + url, documentProxy);
- }
-
- return documentProxy;
- }
-
- // AppletContext. This method is new since 1.4. We insert it so as to
- // have the project buildable
- public void setStream( String key,InputStream stream)
- throws java.io.IOException {
- }
- // AppletContext. This method is new since 1.4. We insert it so as to
- // have the project buildable
- public InputStream getStream( String key) {
- return null;
- }
- // AppletContext. This method is new since 1.4. We insert it so as to
- // have the project buildable
- public Iterator getStreamKeys() {
- return null;
- }
-
-
- /*
- ** interface cachable methods
- */
- private Document document;
- private WeakRef weakRef;
-
- public DocumentProxy() {
- instances ++;
- }
-
- public Object getHardObject() {
- return document;
- }
-
- public void setWeakRef(WeakRef weakRef) {
- document = (Document)weakRef.getRef();
-
- weakRef.incRefCnt();
- this.weakRef = weakRef;
- }
-
- public void finalize() {
- weakRef.decRefCnt();
- instances --;
- }
-
- /*
- ** DocumentProxy methods
- */
- private Toolkit toolkit;
-
- private DocumentProxy(URL url, Toolkit toolkit) {
- this();
- document = new Document(url, toolkit);
- }
-
- void addExecutionContext(ExecutionContext executionContext, String name) {
- document.addExecutionContext(executionContext, name);
- }
-
- void removeExecutionContext(String name) {
- document.removeExecutionContext(name);
- }
-
- public URL getDocumentBase() {
- return document.getDocumentBase();
- }
-
- /*
- ** AppletContext interface methods
- */
- public Applet getApplet(String name) {
- return ((AppletExecutionContext)document.getExecutionContext(name)).getApplet();
- }
-
- public Enumeration getApplets() {
- return new Enumeration() {
- Enumeration contexts = document.getExecutionContexts();
-
- public boolean hasMoreElements() {
- return contexts.hasMoreElements();
- }
-
- public Object nextElement() {
- return ((AppletExecutionContext)contexts.nextElement()).getApplet();
- }
- };
- }
-
- public AudioClip getAudioClip(URL url) {
- return document.getAudioClip(url);
- }
-
- public Image getImage(URL url) {
- return document.getImage(url);
- }
-
- public void showDocument(URL url) {
- document.showDocument(url);
- }
-
- /**
- * Get the javascript environment for this applet.
- */
- /*
- public native Object getJavaScriptJSObjectWindow();
- public native void appletResize( int width, int height );
- public native void showDocument( URL url, String aTarget );
- public native void showStatus( String status );
- */
-
- public void showDocument(URL url, String aTarget) {
- document.showDocument(url, aTarget);
- }
-
- public void showStatus(String status) {
- document.showStatus(status);
- }
-
- public void update(Observable observable, Object object) {
- showStatus((String)object);
- }
-
- public Object getJavaScriptJSObjectWindow() {
- return document.getJavaScriptJSObjectWindow();
- }
-}
-
diff --git a/sj2/stardiv/applet/LiveConnectable.java b/sj2/stardiv/applet/LiveConnectable.java
deleted file mode 100644
index aca30e16ec..0000000000
--- a/sj2/stardiv/applet/LiveConnectable.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: LiveConnectable.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package stardiv.applet;
-
-/**
- * LiveConnectable interface .
- *
- * @version 1.0, 21/04/98
- * @author Markus Meyer
- */
-
-public interface LiveConnectable
-{
- public Object getJavaScriptJSObjectWindow();
-}
-
-
diff --git a/sj2/stardiv/applet/makefile.mk b/sj2/stardiv/applet/makefile.mk
deleted file mode 100644
index 3096d15ece..0000000000
--- a/sj2/stardiv/applet/makefile.mk
+++ /dev/null
@@ -1,78 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.4 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sj2
-TARGET=applet
-
-PACKAGE=stardiv$/applet
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(JDK)" == "gcj"
-all:
- @echo This dir cannot be build with gcj because of com.sun.star.lib.sandbox.ResourceProxy
-.ELSE
-
-# --- Files --------------------------------------------------------
-
-JARFILES= \
- sandbox.jar
-
-JAVAFILES=\
- AppletExecutionContext.java \
- Document.java \
- DocumentProxy.java \
- LiveConnectable.java
-
-#.IF "$(GUI)"=="WNT"
-#JAVAFILES += WNativeAppletViewerFrame.java
-#.ENDIF
-
-JAVACLASSFILES= \
- $(CLASSDIR)$/$(PACKAGE)$/DocumentProxy.class \
- $(CLASSDIR)$/$(PACKAGE)$/Document.class \
- $(CLASSDIR)$/$(PACKAGE)$/LiveConnectable.class \
- $(CLASSDIR)$/$(PACKAGE)$/AppletExecutionContext.class
-
-.ENDIF
-
-#.IF "$(GUI)"=="WNT"
-#JAVACLASSFILES += $(CLASSDIR)$/stardiv$/applet$/WNativeAppletViewerFrame.class
-#.ENDIF
-
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
diff --git a/sj2/stardiv/applet/resources/MsgAppletViewer.java b/sj2/stardiv/applet/resources/MsgAppletViewer.java
deleted file mode 100644
index 18a2a8495d..0000000000
--- a/sj2/stardiv/applet/resources/MsgAppletViewer.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: MsgAppletViewer.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.applet.resources;
-
-import java.util.ListResourceBundle;
-
-public class MsgAppletViewer extends ListResourceBundle {
-
- public Object[][] getContents() {
- return contents;
- }
-
- static final Object[][] contents = {
- {"textframe.button.dismiss", "Dismiss"},
- {"appletviewer.tool.title", "Applet Viewer: {0}"},
- {"appletviewer.menu.applet", "Applet"},
- {"appletviewer.menuitem.restart", "Restart"},
- {"appletviewer.menuitem.reload", "Reload"},
- {"appletviewer.menuitem.stop", "Stop"},
- {"appletviewer.menuitem.save", "Save..."},
- {"appletviewer.menuitem.start", "Start"},
- {"appletviewer.menuitem.clone", "Clone..."},
- {"appletviewer.menuitem.tag", "Tag..."},
- {"appletviewer.menuitem.info", "Info..."},
- {"appletviewer.menuitem.edit", "Edit"},
- {"appletviewer.menuitem.encoding", "Character Encoding"},
- {"appletviewer.menuitem.print", "Print..."},
- {"appletviewer.menuitem.props", "Properties..."},
- {"appletviewer.menuitem.close", "Close"},
- {"appletviewer.menuitem.quit", "Quit"},
- {"appletviewer.label.hello", "Hello..."},
- {"appletviewer.status.start", "starting applet..."},
- {"appletviewer.appletsave.err1", "serializing an {0} to {1}"},
- {"appletviewer.appletsave.err2", "in appletSave: {0}"},
- {"appletviewer.applettag", "Tag shown"},
- {"appletviewer.applettag.textframe", "Applet HTML Tag"},
- {"appletviewer.appletinfo.applet", "-- no applet info --"},
- {"appletviewer.appletinfo.param", "-- no parameter info --"},
- {"appletviewer.appletinfo.textframe", "Applet Info"},
- {"appletviewer.appletprint.printjob", "Print Applet"},
- {"appletviewer.appletprint.fail", "Printing failed."},
- {"appletviewer.appletprint.finish", "Finished printing."},
- {"appletviewer.appletprint.cancel", "Printing cancelled."},
- {"appletviewer.appletencoding", "Character Encoding: {0}"},
- {"appletviewer.init.err", "[no appletviewer.properties file found!]"},
- {"appletviewer.parse.warning.requiresname", "Warning: <param name=... value=...> tag requires name attribute."},
- {"appletviewer.parse.warning.paramoutside", "Warning: <param> tag outside <applet> ... </applet>."},
- {"appletviewer.parse.warning.requirescode", "Warning: <applet> tag requires code attribute."},
- {"appletviewer.parse.warning.requiresheight", "Warning: <applet> tag requires height attribute."},
- {"appletviewer.parse.warning.requireswidth", "Warning: <applet> tag requires width attribute."},
- {"appletviewer.parse.warning.appnotLongersupported", "Warning: <app> tag no longer supported, use <applet> instead:"},
- {"appletviewer.usage", "usage: appletviewer [-debug] [-J<javaflag>] [-encoding <character encoding type> ] url|file ..."},
- {"appletviewer.main.err.inputfile", "No input files specified."},
- {"appletviewer.main.err.badurl", "Bad URL: {0} ( {1} )"},
- {"appletviewer.main.err.io", "I/O exception while reading: {0}"},
- {"appletviewer.main.err.readablefile", "Make sure that {0} is a file and is readable."},
- {"appletviewer.main.err.correcturl", "Is {0} the correct URL?"},
- {"appletviewer.main.warning", "Warning: No Applets were started. Make sure the input contains an <applet> tag."},
- {"appletpanel.runloader.err", "Either object or code parameter!"},
- {"appletpanel.runloader.exception", "exception while deserializing {0}"},
- {"appletpanel.destroyed", "Applet destroyed."},
- {"appletpanel.loaded", "Applet loaded."},
- {"appletpanel.started", "Applet started."},
- {"appletpanel.inited", "Applet initialized."},
- {"appletpanel.stopped", "Applet stopped."},
- {"appletpanel.disposed", "Applet disposed."},
- {"appletpanel.nocode", "APPLET tag missing CODE parameter."},
- {"appletpanel.notfound", "load: class {0} not found."},
- {"appletpanel.nocreate", "load: {0} can''t be instantiated."},
- {"appletpanel.noconstruct", "load: {0} is not public or has no public constructor."},
- {"appletpanel.death", "killed"},
- {"appletpanel.exception", "exception: {0}."},
- {"appletpanel.exception2", "exception: {0}: {1}."},
- {"appletpanel.error", "error: {0}."},
- {"appletpanel.error2", "error: {0}: {1}."},
- {"appletpanel.notloaded", "Init: applet not loaded."},
- {"appletpanel.notinited", "Start: applet not initialized."},
- {"appletpanel.notstarted", "Stop: applet not started."},
- {"appletpanel.notstopped", "Destroy: applet not stopped."},
- {"appletpanel.notdestroyed", "Dispose: applet not destroyed."},
- {"appletpanel.notdisposed", "Load: applet not disposed."},
- {"appletpanel.bail", "Interrupted: bailing out."},
- {"appletpanel.filenotfound", "File not found when looking for: {0}"},
- {"appletpanel.fileformat", "File format exception when loading: {0}"},
- {"appletpanel.fileioexception", "I/O exception when loading: {0}"},
- {"appletpanel.fileexception", "{0} exception when loading: {1}"},
- {"appletpanel.filedeath", "{0} killed when loading: {1}"},
- {"appletpanel.fileerror", "{0} error when loading: {1}"},
- {"appletillegalargumentexception.objectinputstream", "AppletObjectInputStream requires non-null loader"},
- {"appletprops.title", "AppletViewer Properties"},
- {"appletprops.label.http.server", "Http proxy server:"},
- {"appletprops.label.http.proxy", "Http proxy port:"},
- {"appletprops.label.network", "Network access:"},
- {"appletprops.choice.network.item.none", "None"},
- {"appletprops.choice.network.item.applethost", "Applet Host"},
- {"appletprops.choice.network.item.unrestricted", "Unrestricted"},
- {"appletprops.label.class", "Class access:"},
- {"appletprops.choice.class.item.restricted", "Restricted"},
- {"appletprops.choice.class.item.unrestricted", "Unrestricted"},
- {"appletprops.label.unsignedapplet", "Allow unsigned applets:"},
- {"appletprops.choice.unsignedapplet.no", "No"},
- {"appletprops.choice.unsignedapplet.yes", "Yes"},
- {"appletprops.button.apply", "Apply"},
- {"appletprops.button.cancel", "Cancel"},
- {"appletprops.button.reset", "Reset"},
- {"appletprops.apply.exception", "Failed to save properties: {0}"},
- };
-}
diff --git a/sj2/stardiv/applet/resources/makefile.mk b/sj2/stardiv/applet/resources/makefile.mk
deleted file mode 100644
index af89ef8a80..0000000000
--- a/sj2/stardiv/applet/resources/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sj2
-TARGET=applet_resource
-
-PACKAGE=stardiv$/applet$/resources
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-JAVAFILES=\
- MsgAppletViewer.java
-
-JAVACLASSFILES=\
- $(CLASSDIR)$/$(PACKAGE)$/MsgAppletViewer.class
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/sj2/stardiv/controller/SjSettings.java b/sj2/stardiv/controller/SjSettings.java
deleted file mode 100644
index 74d570353b..0000000000
--- a/sj2/stardiv/controller/SjSettings.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: SjSettings.java,v $
- * $Revision: 1.8 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-package stardiv.controller;
-
-import java.util.Properties;
-import java.util.Hashtable;
-import java.util.Enumeration;
-
-import com.sun.star.lib.sandbox.SandboxSecurity;
-
-/**
- * Ueber diese Klasse werden alle globalen Einstellungen, die fuer das Sj Projekt
- * wichtig sind, dokumentiert und modifiziert.
- *
- * @version $Version: 1.0 $
- * @author Markus Meyer
- *
- */
-public class SjSettings {
- /**
- * The following properties are used to setup the environment for
- * the stardiv packages.<BR>
- * "appletviewer.security.mode"="unrestricted" | "host" | "none": Set the
- * security level of the default SecurityManager. The default is "host".<BR>
- * "stardiv.security.defaultSecurityManager"="true" | "false": Create and set
- * the stardiv.security.AppletSecurity, if the property is "true". This occures
- * only in the first call.<BR>
- * "stardiv.security.noExit"="true" | "false": no exit is allowed. Use this property
- * if you are running more than one java application in the virtual machine. This occures
- * only in the first call.<BR>
- * "stardiv.security.disableSecurity"="true" | "false": disable security checking. Only usefull
- * if a SecurityManager is installed. The default is "false".<BR>
- * if you are running more than one java application in the virtual machine. This occures
- * only in the first call.<BR>
- * "stardiv.js.debugOnError"="true" | "false": Start the javascript ide, if an error
- * occures. The default is "false".<BR>
- * "stardiv.js.debugImmediate"="true" | "false": Start the javascript ide, if a script
- * starts. The default is "false".<BR>
- * "stardiv.debug.trace"="messageBox" | "window" | "file" | "none": The trace pipe is
- * set to one of the four mediums. The Default is "none".<BR>
- * "stardiv.debug.error"="messageBox" | "window" | "file" | "none": The error pipe is
- * set to one of the four mediums. The Default is "none".<BR>
- * "stardiv.debug.warning"="messageBox" | "window" | "file" | "none": The warning pipe is
- * set to one of the four mediums. The Default is "none".<BR>
- * If the properties http.proxyHost, http.proxyPort, http.maxConnections,
- * http.keepAlive or http.nonProxyHosts are changed, the method
- * sun.net.www.http.HttpClient.resetProperties() is called.<BR>
- * If the properties ftpProxySet, ftpProxyHost or ftpProxyPort are changed,
- * the static variables useFtpProxy, ftpProxyHost and ftpProxyPort in the class
- * sun.net.ftp.FtpClient are set.<BR>
- * <B>If you are writing your own SecurityManager and ClassLoader, please implement the
- * interfaces stardiv.security.ClassLoaderExtension and
- * stardiv.security.SecurityManagerExtension. Be shure to set the
- * stardiv.security.ClassLoaderFactory, to enable dynamic class loading, otherwise
- * the stardiv.security.AppletClassLoader is used. Set the factory with
- * SjSettings.setClassLoaderFactory().</B>
- */
- static public synchronized void changeProperties( Properties pChangeProps )
- {
- SecurityManager pSM = System.getSecurityManager();
- if( pSM != null )
- pSM.checkPropertiesAccess();
- Properties props = new Properties( System.getProperties() );
- boolean bInited = Boolean.getBoolean( "stardiv.controller.SjSettings.inited" );
-
-
- if( !bInited )
- {
- // check the awt.toolkit property: if none is set use com.sun.star.comp.jawt.peer.Toolkit
- //if ( props.getProperty("awt.toolkit") == null )
- // props.put("awt.toolkit", "com.sun.star.comp.jawt.peer.Toolkit");
-
- // Define a number of standard properties
- props.put("acl.read", "+");
- props.put("acl.read.default", "");
- props.put("acl.write", "+");
- props.put("acl.write.default", "");
-
- // Standard browser properties
- props.put("browser", "stardiv.applet.AppletViewerFrame");
- props.put("browser.version", "4.02");
- props.put("browser.vendor", "Sun Microsystems, Inc.");
- props.put("http.agent", "JDK/1.1");
-
- // Define which packages can be accessed by applets
- props.put("package.restrict.access.sun", "true");
- props.put("package.restrict.access.netscape", "true");
- props.put("package.restrict.access.stardiv", "true");
-
- // Define which packages can be extended by applets
- props.put("package.restrict.definition.java", "true");
- props.put("package.restrict.definition.sun", "true");
- props.put("package.restrict.definition.netscape", "true");
- props.put("package.restrict.definition.stardiv", "true");
-
- // Define which properties can be read by applets.
- // A property named by "key" can be read only when its twin
- // property "key.applet" is true. The following ten properties
- // are open by default. Any other property can be explicitly
- // opened up by the browser user setting key.applet=true in
- // ~/.hotjava/properties. Or vice versa, any of the following can
- // be overridden by the user's properties.
- props.put("java.version.applet", "true");
- props.put("java.vendor.applet", "true");
- props.put("java.vendor.url.applet", "true");
- props.put("java.class.version.applet", "true");
- props.put("os.name.applet", "true");
- props.put("os.version.applet", "true");
- props.put("os.arch.applet", "true");
- props.put("file.separator.applet", "true");
- props.put("path.separator.applet", "true");
- props.put("line.separator.applet", "true");
-
- }
-
- // put new and changed properties to the property table
- if( pChangeProps != null )
- {
- Enumeration aEnum = pChangeProps.propertyNames();
- while( aEnum.hasMoreElements() )
- {
- String aKey = (String)aEnum.nextElement();
- props.put( aKey, pChangeProps.getProperty( aKey ) );
- }
- }
-
- // Install a property list.
- if( !bInited )
- props.put( "stardiv.controller.SjSettings.inited", "true" );
- System.setProperties(props);
- if( !bInited )
- {
- // Security Manager setzten
- boolean bNoExit = Boolean.getBoolean( "stardiv.security.noExit" );
- //Create and install the security manager
- if (System.getSecurityManager() == null)
- System.setSecurityManager(new SandboxSecurity(bNoExit));
-
-// if( Boolean.getBoolean("stardiv.controller.installConsole") )
-// Console.installConsole();
- }
- }
-
- private static boolean equalsImpl( Object p1, Object p2 )
- {
- return p1 == p2 || (p1 != null && p2 != null && p1.equals( p2 ) );
- }
-}
-
-
-
diff --git a/sj2/stardiv/controller/makefile.mk b/sj2/stardiv/controller/makefile.mk
deleted file mode 100644
index 8776f7f7fd..0000000000
--- a/sj2/stardiv/controller/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.6 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sj2
-TARGET=controller
-
-PACKAGE=stardiv$/controller
-JARFILES=sandbox.jar tkt.jar
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-.IF "$(JDK)" == "gcj"
-all:
- @echo This dir cannot be build with gcj because of com.sun.star.lib.sandbox.ResourceProxy
-.ELSE
-
-# --- Files --------------------------------------------------------
-
-JAVACLASSFILES= \
- $(CLASSDIR)$/$(PACKAGE)$/SjSettings.class
-
-# --- Targets ------------------------------------------------------
-.ENDIF
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/sj2/stardiv/security/resources/MsgAppletViewer.java b/sj2/stardiv/security/resources/MsgAppletViewer.java
deleted file mode 100644
index 89671d38fe..0000000000
--- a/sj2/stardiv/security/resources/MsgAppletViewer.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: MsgAppletViewer.java,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-package stardiv.security.resources;
-
-import java.util.ListResourceBundle;
-
-/* Alle Resourcen aus AppletClassLoader, Applet und AppletSecurityException.
-*/
-public class MsgAppletViewer extends ListResourceBundle {
-
- public Object[][] getContents() {
- return contents;
- }
-
- static final Object[][] contents = {
- {"appletclassloader.loadcode.verbose", "Opening stream to: {0} to get {1}"},
- {"appletclassloader.filenotfound", "File not found when looking for: {0}"},
- {"appletclassloader.fileformat", "File format exception when loading: {0}"},
- {"appletclassloader.fileioexception", "I/O exception when loading: {0}"},
- {"appletclassloader.fileexception", "{0} exception when loading: {1}"},
- {"appletclassloader.filedeath", "{0} killed when loading: {1}"},
- {"appletclassloader.fileerror", "{0} error when loading: {1}"},
- {"appletclassloader.findclass.verbose.findclass", "{0} find class {1}"},
- {"appletclassloader.findclass.verbose.openstream", "Opening stream to: {0} to get {1}"},
- {"appletclassloader.getresource.verbose.forname", "AppletClassLoader.getResource for name: {0}"},
- {"appletclassloader.getresource.verbose.found", "Found resource: {0} as a system resource"},
- {"appletclassloader.getresourceasstream.verbose", "Found resource: {0} as a system resource"},
- {"appletioexception.loadclass.throw.interrupted", "class loading interrupted: {0}"},
- {"appletioexception.loadclass.throw.notloaded", "class not loaded: {0}"},
- {"appletsecurityexception.checkcreateclassloader", "Security Exception: classloader"},
- {"appletsecurityexception.checkaccess.thread", "Security Exception: thread"},
- {"appletsecurityexception.checkaccess.threadgroup", "Security Exception: threadgroup: {0}"},
- {"appletsecurityexception.checkexit", "Security Exception: exit: {0}"},
- {"appletsecurityexception.checkexec", "Security Exception: exec: {0}"},
- {"appletsecurityexception.checklink", "Security Exception: link: {0}"},
- {"appletsecurityexception.checkpropsaccess", "Security Exception: properties"},
- {"appletsecurityexception.checkpropsaccess.key", "Security Exception: properties access {0}"},
- {"appletsecurityexception.checkread.exception1", "Security Exception: {0}, {1}"},
- {"appletsecurityexception.checkread.exception2", "Security Exception: file.read: {0}"},
- {"appletsecurityexception.checkread", "Security Exception: file.read: {0} == {1}"},
- {"appletsecurityexception.checkwrite.exception", "Security Exception: {0}, {1}"},
- {"appletsecurityexception.checkwrite", "Security Exception: file.write: {0} == {1}"},
- {"appletsecurityexception.checkread.fd", "Security Exception: fd.read"},
- {"appletsecurityexception.checkwrite.fd", "Security Exception: fd.write"},
- {"appletsecurityexception.checklisten", "Security Exception: socket.listen: {0}"},
- {"appletsecurityexception.checkaccept", "Security Exception: socket.accept: {0}:{1}"},
- {"appletsecurityexception.checkconnect.networknone", "Security Exception: socket.connect: {0}->{1}"},
- {"appletsecurityexception.checkconnect.networkhost1", "Security Exception: Couldn''t connect to {0} with origin from {1}."},
- {"appletsecurityexception.checkconnect.networkhost2", "Security Exception: Couldn''t resolve IP for host {0} or for {1}. "},
- {"appletsecurityexception.checkconnect.networkhost3", "Security Exception: Could not resolve IP for host {0}. See the trustProxy property."},
- {"appletsecurityexception.checkconnect", "Security Exception: connect: {0}->{1}"},
- {"appletsecurityexception.checkpackageaccess", "Security Exception: cannot access package: {0}"},
- {"appletsecurityexception.checkpackagedefinition", "Security Exception: cannot define package: {0}"},
- {"appletsecurityexception.cannotsetfactory", "Security Exception: cannot set factory"},
- {"appletsecurityexception.checkmemberaccess", "Security Exception: check member access"},
- {"appletsecurityexception.checkgetprintjob", "Security Exception: getPrintJob"},
- {"appletsecurityexception.checksystemclipboardaccess", "Security Exception: getSystemClipboard"},
- {"appletsecurityexception.checkawteventqueueaccess", "Security Exception: getEventQueue"},
- {"appletsecurityexception.checksecurityaccess", "Security Exception: security operation: {0}"},
- {"appletsecurityexception.getsecuritycontext.unknown", "unknown class loader type. unable to check for getContext"},
- {"appletsecurityexception.checkread.unknown", "unknown class loader type. unable to check for checking read {0}"},
- {"appletsecurityexception.checkconnect.unknown", "unknown class loader type. unable to check for checking connect"},
- };
-}
diff --git a/sj2/stardiv/security/resources/makefile.mk b/sj2/stardiv/security/resources/makefile.mk
deleted file mode 100644
index f57edbbc4a..0000000000
--- a/sj2/stardiv/security/resources/makefile.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.3 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sj2
-TARGET=security_resource
-
-PACKAGE=stardiv$/security$/resources
-
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-JAVAFILES=\
- MsgAppletViewer.java
-
-JAVACLASSFILES=\
- $(CLASSDIR)$/stardiv$/security$/resources$/MsgAppletViewer.class
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-
diff --git a/sj2/util/makefile.mk b/sj2/util/makefile.mk
deleted file mode 100644
index 9a74eb31b0..0000000000
--- a/sj2/util/makefile.mk
+++ /dev/null
@@ -1,97 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.16 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=sj2
-TARGET=sj
-TARGETTYPE=GUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-LIB1TARGET= $(SLB)$/$(TARGET).lib
-LIB1FILES= \
- $(SLB)$/jscpp.lib
-
-SHL1DEPN= $(LIB1TARGET)
-
-SHL1TARGET= j$(DLLPOSTFIX)_g
-SHL1IMPLIB= $(TARGET)
-
-SHL1STDLIBS= \
- $(VCLLIB) \
- $(TOOLSLIB) \
- $(CPPULIB) \
- $(SALLIB)
-
-.IF "$(GUI)$(COMID)"=="WNTMSC"
-SHL1STDLIBS+= \
- $(SVTOOLLIB)
-.ENDIF # "$(GUI)$(COMID)"=="WNTMSC"
-
-.IF "$(SOLAR_JAVA)"!=""
- SHL1STDLIBS+=$(JVMACCESSLIB)
-.ENDIF
-
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
-DEFLIB1NAME =$(TARGET)
-DEF1DES =JavaCPP
-DEF1CEXP =Java
-
-JARTARGET=classes.jar
-JARCLASSDIRS=stardiv
-JARCLASSPATH = sandbox.jar
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-.INCLUDE : target.pmk
-
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo Making: $@
- @echo WEP>$@
- @echo LIBMAIN>>$@
- @echo LibMain>>$@
- @echo bad_alloc::bad_alloc>>$@
- @echo exception::exception>>$@
-.IF "$(COM)"=="MSC"
- @echo __CT>>$@
- @echo _C@>>$@
-.ENDIF
diff --git a/sj2/util/makefile.pmk b/sj2/util/makefile.pmk
deleted file mode 100644
index 6976b55b38..0000000000
--- a/sj2/util/makefile.pmk
+++ /dev/null
@@ -1,46 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.pmk,v $
-#
-# $Revision: 1.5 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-JAVAPREPRO=
-.IF "$(JDK_VERSION)" == "110"
-JAVAPREPRO=-jdk11
-.ENDIF
-.IF "$(PRODUCT)" != ""
-JAVAPREPRO=$(JAVAPREPRO) + " -product"
-.ENDIF
-
-ENABLE_EXCEPTIONS=TRUE
-
-JARFILES=sandbox.jar tkt.jar
-
-# --- Settings -----------------------------------------------------
-.INCLUDE : settings.mk
-
diff --git a/sj2/util/target.pmk b/sj2/util/target.pmk
deleted file mode 100644
index 56da244699..0000000000
--- a/sj2/util/target.pmk
+++ /dev/null
@@ -1,42 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: target.pmk,v $
-#
-# $Revision: 1.3 $
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-.IF "$(depend)" == ""
-ONLYZIP: $(SLOFILES)
- cd $(PRJ)$/util
- nmake debug=t
-
-TEST:
-
-DOC:
-
-PREPRO:
- $(JAVAI) $(JAVACPS) $(CLASSPATH) stardiv.app.Javac $(JAVAPREPRO) $(JAVAFILES)
-.ENDIF