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_paneview.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: includefile for Paneview-testing
38 '**************************************************************************************
39 ' #1 tiMinimize_Maximize_Docking_SlidePane
40 ' #1 tiMinimize_Maximize_Docking_TaskPane
41 ' #1 tdMinimize_Maximize_Docking_Pagepane
42 ' #1 tiPaneview_LoadSave_Windowsstate
43 ' #1 tdPaneview_LoadSave_Windowsstate
44 '\*************************************************************************************
46 testcase tiMinimize_Maximize_Docking_SlidePane
52 printlog "- SlidePane : using all possible things to manipulate the SlidePane"
55 if (Slides.isVisible = false) Then 'isReallyVisible ?
56 qaErrorLog "- Expected SlidePane to be open; But is closed. Check tests."
57 Kontext "DocumentImpress"
61 printlog "SlidePane was open - good."
65 'Only because of overflow-error when some part of the pane is outside the window.
67 if Slides.IsDocked then Slides.UnDock
72 xSize% = Slides.GetSizeX
73 ySize% = Slides.GetSizeY
74 xPos% = Slides.GetPosX
75 yPos% = Slides.GetPosY
89 Slides.Size xSize%, ySize%
92 printlog " - Close the SlidePane, reopen it, check if appearence is same as before"
93 xPos% = Slides.GetPosX
94 yPos% = Slides.GetPosY
95 xSize% = Slides.GetSizeX
96 ySize% = Slides.GetSizeY
97 Kontext "DocumentImpress"
102 if xPos% <> Slides.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Slides.GetPosX
103 if yPos% <> Slides.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Slides.GetPosY
104 if xSize% <> Slides.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Slides.GetSizeX
105 if ySize% <> Slides.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Slides.GetSizeY
107 printlog " - dock SlidePane"
110 if (NOT Slides.IsDocked) then
111 Warnlog "SlidePane not docked but should be"
113 if (Slides.IsDocked) Then
118 printlog " - maximize/minimize SlidePane"
123 if (NOT Slides.IsMax) then
124 Warnlog "The Slides-docking-window did not return to maximized state"
127 Kontext "DocumentImpress"
131 if (Slides.isVisible = false) Then 'isReallyVisible ?
132 warnlog "the Slidepane wasnt visible"
135 Slides.Move xPos%, yPos%
137 if (Slides.IsDocked = True) then
138 warnlog "the SlidePane was docked - should have been undocked."
140 printlog "the SlidePane was not docked, good."
144 endcase 'tiMinimize_Maximize_Docking_SlidePane
146 '------------------------------------------------------------------------------------'
148 testcase tiMinimize_Maximize_Docking_TaskPane
154 printlog "- TaskPane : using all possible things to manipulate the TaskPane"
157 if (Tasks.isVisible = false) Then 'isReallyVisible ?
158 qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests."
160 Kontext "DocumentImpress"
163 printlog "TaskPane was open - good."
167 'Only because of overflow-error when some part of the pane is outside the window.
168 if Tasks.IsDocked then Tasks.UnDock
172 xSize% = Tasks.GetSizeX
173 ySize% = Tasks.GetSizeY
175 xPos% = Tasks.GetPosX
176 yPos% = Tasks.GetPosY
189 Tasks.Size xSize%, ySize%
192 printlog " - Close the TaskPane, reopen it, check if appearence is same as before"
193 xPos% = Tasks.GetPosX
194 yPos% = Tasks.GetPosY
195 xSize% = Tasks.GetSizeX
196 ySize% = Tasks.GetSizeY
197 Kontext "DocumentImpress"
202 if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX
203 if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY
204 if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX
205 if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY
207 printlog " - dock TaskPane"
210 if (NOT Tasks.IsDocked) then
211 Warnlog "TaskPane not docked but should be"
213 if (Tasks.IsDocked) Then
218 printlog " - maximize/minimize TaskPane"
223 if (NOT Tasks.IsMax) then
224 Warnlog "The Task-docking-window did not return to maximized state"
228 Kontext "DocumentImpress"
232 if (Tasks.isVisible = false) Then 'isReallyVisible ?
233 warnlog "the Taskpane wasnt visible"
235 Tasks.Move xPos%, yPos%
237 if (Tasks.IsDocked = True) then
238 warnlog "the TaskPane was docked - should have been undocked."
240 printlog "the TaskPane was not docked, good."
244 endcase 'tiMinimize_Maximize_Docking_TaskPane
246 '------------------------------------------------------------------------------------'
248 testcase tiPaneview_LoadSave_Windowsstate
249 QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated."
255 Dim Filenamex as string
256 dim applicationchar as string
258 Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion")
260 printlog "- TaskPane : using all possible things to manipulate the TaskPane"
263 if (Tasks.isVisible = false) Then 'isReallyVisible ?
264 qaErrorLog "- Expected TaskPane to be open; But is closed. Check tests."
266 Kontext "DocumentImpress"
269 printlog "TaskPane was open - good."
273 'Only because of overflow-error when some part of the pane is outside the window.
275 if Tasks.IsDocked then Tasks.UnDock
279 xSize% = Tasks.GetSizeX
280 ySize% = Tasks.GetSizeY
282 xPos% = Tasks.GetPosX
283 yPos% = Tasks.GetPosY
293 printlog " - Close the TaskPane, reopen it, check if appearence is same as before"
294 xPos% = Tasks.GetPosX
295 yPos% = Tasks.GetPosY
296 xSize% = Tasks.GetSizeX
297 ySize% = Tasks.GetSizeY
299 if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file
301 printlog "OK saved at ", Filenamex
306 hDateiOeffnen (Filenamex + "." + ExtensionString)
309 if (Tasks.IsVisible = false) then
310 warnlog "Taskpanel wasnt visible"
311 Kontext "DocumentImpress"
315 printlog "Taskpanel was visible, good"
319 if xPos% <> Tasks.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Tasks.GetPosX
320 if yPos% <> Tasks.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Tasks.GetPosY
321 if xSize% <> Tasks.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Tasks.GetSizeX
322 if ySize% <> Tasks.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Tasks.GetSizeY
324 Tasks.Size xSize%, ySize%
327 printlog " - dock TaskPane"
332 '----------------------------------------------------------------------------------------'
334 testcase tdPaneview_LoadSave_Windowsstate
335 QaErrorLog "#i84057# - tiPaneview_LoadSave_Windowsstate deactivated."
341 Dim Filenamex as string
343 Filenamex = ConvertPath (gOfficePath + "user\work\Task-postion")
345 printlog "- Pagepane : using all possible things to manipulate the Pagepane"
348 if (Pagepane.isVisible = false) Then 'isReallyVisible ?
349 qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests."
351 Kontext "DocumentDraw"
354 printlog "Pagepane was open - good."
357 'Only because of overflow-error when some part of the pane is outside the window.
359 if Pagepane.IsDocked then Pagepane.UnDock
365 xSize% = Pagepane.GetSizeX
366 ySize% = Pagepane.GetSizeY
368 xPos% = Pagepane.GetPosX
369 yPos% = Pagepane.GetPosY
370 Pagepane.Size 200, 100
373 Pagepane.Size 300, 150
375 Pagepane.Move 550, 290
378 printlog " - Close the Pagepane, reopen it, check if appearence is same as before"
379 xPos% = Pagepane.GetPosX
380 yPos% = Pagepane.GetPosY
381 xSize% = Pagepane.GetSizeX
382 ySize% = Pagepane.GetSizeY
384 if Dir(Filenamex)<>"" then app.Kill(Filenamex) ' kill old file
386 printlog "OK saved at ", Filenamex
391 hDateiOeffnen (Filenamex + "." + ExtensionString)
394 if (Pagepane.IsVisible = false) then
395 warnlog "Pagepane wasnt visible"
396 Kontext "DocumentDraw"
400 printlog "Pagepane was visible, good"
404 if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX
405 if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY
406 if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX
407 if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY
409 Pagepane.Size xSize%, ySize%
412 printlog " - dock Pagepane"
415 endcase 'tdPaneview_LoadSave_Windowsstate
417 '--------------------------------------------------------------------------------------'
419 testcase tdMinimize_Maximize_Docking_Pagepane
425 printlog "- Pagepane : using all possible things to manipulate the Pagepane"
428 if (Pagepane.isVisible = false) Then 'isReallyVisible ?
429 qaErrorLog "- Expected Pagepane to be open; But is closed. Check tests."
431 Kontext "DocumentDraw"
434 printlog "Pagepane was open - good."
438 'Only because of overflow-error when some part of the pane is outside the window.
440 if Pagepane.IsDocked then Pagepane.UnDock
445 xPos% = Pagepane.GetPosX
446 yPos% = Pagepane.GetPosY
447 xSize% = Pagepane.GetSizeX
448 ySize% = Pagepane.GetSizeY
449 Pagepane.Move 300, 400
451 Pagepane.Move 590, 790
453 Pagepane.Move xPos%, yPos%
456 Pagepane.Size 200, 200
458 Pagepane.Size 300, 400
460 Pagepane.Size 150, 250
462 Pagepane.Size xSize%, ySize%
465 printlog " - Close the Pagepane, reopen it, check if appearence is same as before"
466 xPos% = Pagepane.GetPosX
467 yPos% = Pagepane.GetPosY
468 xSize% = Pagepane.GetSizeX
469 ySize% = Pagepane.GetSizeY
470 Kontext "DocumentDraw"
475 if xPos% <> Pagepane.GetPosX then Warnlog "The x-Pos. has changed : Should be -> "+ xPos% + " Is -> "+ Pagepane.GetPosX
476 if yPos% <> Pagepane.GetPosY then Warnlog "The y-Pos. has changed : Should be -> "+ yPos% + " Is -> "+ Pagepane.GetPosY
477 if xSize% <> Pagepane.GetSizeX then Warnlog "The x-Size has changed : Should be -> "+ xSize% + " Is -> "+ Pagepane.GetSizeX
478 if ySize% <> Pagepane.GetSizeY then Warnlog "Die y-Size has changed : Should be -> "+ ySize% + " Is -> "+ Pagepane.GetSizeY
480 printlog " - dock Pagepane"
483 if (NOT Pagepane.IsDocked) then
484 Warnlog "Pagepane not docked but should be"
486 if (Pagepane.IsDocked) Then
491 printlog " - maximize/minimize Pagepane"
496 if (NOT Pagepane.IsMax) then
497 warnlog "The Pagepane-docking-window did not return to maximized state"
499 Kontext "DocumentDraw"
503 if Pagepane.Exists(5) Then
504 warnlog "the Pagepane wasnt closed properly"
506 Kontext "DocumentDraw"
511 if (Pagepane.Exists = true) AND (Pagepane.isVisible = false) Then
512 warnlog "the Pagepane wasnt visible"
515 if (Pagepane.IsDocked = True) then
516 warnlog "the Pagepane was docked - should have been undocked."
518 printlog "the Pagepane was not docked, good."
522 endcase 'tdMinimize_Maximize_Docking_Pagepane
524 '--------------------------------------------------------------------------------------'
525 'TODO FHA : testcase tClick_everywhere
527 ' Kontext "LayerTabBar"
534 'Slides:SlidesControl
536 ' SlidesControl.MouseClick
538 ' View = same as slidescontrol
539 ' LayoutsPreview HID_SD_TASK_PANE_PREVIEW_LAYOUTS
540 'endcase 'tClick_everywhere
541 '--------------------------------------------------------------------------------------'