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 : thorsten.bosbach@oracle.com
30 '* short description : Resource test of toolbar behavior
32 '\************************************************************************
34 testcase tToolbarBehavior
39 printlog hMenuSelectNr(3)
40 printlog hMenuSelectNr(3)
41 printlog hMenuSelectNr(-1)
43 if active.exists(5) then
44 active.setPage TabCustomizeMenu
45 if TabCustomizeMenu.exists(5) then
46 printlog "All Tooolbars are available."
47 TabCustomizeMenu.cancel
49 printlog "Resetet Toolbars."
52 printlog "Toolbars resetet"
54 kontext "TableObjectBar"
55 if TableObjectBar.exists(5) then
56 warnlog "Toolbar is already available?"
58 printlog "Toolbar is not available"
61 kontext "TabelleEinfuegenWriter"
62 if TabelleEinfuegenWriter.exists (5) then
63 TabelleEinfuegenWriter.ok
68 kontext "TableObjectBar"
69 if TableObjectBar.exists(5) then
70 printlog "Toolbar is available."
72 warnlog "Toolbar is not available"
75 if NOT TableObjectBar.isDocked then
77 printlog "Toolbar got docked, to use thier kontext menu"
79 TableObjectBar.openContextMenu
80 printlog hMenuSelectNr(-1)
81 kontext "TableObjectBar"
82 if TableObjectBar.exists(5) then
83 warnlog "Toolbar is still available"
85 printlog "Toolbar is not available"
87 hTypeKeys("<mod1 end><mod1 end>")
88 kontext "TableObjectBar"
89 if TableObjectBar.exists(5) then
90 warnlog "Toolbar is still available"
92 printlog "Toolbar is not available"
94 hTypeKeys("<mod1 home>")
95 kontext "TableObjectBar"
96 if TableObjectBar.exists(5) then
97 printlog "Toolbar is available."
99 warnlog "Toolbar is not available"
102 Call hToolbarSelect ( "Table", false )
103 kontext "TableObjectBar"
104 if TableObjectBar.exists(5) then
105 warnlog "Toolbar is still available"
107 printlog "Toolbar is not available"
110 hTypeKeys("<mod1 end><mod1 end>")
111 kontext "TableObjectBar"
112 if TableObjectBar.exists(5) then
113 warnlog "Toolbar is available again"
115 printlog "Toolbar is not available"
118 hTypeKeys("<mod1 home>")
119 kontext "TableObjectBar"
120 if TableObjectBar.exists(5) then
121 warnlog "Toolbar is available again"
123 printlog "Toolbar is not available"
128 printlog hMenuSelectNr(3)
129 printlog hMenuSelectNr(3)
130 printlog hMenuSelectNr(-1)
132 if active.exists(5) then
133 active.setPage TabCustomizeMenu
134 if TabCustomizeMenu.exists(5) then
135 warnlog "Can't reset toolbars"
136 TabCustomizeMenu.cancel
138 printlog "Resetet Toolbars."
141 printlog "Toolbars resetet"
143 kontext "TableObjectBar"
144 if TableObjectBar.exists(5) then
145 printlog "Toolbar is available."
147 warnlog "Toolbar is not available"