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: toolbar_behavior.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 : thorsten.bosbach@sun.com
36 '* short description : Resource test of toolbar behavior
38 '\************************************************************************
40 testcase tToolbarBehavior
41 '/// context sensitive ///'
44 '/// presupposion recover ///'
45 '/// if enabled: view->toolbars->reset ///'
48 printlog hMenuSelectNr(3)
49 printlog hMenuSelectNr(3)
50 printlog hMenuSelectNr(-1)
52 if active.exists(5) then
53 active.setPage TabCustomizeMenu
54 if TabCustomizeMenu.exists(5) then
55 printlog "All Tooolbars are available."
56 TabCustomizeMenu.cancel
58 printlog "Resetet Toolbars."
61 printlog "Toolbars resetet"
63 '/// writer with table ///'
64 '/// check, that toolbar is not available ///'
65 kontext "TableObjectBar"
66 if TableObjectBar.exists(5) then
67 warnlog "Toolbar is already available?"
69 printlog "Toolbar is not available"
72 kontext "TabelleEinfuegenWriter"
73 if TabelleEinfuegenWriter.exists (5) then
74 TabelleEinfuegenWriter.ok
79 '/// toolbar is available now ///'
80 kontext "TableObjectBar"
81 if TableObjectBar.exists(5) then
82 printlog "Toolbar is available."
84 warnlog "Toolbar is not available"
87 '/// close via toolbar->contextmenu->Close Toolbar ///'
88 if NOT TableObjectBar.isDocked then
90 printlog "Toolbar got docked, to use thier kontext menu"
92 TableObjectBar.openContextMenu
93 printlog hMenuSelectNr(-1)
94 kontext "TableObjectBar"
95 if TableObjectBar.exists(5) then
96 warnlog "Toolbar is still available"
98 printlog "Toolbar is not available"
100 '/// leave table ///'
101 hTypeKeys("<mod1 end><mod1 end>")
102 kontext "TableObjectBar"
103 if TableObjectBar.exists(5) then
104 warnlog "Toolbar is still available"
106 printlog "Toolbar is not available"
108 '/// enter table again -> toolbar is available again ///'
109 hTypeKeys("<mod1 home>")
110 kontext "TableObjectBar"
111 if TableObjectBar.exists(5) then
112 printlog "Toolbar is available."
114 warnlog "Toolbar is not available"
117 '/// close toolbar permanently ///'
118 Call hToolbarSelect ( "Table", false )
119 kontext "TableObjectBar"
120 if TableObjectBar.exists(5) then
121 warnlog "Toolbar is still available"
123 printlog "Toolbar is not available"
126 '/// leave table ///'
127 hTypeKeys("<mod1 end><mod1 end>")
128 kontext "TableObjectBar"
129 if TableObjectBar.exists(5) then
130 warnlog "Toolbar is available again"
132 printlog "Toolbar is not available"
135 '/// enter table again: still no toolbar ///'
136 hTypeKeys("<mod1 home>")
137 kontext "TableObjectBar"
138 if TableObjectBar.exists(5) then
139 warnlog "Toolbar is available again"
141 printlog "Toolbar is not available"
144 '/// choose view->toolbars->reset ///'
147 printlog hMenuSelectNr(3)
148 printlog hMenuSelectNr(3)
149 printlog hMenuSelectNr(-1)
151 if active.exists(5) then
152 active.setPage TabCustomizeMenu
153 if TabCustomizeMenu.exists(5) then
154 warnlog "Can't reset toolbars"
155 TabCustomizeMenu.cancel
157 printlog "Resetet Toolbars."
160 printlog "Toolbars resetet"
162 '/// toolbar is visible again ///'
163 kontext "TableObjectBar"
164 if TableObjectBar.exists(5) then
165 printlog "Toolbar is available."
167 warnlog "Toolbar is not available"