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 test (Standardbar)
32 '\***************************************************************************
34 testcase tStandardBar_2
36 printlog( "Extended toolbar test for the standardbar" )
38 if ( gtSysName = "Solaris x86" ) then
39 qaerrorlog( "#i62423# - New Database crashes office (Evolution)" )
43 dim iCurrentApplication as Integer
44 dim iNewButtonItem as Integer
45 dim iPresentItemCount as integer
47 hUseImpressAutopilot( false )
53 iPresentItemCount = hMenuItemGetCount()
55 warnlog( "Failed to access New-Button, skipping test" )
59 if ( iPresentItemCount <> 12 ) then
60 warnlog( "Items missing on New-Button, Expected: 12, Found: " & _
61 iPresentItemCount & " -> Running limited test!" )
62 iPresentItemCount = 8 ' the first eight usually work (no guarantee)
65 for iCurrentApplication = 1 to 7
68 printlog ( hNumericDoctype( iCurrentApplication ) )
71 for iNewButtonItem = 1 to iPresentItemCount
73 ' For some reason Impress needs an extra kick...
74 if ( iCurrentApplication = 3 ) then
75 kontext "documentimpress"
76 DocumentImpress.MouseDoubleClick ( 50, 50 )
79 printlog( "Click on the " & iNewButtonItem & ". item on the new-button" )
85 iPresentItemCount = hMenuItemGetCount()
87 warnlog( "Failed to access New-Button, skipping test" )
92 hMenuselectNr ( iNewButtonItem )
93 hFileWait() ' was sleep( 3 )
96 hCloseDialog( Navigator, "close,optional" )
98 select case iNewButtonItem
99 case 1 : Kontext "DocumentWriter"
100 DocumentWriter.TypeKeys( "Hallo" )
102 printlog( "- Writer document" )
103 case 2 : Kontext "DocumentCalc"
104 DocumentCalc.TypeKeys( "Hallo" )
106 printlog( "- Spreadsheet document" )
107 case 3 : Kontext "AutoPilotPraesentation1"
108 Kontext "DocumentImpress"
109 DocumentImpress.MouseDoubleClick ( 50, 50 )
111 printlog( "- Presentation document" )
112 case 4 : Kontext "DocumentDraw"
113 DocumentDraw.MouseDoubleClick ( 50, 50 )
115 printlog( "- Drawing document" )
116 case 5 : Kontext "DatabaseWizard"
118 printlog( "- Database wizard" )
119 case 6 : Kontext "DocumentWriter" ' HTML Document
120 DocumentWriter.TypeKeys( "Hallo" )
122 printlog( "- HTML document" )
123 case 7 : Kontext "DocumentWriter" ' XML Form
124 DocumentWriter.TypeKeys( "Hallo" )
126 printlog( "- XML Form" )
127 case 8 : Kontext "DocumentWriter" ' Master Document
128 DocumentWriter.TypeKeys( "Hallo" )
130 printlog( "- Master document" )
131 case 9 : SchreibenInMathdok "a over b"
133 printlog( "- Formula document" )
135 Active.SetPage( TabEtiketten )
136 kontext "tabetiketten"
137 TabEtiketten.Cancel()
138 printlog( "- Labels (Labels dialog)" )
140 Active.SetPage( TabEtikettenMedium )
141 kontext "tabetikettenmedium"
142 TabEtikettenMedium.Cancel()
143 printlog( "- Business cards (Labels dialog)" )
144 case 12 : Kontext "TemplateAndDocuments"
145 TemplateAndDocuments.cancel()
146 printlog( "- Template dialog" )
155 next iCurrentApplication