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 : helge.delfs@oracle.com
30 '* short description : Testscripts connected to the View-Menu.
32 '\******************************************************************
36 printLog Chr(13) + "--------- View Menu (w_003_.inc) ----------"
37 gApplication = "WRITER"
46 Call tViewInputMethodStatus
49 Call tViewTextBoundaries
50 Call tViewFieldShadings
52 Call tViewNonprintingCharacters
53 Call tViewHiddenParagraphs
63 Call tHtmlDocViewHTMLSource
64 gApplication = "WRITER"
68 '------------------------------------------------------
71 printlog " open application"
73 printlog " type something into the document"
74 hTypekeys "<RETURN>", 3
76 printlog " View -> Zoom"
79 if ( Massstab.exists( 1 ) ) then
80 DialogTest ( Massstab )
81 select case uCASE(gApplication)
83 printlog " check checkbox '100%'"
84 Vergroesserung100.check
85 printlog " check checkbox 'Variable'"
86 VergroesserungStufenlos.check
88 printlog " check checkbox 'Optimal'"
90 printlog " check checkbox 'Fit height and width'"
92 printlog " check checkbox 'Fit Width'"
94 printlog " check checkbox '100%'"
95 Vergroesserung100.check
96 printlog " check checkbox 'Variable'"
97 VergroesserungStufenlos.check
98 printlog " click button MORE on 'Variable'"
100 printlog " click button 'Automatic'"
102 printlog " click button 'Single Page'"
104 printlog " click button 'Columns'"
106 printlog " click button MORE on 'Columns'"
108 printlog " click button LESS on 'Columns'"
110 printlog " Check checkbox 'Book mode'"
112 printlog " cancel dialog 'Zoom'"
116 warnlog( "Dialog <Massstab> is not available" )
118 printlog " close application"
122 '-----------------------------------------------------------
124 testcase tViewDataSources
125 PrintLog "- View / Data Sources"
126 printlog " Open new document"
128 printlog " View / Data Sources"
129 ViewCurrentDatabaseWriter
131 Kontext "DatabaseBeamer"
132 if ( DatabaseBeamer.Exists( 5 ) ) then
133 printlog " Close database beamer with : View Data Sources"
134 ViewCurrentDatabaseWriter
136 Kontext "DatabaseBeamer"
137 if ( DatabaseBeamer.Exists() ) then
138 Warnlog "Could not close Databasebeamer with same slot!"
141 Kontext "DatabaseBeamer"
142 if DatabaseBeamer.Exists then
143 Warnlog "Could not close Databasebeamer with Slot->View Beamer!"
146 printlog( "Closed Database Beamer dialog" )
149 Warnlog "Database Beamer has not been opened!"
152 printlog " Close active document"
156 '-----------------------------------------------------------
158 testcase tViewToolbars
159 PrintLog "- View / Toolbars"
162 printlog " Close all documents until only backing window is opened"
163 Do Until GetDocumentCount = 0
167 printlog " Open a new writer document"
170 printlog "- Toolbar 'Align'"
172 Call hToolbarSelect("Align", true)
174 Call hToolbarSelect("Align", false)
176 Call hToolbarSelect("Align", true, true)
178 printlog "- Toolbar 'Bullets And Numbering'"
180 Call hToolbarSelect("BulletsAndNumbering", true)
182 Call hToolbarSelect("BulletsAndNumbering", false)
184 Call hToolbarSelect("BulletsAndNumbering", true, true)
186 printlog "- Toolbar 'Drawing'"
188 Call hToolbarSelect("Drawing", true)
190 Call hToolbarSelect("Drawing", false)
192 Call hToolbarSelect("Drawing", true, true)
194 printlog "- Toolbar 'Drawing Object Properties'"
196 Call hToolbarSelect("DrawingObjectProperties", true)
198 Call hToolbarSelect("DrawingObjectProperties", false)
200 Call hToolbarSelect("DrawingObjectProperties", true, true)
202 printlog "- Toolbar 'Form Controls'"
204 Call hToolbarSelect("FormControls", true)
206 Call hToolbarSelect("FormControls", false)
208 Call hToolbarSelect("FormControls", true, true)
210 printlog "- Toolbar 'Form Design'"
212 Call hToolbarSelect("FormDesign", true)
214 Call hToolbarSelect("FormDesign", false)
216 Call hToolbarSelect("FormDesign", true, true)
218 printlog "- Toolbar 'Form Navigation'"
220 Call hToolbarSelect("FormNavigation", true)
222 Call hToolbarSelect("FormNavigation", false)
224 Call hToolbarSelect("FormNavigation", true, true)
226 ' The following toolbar is disabled because it will be found in all documents
227 ' therefore they can't be reactivated once deactivated
228 printlog "- Toolbar 'Formatting'"
230 Call hToolbarSelect("Formatting", true)
232 Call hToolbarSelect("Formatting", false)
234 Call hToolbarSelect("Formatting", true, true)
236 printlog "- Toolbar 'Frame'"
238 Call hToolbarSelect("Frame", true)
240 Call hToolbarSelect("Frame", false)
242 Call hToolbarSelect("Frame", true, true)
244 printlog "- Toolbar 'Insert'"
246 Call hToolbarSelect("Insert", true)
248 Call hToolbarSelect("Insert", false)
250 Call hToolbarSelect("Insert", true, true)
252 printlog "- Toolbar 'Insert Object'"
254 Call hToolbarSelect("InsertObject", true)
256 Call hToolbarSelect("InsertObject", false)
258 Call hToolbarSelect("InsertObject", true, true)
260 printlog "- Toolbar 'Media Playback'"
262 Call hToolbarSelect("MediaPlayback", true)
264 Call hToolbarSelect("MediaPlayback", false)
266 Call hToolbarSelect("MediaPlayback", true, true)
268 printlog "- Toolbar 'OLE Object'"
270 Call hToolbarSelect("OLEObject", true)
272 Call hToolbarSelect("OLEObject", false)
274 Call hToolbarSelect("OLEObject", true, true)
276 printlog "- Toolbar 'Page Preview'"
278 Call hToolbarSelect("PagePreview", true)
280 Call hToolbarSelect("PagePreview", false)
282 Call hToolbarSelect("PagePreview", true, true)
284 printlog "- Toolbar 'Picture'"
286 Call hToolbarSelect("Picture", true)
288 Call hToolbarSelect("Picture", false)
290 Call hToolbarSelect("Picture", true, true)
292 ' The following toolbar is disabled because it will be found in all documents
293 ' therefore they can't be reactivated once deactivated
294 printlog "- Toolbar 'Standard'"
296 Call hToolbarSelect("Standard", true)
298 Call hToolbarSelect("Standard", false)
300 Call hToolbarSelect("Standard", true, true)
302 printlog "- Toolbar 'Standard (Viewing Mode)'"
304 Call hToolbarSelect("StandardViewingMode", true)
306 Call hToolbarSelect("StandardViewingMode", false)
308 Call hToolbarSelect("StandardViewingMode", true, true)
310 printlog "- Toolbar 'Table'"
312 Call hToolbarSelect("Table", true)
314 Call hToolbarSelect("Table", false)
316 Call hToolbarSelect("Table", true, true)
318 printlog "- Toolbar 'Text Object'"
320 Call hToolbarSelect("TextObject", true)
322 Call hToolbarSelect("TextObject", false)
324 Call hToolbarSelect("TextObject", true, true)
326 printlog "- Toolbar 'Tools'"
328 Call hToolbarSelect("Tools", true)
330 Call hToolbarSelect("Tools", false)
332 Call hToolbarSelect("Tools", true, true)
334 printlog "- Toolbar 'Hyperlink Bar'"
336 Call hToolbarSelect("HyperlinkBar", true)
338 Call hToolbarSelect("HyperlinkBar", false)
340 Call hToolbarSelect("HyperlinkBar", true, true)
342 printlog "- Toolbar 'Formula'"
344 Call hToolbarSelect("MATH", true)
345 OL_SW_Rechenleiste.TypeKeys "<Enter>"
347 printlog " Close active document"
351 '-----------------------------------------------------------
353 testcase tViewTextBoundaries
354 PrintLog "- View / Text Boundaries"
355 printlog " Open new document"
357 printlog " View / Text Boundaries"
360 printlog " View / Text Boundaries"
362 printlog " Close active document"
366 '------------------------------------------------------
368 testcase tViewFieldShadings
369 PrintLog "- View / Field Shadings"
370 printlog " Open new document"
372 printlog " View / Field Shadings"
375 printlog " View / Field Shadings"
377 printlog " Close active document"
381 '------------------------------------------------------
384 PrintLog "- View / Fields"
385 printlog " Open new document"
387 printlog " View / Fields"
390 printlog " View / Fields"
392 printlog " Close active document"
396 '------------------------------------------------------
398 testcase tViewNonprintingCharacters
399 PrintLog "- View / Nonprinting Characters"
400 printlog " Open new document"
402 printlog " View / Nonprinting characters"
403 ViewNonprintingCharacters
405 printlog " View / Nonprinting characters"
406 ViewNonprintingCharacters
407 printlog " Close active document"
411 '-----------------------------------------------------------
413 testcase tViewHiddenParagraphs
414 printLog "- View / Hidden Paragraphs"
415 printlog " Open new document"
417 printlog " View / Hidden paragraphs "
420 printlog " View / Hidden paragraphs "
422 printlog " Close active document"
426 '-----------------------------------------------------------
428 testcase tViewWebLayout
429 PrintLog "- View / WebLayout"
430 printlog " Open new document"
432 printlog " View / Web Layout "
435 printlog " View / Online Layout "
437 printlog " Close active document"
441 '-----------------------------------------------------------
443 testcase tViewFullScreen
444 PrintLog "- View / Full Screen"
445 printlog " Open new document"
447 printlog " View / Full Screen "
450 printlog " View / Full Screen "
453 printlog " Close active document"
457 '-----------------------------------------------------------
459 testcase tViewPrintLayout
460 PrintLog "- View / Print Layout"
461 printlog " ONLY HTML-Document"
462 printlog " Open new document"
465 printlog " View / Print Layout "
468 printlog " View / Print Layout "
470 printlog " Close active document"
474 '-----------------------------------------------------------
476 testcase tViewStatusBar
477 PrintLog "- View / Status Bar"
478 printlog " Open new document"
480 printlog " View / Statusbar "
481 ViewToolbarsStatusbar
483 printlog " View / Print Layout "
484 ViewToolbarsStatusbar
485 printlog " Close active document"
489 '-----------------------------------------------------------
492 PrintLog "- View / Ruler"
494 printlog " Open new document"
496 printlog " View / Ruler "
499 printlog " View / Ruler "
502 printlog " Close active document"
506 '-----------------------------------------------------------
508 testcase tViewInputMethodStatus
509 PrintLog "- View / Input Method Status (only Solaris)"
510 if ( Ucase(gPlatform) <> "SOLARIS" ) then
511 printlog( "No testing for IME status for OS <> Solaris" )
515 PrintLog " Open new document"
517 PrintLog " View / View / Input Method Status"
519 ViewInputMethodStatus
521 Warnlog "Menuentry 'Input Method Status' is disabled!"
526 PrintLog " View / View / Input Method Status"
527 ViewInputMethodStatus
528 PrintLog " Close active document"
532 '-----------------------------------------------------------
534 testcase tViewHTMLSource
535 PrintLog "- View / HTML Source (only in HTML-Document)"
536 if ( gApplication <> "HTML" ) then
540 printlog "Open new document"
542 printlog "View / HTML-Source"
545 printlog "Save-As dialog has to come up"
546 Kontext "SpeichernDlg"
547 if ( SpeichernDlg.exists( 1 ) ) then
548 Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
549 printlog "Save sourcecode"
552 If Active.Exists then
553 if Active.GetRT = 304 then
557 Warnlog Active.Gettext
563 warnlog( "Dialog <SpeichernDlg> is not available" )
566 Kontext "DocumentHTMLSourceView"
567 DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
569 printlog "View / HTML-Source"
572 printlog "Close active document"
576 '-----------------------------------------------------------
578 testcase tHtmlDocViewZoom
579 gApplication = "HTML"
580 printlog " open application"
582 printlog " type something into the document"
583 hTypekeys "<RETURN>", 3
585 printlog " View -> Zoom"
588 if ( Massstab.exists( 1 ) ) then
589 DialogTest ( Massstab )
590 printlog " check checkbox '100%'"
591 Vergroesserung100.check
592 printlog " check checkbox 'Variable'"
593 VergroesserungStufenlos.check
596 warnlog( "Dialog <Massstab> is not available" )
598 printlog " close application"
600 gApplication = "WRITER"
603 '-----------------------------------------------------------
605 testcase tHtmlDocViewHTMLSource
606 PrintLog "- View / HTML Source (only in HTML-Document)"
607 gApplication = "HTML"
608 printlog "Open new document"
610 printlog "View / HTML-Source"
613 printlog "Save-As dialog has to come up"
614 printlog "Save sourcecode"
615 Kontext "SpeichernDlg"
616 Dateiname.Settext Convertpath(gofficepath + "user\work\sourcecode.html")
619 If Active.Exists then
620 if Active.GetRT = 304 then
624 Warnlog Active.Gettext
630 Kontext "DocumentHTMLSourceView"
631 DocumentHTMLSourceView.TypeKeys "Check for bug: #116402"
633 printlog "View / HTML-Source"
636 printlog "Close active document"
638 gApplication = "WRITER"
641 '-----------------------------------------------------------