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 : Display each help topic
32 '\******************************************************************************
34 testcase tHelpRessourceTest( iCurrentAboutItem as integer )
36 printlog( "Resource test for help topics - display all topics" )
38 dim iTopicCount as integer
39 dim iCurrentTopic as integer
40 dim cCurrentTopic as string
41 dim cPreviousTopic as string
42 dim cCurrentAboutItem as string
47 warnlog( "Help not open, aborting test" )
51 brc = hSelectHelpTab( "index" )
53 warnlog( "There was a problem switching to the index tabpage" )
57 HelpAbout.select( iCurrentAboutItem )
60 cCurrentAboutItem = HelpAbout.getSelText()
62 printlog( " * Current Application: " & cCurrentAboutItem )
64 iTopicCount = SearchIndex.getItemcount()
65 printlog( "For this application " & iTopicCount & " pages will be loaded." )
68 cPreviousTopic = "<not yet set>"
69 for iCurrentTopic = 1 to iTopicCount
72 SearchIndex.Select( iCurrentTopic )
73 cCurrentTopic = SearchIndex.getSelText()
75 warnlog( "Failed to select entry at " & iCurrentTopic )
76 printlog( "Previous entry: " & cPreviousTopic )
84 warnlog( "#i105476# - Failed to display index item (fatal):" )
85 printlog( " - Index...........: " & iCurrentTopic )
86 printlog( " - Topic (current).: " & cCurrentTopic )
87 printlog( " - Topic (previous): " & cPreviousTopic )
88 call ExitRestartTheOffice()
92 cPreviousTopic = cCurrentTopic
98 warnlog( "There was a problem closing the help viewer" )
101 call ExitRestartTheOffice()