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: basic_shared_modules.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:13 $
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 : Access modules below OpenOffice.org macros
38 '\******************************************************************************
40 testcase tBasicSharedModules
42 '///<h3>Access modules below OpenOffice.org macros</h3>
43 '///Covers issues #i74058, #i74120 and #i74372
45 dim iObjectPosition as integer
46 dim iLibraryCount as integer
48 const EXPECTED_LIBRARY_COUNT = 12
51 '///+<li>Open a document to work on</li>
54 '///+<li>Open the basic organizer</li>
57 '///+<li>Select one of the internal macros</li>
59 iObjectPosition = hSelectNodeByName( MakroAus , "Depot" )
60 if ( iObjectPosition = 0 ) then
61 warnlog( "Could not find the specified node" )
65 '///+<li>Jump to the last node</li>
66 hSelectTheLastNode( MakroAus )
67 printlog( "Current node (Last node): " & MakroAus.getSelText() )
69 '///+<li>Select the next node (should be one of the modules below Depot)</li>
70 hSelectNode( MakroAus, iObjectPosition+1 )
71 printlog( "Current node (Depot/..): " & MakroAus.getSelText()
73 '///+<li>Click "Edit..."</li>
77 '///+<li>Check that we are on the BASIC-IDE</li>
79 if ( MacroBar.exists( 2 ) ) then
80 printlog( "Macro Bar is open." )
82 warnlog( "MacroBar is not open but we should be on the Basic IDE" )
85 '///+<li>Use the Library listbox (Jump to top)</li>
87 Library.typeKeys( "<HOME>" )
88 printlog( "Top entry = " & Library.getSelText() )
90 '///+<li>Get the number of items from the Library control</li>
91 iLibraryCount = Library.getItemCount()
92 printlog( "There are " & iLibraryCount & " items in the list" )
94 if ( iLibraryCount <> EXPECTED_LIBRARY_COUNT ) then
95 warnlog( "The number of items in the library-list is incorrect (should be 12): " & iLibraryCount )
98 '///+<li>Use the Library listbox (Jump to bottom)</li>
100 Library.select( iLibraryCount )
101 printlog( "Last entry = " & Library.getSelText() )
103 '///+<li>Close the Basic-IDE</li>
106 '///+<li>Close the document</li>