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 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: scripting_basics.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : joerg.skottke@sun.com
36 '* short description : Quick short test for the scripting framework
38 '\******************************************************************************
42 '///<h1>Very short test to verify that the scripting framework is present</h1>
43 '///<i>Additionally we verify that the document "Untitled1" is present
44 '///+ in the organizers</i><br><br>
47 const ORGANIZER_ITEMS = 2
49 '///+<li>Make sure we are on the backing window</li>
52 '///+<li>Open Script Organizer for Beanshell</li>
53 ToolsMacrosOrganizeMacrosBeanShell
55 '///+<li>Access the TreeList and close the dialog with cancel</li>
56 Kontext "ScriptOrganizer"
57 if ( ScriptOrganizer.exists( 5 ) ) then
58 printlog( "Beanshell Script Organizer is present. Good" )
59 if ( ScriptTreeList.getItemCount() <> ORGANIZER_ITEMS ) then
60 warnlog( "The Treelist does not contain the expected number " & _
61 "of items. Please verify that exactly three top-nodes exist" )
63 ScriptOrganizer.cancel()
65 warnlog( "Script Organizer for Beanshell is missing" )
68 '///+<li>Open Script Organizer for JavaScript</li>
69 ToolsMacrosOrganizeMacrosJavaScript
71 '///+<li>Access the TreeList and close the dialog with cancel</li>
72 Kontext "ScriptOrganizer"
73 if ( ScriptOrganizer.exists( 5 ) ) then
74 printlog( "JavaScript Script Organizer is present. Good" )
75 if ( ScriptTreeList.getItemCount() <> ORGANIZER_ITEMS ) then
76 warnlog( "The Treelist does not contain the expected number " & _
77 "of items. Please verify that exactly three top-nodes exist" )
79 ScriptOrganizer.cancel()
81 warnlog( "Script Organizer for JavaScript is missing" )