1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 ' Copyright 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : Tools->Options: OpenOffice.org Java
32 '\******************************************************************************
35 dim bJavaState as boolean
38 hToolsOptions( "StarOffice", "Java" )
40 printlog( "Verify that Java is enabled and configured" )
41 if ( usejava.isChecked() = false ) then
42 warnlog( "Java should be enabled by default, checking and restarting" )
43 bJavaState = hChangeJavaState( true )
44 if ( bJavaState = false ) then
45 warnlog( "Java is still not enabled, aborting test." )
51 printlog( " Java is enabled. Good." )
54 ' Needs a delay, it might take some time until the listbox gets populated
57 ' There should be a java-runtime installed. If not -> leave test
58 printlog( "Make sure at least one Java runtime is installed" )
59 if ( javalist.getitemcount() = 0 ) then
60 warnlog( "No java listed in listbox, the test will stop" )
65 printlog( " Java is installed, good." )
68 printlog( "Quickly test that all controls are active" )
69 if ( add.isEnabled() ) then
70 printlog( " 'Add...' is enabled" )
72 warnlog( "The 'Add...' button is disabled" )
75 if ( parameters.isEnabled() ) then
76 printlog( " 'Parameters...' is enabled" )
78 warnlog( "The 'Parameters...' button is disabled" )
81 if ( classpath.isEnabled() ) then
82 printlog( " 'Class Path...' is enabled" )
84 warnlog( "The 'Class Path...' button is disabled" )
87 if ( JavaList.isEnabled() ) then
88 printlog( " 'JavaList' is enabled" )
90 warnlog( "The 'JavaList' button is disabled" )
97 '*******************************************************************************
99 function hChangeJavaState( bEnable as boolean ) as boolean
100 ' this little fella switches Java support on and off including a restart of
101 ' the office to make the change active. The state is returned
104 printlog( " Enable Java" )
107 printlog( " Disable Java" )
111 ' leave tools/options
112 printlog( " Leave Tools/Options" )
113 kontext "OptionenDlg"
116 ' restart the office to make the change take effect
117 printlog( " Restart the application" )
118 call exitRestartTheOffice()
120 ' return to java page
121 printlog( " Return to Tools/Options Java-page" )
123 hToolsOptions( "StarOffice", "Java" )
126 if ( useJava.isChecked() ) then
127 hChangeJavaState() = true
129 hChangeJavaState() = false