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 : gregor.hartmann@oracle.com
30 '* short description : global update/resource test
32 '\******************************************************************************
34 testcase tHelp_DialogTest
36 printlog( "Resource test for the Help Browser" )
42 warnlog( "Help not open, aborting test" )
44 if ( Active.exists( 2 ) ) then
45 printlog( "Msgbox: " & Active.getText() )
51 hSelectHelpTab( "content" )
52 hSelectHelpTab( "index" )
53 hSelectHelpTab( "find" )
54 hSelectHelpTab( "bookmarks" )
57 brc = hSelectHelpTab( "content" )
58 call DialogTest( ContentPage )
60 brc = hSelectHelpTab( "index" )
61 call DialogTest( IndexPage )
63 brc = hSelectHelpTab( "find" )
64 call DialogTest( FindPage )
66 brc = hSelectHelpTab( "bookmarks" )
67 call DialogTest( BookmarksPage )
69 Kontext "StarOfficeHelp"
74 '*******************************************************************************
76 testcase tHelp_ToolBar
78 printlog( "Resource test for the help toolbar" )
81 dim iExitCounter as integer : iExitCounter = 0
85 warnlog( "Help not open, aborting test" )
87 if ( Active.exists( 2 ) ) then
88 printlog( "Msgbox: " & Active.getText() )
95 kontext "starofficehelp"
96 printlog "- Index -> on"
100 printlog "- Index -> off"
103 ' Backward- and Forward-button
104 printlog "- activate 'Index'-page"
105 brc = hSelectHelpTab( "index" )
107 do while( SearchIndex.getItemCount() < 100 )
108 iExitCounter = iExitCounter + 1 : if ( iExitCounter = 20 ) then exit do
112 SearchIndex.Select( 4 )
116 printlog "- backward"
124 printlog "- first page"
128 ' the print-dialog must be shown ( if direct-printing is activated => BUG )
132 if ( Active.Exists ( 1 ) ) then
133 qaerrorlog( "Unexpected messagebox: " & Active.getText() )
134 qaerrorlog( "Probably missing default printer on this system, fix it!" )
139 if ( Printing.exists( 2 ) ) then
140 printlog( "Print dialog open, good." )
143 warnlog( "Print dialog not open" )
147 printlog "- Set Bookmark"
150 kontext "AddBookmark"
151 call DialogTest ( AddBookmark )
158 '*******************************************************************************
160 testcase tHelp_Registration
162 ' Check i69670 which was a showstopper in OOo 2.0.4
163 ' Menu-entry "Help / Registration" is disabled
165 dim iCurrentMenuEntry as integer
166 dim iMenuEntryCount as integer
168 printlog "Check if all entries in Help Menu are enabled"
173 iMenuEntryCount = hMenuItemGetCount
175 printlog "Select the last entry 'Help'"
176 hMenuSelectNr( iMenuEntryCount )
177 iMenuEntryCount = hMenuItemGetCount
178 for iCurrentMenuEntry = 1 to iMenuEntryCount
179 if ( hMenuItemIsEnabled( iCurrentMenuEntry ) ) then
180 printlog "(" & iCurrentMenuEntry & "/" & iMenuEntryCount & _
181 "): Menu entry is enabled: Help-> " & hMenuItemGetText( iCurrentMenuEntry )
183 if (lcase(gPlatform) = "osx") then
184 warnlog "#i86247# Help->Registration is disabled on MacOS X"
186 warnlog "(" & iCurrentMenuEntry & "/" & iMenuEntryCount & _
187 "): Menu entry is not enabled: Help-> " & hMenuItemGetText( iCurrentMenuEntry )
190 next iCurrentMenuEntry