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: g_navigator.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 10:42:40 $
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 : wolfram.garten@sun.com
36 '* short description :
38 '**************************************************************************************
40 ' #1 tViewNavigatorZOrder
41 ' #1 tViewNavigatorNameActivated
42 ' #1 tViewNavigatorGroupedObjects
43 '\*************************************************************************************
45 testcase tdViewNavigator
46 dim position1 as integer
47 dim zaehler as integer
48 dim Ueber_Text_1 as string
49 dim Ueber_Text_2 as string
50 dim Ueber_Text_3 as string
51 dim Ueber_Text_4 as string
52 dim Ueber_Text_5 as string
53 dim Ueber_Text_6 as string
59 Case 1: Position1 = 20
60 Case 2: Position1 = 30
61 Case 3: Position1 = 40
63 ContextPositionAndSize
65 active.SetPage TabPositionAndSize
66 kontext "TabPositionAndSize"
68 Case 1: Ueber_Text_4 = PositionX.GetText
69 Case 2: Ueber_Text_5 = PositionX.GetText
70 Case 3: Ueber_Text_6 = PositionX.GetText
72 printlog " CHECK: Xposition i: "+Zaehler+": "+PositionX.GetText
77 hTypekeys "<Pagedown>"
83 Kontext "NavigatorDraw"
84 if NavigatorDraw.exists (5) then printlog "OK"
85 Ueber_Text_2 = "OK First"
86 Ueber_Text_3 = "First doesnt work"
87 Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
89 Kontext "NavigatorDraw"
90 Ueber_Text_2 = "OK Next"
91 Ueber_Text_3 = "Next doesnt work"
92 Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
93 Kontext "NavigatorDraw"
95 Ueber_Text_2 = "OK Last"
96 Ueber_Text_3 = "Last doesnt work"
97 Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
99 Kontext "NavigatorDraw"
101 Ueber_Text_1 = Ueber_Text_5
102 Ueber_Text_2 = "OK Before this"
103 Ueber_Text_3 = "Before this doesnt work"
104 Call Position_Vergleichen (Ueber_Text_1,Ueber_Text_2,Ueber_Text_3)
107 Kontext "NavigatorDraw"
111 hTypeKeys "<SHIFT MOD1 F5>"
112 Warnlog "- Unable to reach the Navigator, tried to use the keyboard Shortcut (MOD1 F5) to close it."
116 if Navigator.exists then
118 Warnlog "Navigator: should be closed at this point, but was not."
120 printlog "Navigator: Not available - Good."
125 endcase 'tdViewNavigator
127 '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
129 testcase tViewNavigatorZOrder
130 qaerrorlog "Not yet ready."
134 dim Counter as integer
135 dim MaxCounter as integer
136 dim PositionName as string
137 dim CheckingValue as string
147 Call hRechteckErstellen ((zPosition(Counter)), (zPosition(Counter)), 60, 60)
149 printlog "Name the Objects according to their Z-Order. (" +Counter + ")"
153 if hMenuFindSelect(27027, true, 16) = false then
154 Warnlog "Context-Menu-entry `Rename` was not found. Therefore the test ends."
158 kontext "NameDlgObject"
159 NameField.SetText "Object" + Counter
166 Kontext "NavigatorDraw"
167 if (gApplication = "IMPRESS") then
169 warnlog "- the Navigator was open, check earlier ran tests for inconsistency."
170 hTypeKeys "<SHIFT MOD1 F5>"
172 hTypeKeys "<SHIFT MOD1 F5>"
175 Kontext "NavigatorDraw"
177 Warnlog "- the Navigator was open, check earlier ran tests for inconsistency."
184 ' * Check if the Navigator contains the 'Show Shapes' drop down menu.
186 kontext "NavigatorDraw"
189 MaxCounter = MenuGetItemCount
190 if MaxCounter <> 0 then
191 For Counter = 1 to MaxCounter
192 printlog "Entry (Dragmode): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found."
199 Shapesfilter.OpenMenu
200 MaxCounter = MenuGetItemCount
201 For Counter = 1 to MaxCounter
202 printlog "Entry (Shapesfilter): '" + (MenuGetItemText(MenuGetItemID (Counter))) + "' Found."
210 kontext "NavigatorDraw"
212 'Main part of the Navigator: the list with it's contents.
214 Liste.TypeKeys "<PAGEDOWN>"
215 CheckingValue = Liste.GetSelText
216 printlog CheckingValue
218 Liste.TypeKeys "<RIGHT>"
219 Liste.TypeKeys "<DOWN>"
220 CheckingValue = Liste.GetSelText
221 printlog CheckingValue
222 Liste.TypeKeys "<DOWN>"
223 CheckingValue = Liste.GetSelText
224 printlog CheckingValue
225 Liste.TypeKeys "<DOWN>"
226 CheckingValue = Liste.GetSelText
227 printlog CheckingValue
228 Liste.TypeKeys "<DOWN>"
229 CheckingValue = Liste.GetSelText
230 printlog CheckingValue
234 '*NavigatorDraw HID_SD_NAVIGATOR
235 'NavigatorToolboxDraw HID_SD_NAVIGATOR_TBX
236 'Stift HID_SD_NAVIGATOR_TBI_PEN
237 'Erste HID_SD_NAVIGATOR_TBI_FIRST
238 'Vorherige HID_SD_NAVIGATOR_TBI_PREV
239 'Naechste HID_SD_NAVIGATOR_TBI_NEXT
240 'Letzte HID_SD_NAVIGATOR_TBI_LAST
242 'Context-menu framställbar?
243 'Dragmodus HID_SD_NAVIGATOR_TBI_DRAGTYPE
245 'Liste HID_SD_NAVIGATOR_TLB
247 'Den undre scroll-delen.
248 'Dokumentliste HID_SD_NAVIGATOR_LB
250 ' * the drop down menu must contain the entries 'Named shapes' and 'All Shapes'
259 ' * check if 'Named shapes' is selected by default
261 ' * insert 5 shapes in the Document. the shapes should overlap slightly.
262 ' * there must be no entry in the navigator
263 ' * name 1 shape (context menu of the shape / name...)
264 ' * there must appear 1 entry 'under' the corresponding slide in the navigator
265 ' * Select All shapes in the Show shapes drop down menu
266 ' * there must be 5 shapes in the navigator
267 ' * change the order of the shapes in the navigator
268 ' * the z-order of the shapes must stay
269 ' * delete 1 shape from the slide
270 ' * the automatic generated names of the shapes must change and no shape name must be duplicate. The changed shape name must stay
272 ' * select 2 shapes and group them
273 ' * an entry with a small plus in front must appear in the navigator
274 ' * click on the plus
275 ' * there must be an additional tree with the 2 shapes of the group
278 endcase 'tViewNavigatorZOrder
280 '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
282 testcase tViewNavigatorNameActivated
283 qaerrorlog "Not yet ready."
285 dim zPosition1 as integer
286 dim zPosition2 as integer
287 dim zPosition3 as integer
288 dim zPosition4 as integer
289 dim counter as integer
293 Call hRechteckErstellen ( Position1, Position1, 60, 60)
295 endcase 'tViewNavigatorNameActivated
297 '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
299 testcase tViewNavigatorGroupedObjects
300 qaerrorlog "Not yet ready."
302 dim zPosition1 as integer
303 dim zPosition2 as integer
304 dim zPosition3 as integer
305 dim zPosition4 as integer
306 dim counter as integer
310 Call hRechteckErstellen ( Position1, Position1, 60, 60)
313 endcase 'tViewNavigatorGroupedObjects
315 '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------