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: tools_options.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:04 $
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 : Verify that the applications appear in tools/options
38 '\******************************************************************************
40 testcase tUpdtOptionItems
42 '///<h3>Verify that the applications appear in tools/option</h3>
46 dim iDocType as integer
47 dim cDocType as string
48 dim iAppItems as integer
51 dim iAppCount( DOCTYPES ) as integer
52 iAppCount( 1 ) = 8 ' writer
53 iAppCount( 2 ) = 7 ' calc
54 iAppCount( 3 ) = 7 ' impress
55 iAppCount( 4 ) = 7 ' draw
56 iAppCount( 5 ) = 7 ' math
57 iAppCount( 6 ) = 8 ' masterdoc
58 iAppCount( 7 ) = 8 ' html
60 '///+<li>Step through all main applications and do</li>
62 for iDocType = 1 to DOCTYPES
64 '///<li>Create a new document</li>
66 printlog( hNumericDocType( iDocType ) )
69 '///+<li>Open Tools/Options</li>
72 '///+<li>Retrieve the number of listed applications from the applications list</li>
73 kontext "ExtrasOptionenDlg"
75 '///+<li>Collapse all nodes</li>
76 iAppItems = Optionsliste.getItemCount()
77 Optionsliste.typeKeys( "<HOME>" )
78 for iNodes = 1 to iAppItems
79 Optionsliste.typeKeys( "-" )
80 Optionsliste.typeKeys( "<DOWN>" )
84 '///+<li>Verify that the number is correct</li>
85 iAppItems = Optionsliste.getItemCount()
86 if ( iAppItems <> iAppCount( iDocType ) ) then
87 warnlog( "#i68068# The number of top nodes in Tools/Options is incorrect." )
88 printlog( "Found...: " & iAppItems )
89 printlog( "Expected: " & iAppCount( iDocType ) )
91 printlog( "The number of top nodes is correct." )
94 '///+<li>Close Tools/Options</li>
95 ExtrasOptionenDlg.cancel()
97 '///+<li>Close the document</li>