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: w_003_.inc,v $
13 '* last change: $Author: rt $ $Date: 2008-09-04 09:21:34 $
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 : helge.delfs@sun.com
36 '* short description : Testscripts connected to the View-Menu.
38 '\******************************************************************
42 printLog Chr(13) + "--------- View Menu (w_003_.inc) ----------"
43 gApplication = "WRITER"
52 Call tViewInputMethodStatus
55 Call tViewTextBoundaries
56 Call tViewFieldShadings
58 Call tViewNonprintingCharacters
59 Call tViewHiddenParagraphs
69 Call tHtmlDocViewHTMLSource
70 gApplication = "WRITER"
74 '------------------------------------------------------
77 printlog " open application"
79 printlog " type something into the document"
80 hTypekeys "<RETURN>", 3
82 printlog " View -> Zoom"
85 if ( Massstab.exists( 1 ) ) then
86 DialogTest ( Massstab )
87 select case uCASE(gApplication)
89 printlog " check checkbox '100%'"
90 Vergroesserung100.check
91 printlog " check checkbox 'Variable'"
92 VergroesserungStufenlos.check
94 printlog " check checkbox 'Optimal'"
96 printlog " check checkbox 'Fit height and width'"
98 printlog " check checkbox 'Fit Width'"
100 printlog " check checkbox '100%'"
101 Vergroesserung100.check
102 printlog " check checkbox 'Variable'"
103 VergroesserungStufenlos.check
104 printlog " click button MORE on 'Variable'"
106 printlog " click button 'Automatic'"
108 printlog " click button 'Single Page'"
110 printlog " click button 'Columns'"
112 printlog " click button MORE on 'Columns'"
114 printlog " click button LESS on 'Columns'"
116 printlog " Check checkbox 'Book mode'"
118 printlog " cancel dialog 'Zoom'"
122 warnlog( "Dialog <Massstab> is not available" )
124 printlog " close application"
128 '-----------------------------------------------------------
130 testcase tViewDataSources
131 PrintLog "- View / Data Sources"
132 printlog " Open new document"
134 printlog " View / Data Sources"
135 ViewCurrentDatabaseWriter
137 Kontext "DatabaseBeamer"
138 if ( DatabaseBeamer.Exists( 5 ) ) then
139 printlog " Close database beamer with : View Data Sources"
140 ViewCurrentDatabaseWriter
142 Kontext "DatabaseBeamer"
143 if ( DatabaseBeamer.Exists() ) then
144 Warnlog "Could not close Databasebeamer with same slot!"
147 Kontext "DatabaseBeamer"
148 if DatabaseBeamer.Exists then
149 Warnlog "Could not close Databasebeamer with Slot->View Beamer!"
152 printlog( "Closed Database Beamer dialog" )
155 Warnlog "Database Beamer has not been opened!"
158 printlog " Close active document"
162 '-----------------------------------------------------------
164 testcase tViewToolbars
165 PrintLog "- View / Toolbars"
168 printlog " Close all documents until only backing window is opened"
169 Do Until GetDocumentCount = 0
173 printlog " Open a new writer document"
176 printlog "- Toolbar 'Align'"
178 Call hToolbarSelect("Align", true)
180 Call hToolbarSelect("Align", false)
182 Call hToolbarSelect("Align", true, true)
184 printlog "- Toolbar 'Bullets And Numbering'"
186 Call hToolbarSelect("BulletsAndNumbering", true)
188 Call hToolbarSelect("BulletsAndNumbering", false)
190 Call hToolbarSelect("BulletsAndNumbering", true, true)
192 printlog "- Toolbar 'Drawing'"
194 Call hToolbarSelect("Drawing", true)
196 Call hToolbarSelect("Drawing", false)
198 Call hToolbarSelect("Drawing", true, true)
200 printlog "- Toolbar 'Drawing Object Properties'"
202 Call hToolbarSelect("DrawingObjectProperties", true)
204 Call hToolbarSelect("DrawingObjectProperties", false)
206 Call hToolbarSelect("DrawingObjectProperties", true, true)
208 printlog "- Toolbar 'Form Controls'"
210 Call hToolbarSelect("FormControls", true)
212 Call hToolbarSelect("FormControls", false)
214 Call hToolbarSelect("FormControls", true, true)
216 printlog "- Toolbar 'Form Design'"
218 Call hToolbarSelect("FormDesign", true)
220 Call hToolbarSelect("FormDesign", false)
222 Call hToolbarSelect("FormDesign", true, true)
224 printlog "- Toolbar 'Form Navigation'"
226 Call hToolbarSelect("FormNavigation", true)
228 Call hToolbarSelect("FormNavigation", false)
230 Call hToolbarSelect("FormNavigation", true, true)
232 ' The following toolbar is disabled because it will be found in all documents
233 ' therefore they can't be reactivated once deactivated
234 printlog "- Toolbar 'Formatting'"
236 Call hToolbarSelect("Formatting", true)
238 Call hToolbarSelect("Formatting", false)
240 Call hToolbarSelect("Formatting", true, true)
242 printlog "- Toolbar 'Frame'"
244 Call hToolbarSelect("Frame", true)
246 Call hToolbarSelect("Frame", false)
248 Call hToolbarSelect("Frame", true, true)
250 printlog "- Toolbar 'Insert'"
252 Call hToolbarSelect("Insert", true)
254 Call hToolbarSelect("Insert", false)
256 Call hToolbarSelect("Insert", true, true)
258 printlog "- Toolbar 'Insert Object'"
260 Call hToolbarSelect("InsertObject", true)
262 Call hToolbarSelect("InsertObject", false)
264 Call hToolbarSelect("InsertObject", true, true)
266 printlog "- Toolbar 'Media Playback'"
268 Call hToolbarSelect("MediaPlayback", true)
270 Call hToolbarSelect("MediaPlayback", false)
272 Call hToolbarSelect("MediaPlayback", true, true)
274 printlog "- Toolbar 'OLE Object'"
276 Call hToolbarSelect("OLEObject", true)
278 Call hToolbarSelect("OLEObject", false)
280 Call hToolbarSelect("OLEObject", true, true)
282 printlog "- Toolbar 'Page Preview'"
284 Call hToolbarSelect("PagePreview", true)
286 Call hToolbarSelect("PagePreview", false)
288 Call hToolbarSelect("PagePreview", true, true)
290 printlog "- Toolbar 'Picture'"
292 Call hToolbarSelect("Picture", true)
294 Call hToolbarSelect("Picture", false)
296 Call hToolbarSelect("Picture", true, true)
298 ' The following toolbar is disabled because it will be found in all documents
299 ' therefore they can't be reactivated once deactivated
300 printlog "- Toolbar 'Standard'"
302 Call hToolbarSelect("Standard", true)
304 Call hToolbarSelect("Standard", false)
306 Call hToolbarSelect("Standard", true, true)
308 printlog "- Toolbar 'Standard (Viewing Mode)'"
310 Call hToolbarSelect("StandardViewingMode", true)
312 Call hToolbarSelect("StandardViewingMode", false)
314 Call hToolbarSelect("StandardViewingMode", true, true)
316 printlog "- Toolbar 'Table'"
318 Call hToolbarSelect("Table", true)
320 Call hToolbarSelect("Table", false)
322 Call hToolbarSelect("Table", true, true)
324 printlog "- Toolbar 'Text Object'"
326 Call hToolbarSelect("TextObject", true)
328 Call hToolbarSelect("TextObject", false)
330 Call hToolbarSelect("TextObject", true, true)
332 printlog "- Toolbar 'Tools'"
334 Call hToolbarSelect("Tools", true)
336 Call hToolbarSelect("Tools", false)
338 Call hToolbarSelect("Tools", true, true)
340 printlog "- Toolbar 'Hyperlink Bar'"
342 Call hToolbarSelect("HyperlinkBar", true)
344 Call hToolbarSelect("HyperlinkBar", false)
346 Call hToolbarSelect("HyperlinkBar", true, true)
348 printlog "- Toolbar 'Formula'"
350 Call hToolbarSelect("MATH", true)
351 OL_SW_Rechenleiste.TypeKeys "<Enter>"
353 printlog " Close active document"
357 '-----------------------------------------------------------
359 testcase tViewTextBoundaries
360 PrintLog "- View / Text Boundaries"
361 printlog " Open new document"
363 printlog " View / Text Boundaries"
366 printlog " View / Text Boundaries"
368 printlog " Close active document"
372 '------------------------------------------------------
374 testcase tViewFieldShadings
375 PrintLog "- View / Field Shadings"
376 printlog " Open new document"
378 printlog " View / Field Shadings"
381 printlog " View / Field Shadings"
383 printlog " Close active document"
387 '------------------------------------------------------
390 PrintLog "- View / Fields"
391 printlog " Open new document"
393 printlog " View / Fields"
396 printlog " View / Fields"
398 printlog " Close active document"
402 '------------------------------------------------------
404 testcase tViewNonprintingCharacters
405 PrintLog "- View / Nonprinting Characters"
406 printlog " Open new document"
408 printlog " View / Nonprinting characters"
409 ViewNonprintingCharacters
411 printlog " View / Nonprinting characters"
412 ViewNonprintingCharacters
413 printlog " Close active document"
417 '-----------------------------------------------------------
419 testcase tViewHiddenParagraphs
420 printLog "- View / Hidden Paragraphs"
421 printlog " Open new document"
423 printlog " View / Hidden paragraphs "
426 printlog " View / Hidden paragraphs "
428 printlog " Close active document"
432 '-----------------------------------------------------------
434 testcase tViewWebLayout
435 PrintLog "- View / WebLayout"
436 printlog " Open new document"
438 printlog " View / Web Layout "
441 printlog " View / Online Layout "
443 printlog " Close active document"
447 '-----------------------------------------------------------
449 testcase tViewFullScreen
450 PrintLog "- View / Full Screen"
451 printlog " Open new document"
453 printlog " View / Full Screen "
456 printlog " View / Full Screen "
459 printlog " Close active document"
463 '-----------------------------------------------------------
465 testcase tViewPrintLayout
466 PrintLog "- View / Print Layout"
467 printlog " ONLY HTML-Document"
468 printlog " Open new document"
471 printlog " View / Print Layout "
474 printlog " View / Print Layout "
476 printlog " Close active document"
480 '-----------------------------------------------------------
482 testcase tViewStatusBar
483 PrintLog "- View / Status Bar"
484 printlog " Open new document"
486 printlog " View / Statusbar "
487 ViewToolbarsStatusbar
489 printlog " View / Print Layout "
490 ViewToolbarsStatusbar
491 printlog " Close active document"
495 '-----------------------------------------------------------
498 PrintLog "- View / Ruler"
500 printlog " Open new document"
502 printlog " View / Ruler "
505 printlog " View / Ruler "
508 printlog " Close active document"
512 '-----------------------------------------------------------
514 testcase tViewInputMethodStatus
515 PrintLog "- View / Input Method Status (only Solaris)"
516 if ( Ucase(gPlatform) <> "SOLARIS" ) then
517 printlog( "No testing for IME status for OS <> Solaris" )
521 PrintLog " Open new document"
523 PrintLog " View / View / Input Method Status"
525 ViewInputMethodStatus
527 Warnlog "Menuentry 'Input Method Status' is disabled!"
532 PrintLog " View / View / Input Method Status"
533 ViewInputMethodStatus
534 PrintLog " Close active document"
538 '-----------------------------------------------------------
540 testcase tViewHTMLSource
541 PrintLog "- View / HTML Source (only in HTML-Document)"
542 if ( gApplication <> "HTML" ) then
546 printlog "Open new document"
548 printlog "View / HTML-Source"
551 printlog "Save-As dialog has to come up"
552 Kontext "SpeichernDlg"
553 if ( SpeichernDlg.exists( 1 ) ) then
554 Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
555 printlog "Save sourcecode"
558 If Active.Exists then
559 if Active.GetRT = 304 then
563 Warnlog Active.Gettext
569 warnlog( "Dialog <SpeichernDlg> is not available" )
572 Kontext "DocumentHTMLSourceView"
573 DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
575 printlog "View / HTML-Source"
578 printlog "Close active document"
582 '-----------------------------------------------------------
584 testcase tHtmlDocViewZoom
585 gApplication = "HTML"
586 printlog " open application"
588 printlog " type something into the document"
589 hTypekeys "<RETURN>", 3
591 printlog " View -> Zoom"
594 if ( Massstab.exists( 1 ) ) then
595 DialogTest ( Massstab )
596 printlog " check checkbox '100%'"
597 Vergroesserung100.check
598 printlog " check checkbox 'Variable'"
599 VergroesserungStufenlos.check
602 warnlog( "Dialog <Massstab> is not available" )
604 printlog " close application"
606 gApplication = "WRITER"
609 '-----------------------------------------------------------
611 testcase tHtmlDocViewHTMLSource
612 PrintLog "- View / HTML Source (only in HTML-Document)"
613 gApplication = "HTML"
614 printlog "Open new document"
616 printlog "View / HTML-Source"
619 printlog "Save-As dialog has to come up"
620 printlog "Save sourcecode"
621 Kontext "SpeichernDlg"
622 Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
625 If Active.Exists then
626 if Active.GetRT = 304 then
630 Warnlog Active.Gettext
636 Kontext "DocumentHTMLSourceView"
637 DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
639 printlog "View / HTML-Source"
642 printlog "Close active document"
644 gApplication = "WRITER"
647 '-----------------------------------------------------------