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: standardbar2.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:16 $
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 : global update test (Standardbar)
38 '\***************************************************************************
40 testcase tStandardBar_2
42 printlog( "Extended toolbar test for the standardbar" )
44 if ( gtSysName = "Solaris x86" ) then
45 qaerrorlog( "#i62423# - New Database crashes office (Evolution)" )
49 dim iCurrentApplication as Integer
50 dim iNewButtonItem as Integer
51 dim iPresentItemCount as integer
53 hUseImpressAutopilot( false )
59 iPresentItemCount = hMenuItemGetCount()
61 warnlog( "Failed to access New-Button, skipping test" )
65 if ( iPresentItemCount <> 12 ) then
66 warnlog( "Items missing on New-Button, Expected: 12, Found: " & _
67 iPresentItemCount & " -> Running limited test!" )
68 iPresentItemCount = 8 ' the first eight usually work (no guarantee)
71 for iCurrentApplication = 1 to 7
74 printlog ( hNumericDoctype( iCurrentApplication ) )
77 for iNewButtonItem = 1 to iPresentItemCount
79 ' For some reason Impress needs an extra kick...
80 if ( iCurrentApplication = 3 ) then
81 kontext "documentimpress"
82 DocumentImpress.MouseDoubleClick ( 50, 50 )
85 printlog( "Click on the " & iNewButtonItem & ". item on the new-button" )
91 iPresentItemCount = hMenuItemGetCount()
93 warnlog( "Failed to access New-Button, skipping test" )
98 hMenuselectNr ( iNewButtonItem )
103 select case iNewButtonItem
104 case 1 : Kontext "DocumentWriter"
105 DocumentWriter.TypeKeys( "Hallo" )
107 printlog( "- Writer document" )
108 case 2 : Kontext "DocumentCalc"
109 DocumentCalc.TypeKeys( "Hallo" )
111 printlog( "- Spreadsheet document" )
112 case 3 : Kontext "AutoPilotPraesentation1"
113 Kontext "DocumentImpress"
114 DocumentImpress.MouseDoubleClick ( 50, 50 )
116 printlog( "- Presentation document" )
117 case 4 : Kontext "DocumentDraw"
118 DocumentDraw.MouseDoubleClick ( 50, 50 )
120 printlog( "- Drawing document" )
121 case 5 : Kontext "DatabaseWizard"
123 printlog( "- Database wizard" )
124 case 6 : Kontext "DocumentWriter" ' HTML Document
125 DocumentWriter.TypeKeys( "Hallo" )
127 printlog( "- HTML document" )
128 case 7 : Kontext "DocumentWriter" ' XML Form
129 DocumentWriter.TypeKeys( "Hallo" )
131 printlog( "- XML Form" )
132 case 8 : Kontext "DocumentWriter" ' Master Document
133 DocumentWriter.TypeKeys( "Hallo" )
135 printlog( "- Master document" )
136 case 9 : SchreibenInMathdok "a over b"
138 printlog( "- Formula document" )
140 Active.SetPage( TabEtiketten )
141 kontext "tabetiketten"
142 TabEtiketten.Cancel()
143 printlog( "- Labels (Labels dialog)" )
146 kontext "tabetikettenmedium"
147 TabEtikettenMedium.Cancel()
148 printlog( "- Business cards (Labels dialog)" )
149 case 12 : Kontext "TemplateAndDocuments"
150 TemplateAndDocuments.cancel()
151 printlog( "- Template dialog" )
160 next iCurrentApplication