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_shortcuts.inc,v $
13 '* last change: $Author: vg $ $Date: 2008-08-18 12:35:39 $
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 : Shortcut-test in writer
38 '************************************************************************
41 '* tShortcutGlobalOpen
42 '* tShortcutGlobalSave
43 '* tShortcutGlobalSaveAs
45 '* tShortcutFindAndReplace
49 '* tShortcutDoubleUnderline
51 '* tShortcutSuperscript
54 '\***********************************************************************
58 Call tShortcutGlobalNew
59 Call tShortcutGlobalOpen
60 Call tShortcutGlobalSave
61 Call tShortcutGlobalSaveAs
62 Call tShortcutSelectAll
63 Call tShortcutFindAndReplace
66 Call tShortcutUnderline
67 Call tShortcutDoubleUnderline
69 Call tShortcutSuperscript
70 Call tShortcutSubscript
74 testcase tShortcutGlobalNew
75 Dim vShortcut as string
76 Dim vNoOfDocs as integer
77 '/// This testcases checks the global shortcut -> New
79 '/// Open a new text document
82 Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
83 '/// Shortcut for 'New' in en/sv/pt-BR is <Strg+N>
84 '/// Shortcut for 'New' in de is <Strg+N>
85 '/// Shortcut for 'New' in fr is <Strg+N>
86 '/// Shortcut for 'New' in it is <Strg+N>
87 vShortcut = "<Mod1 N>"
89 '/// Shortcut for 'New' in es is <Strg+U>
90 vShortcut = "<Mod1 U>"
92 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
97 vNoOfDocs = GetDocumentCount
98 '/// After executing previous named shortcut a new document should be opened
99 Call wTypeKeys ( vShortcut )
101 if GetDocumentCount = (vNoOfDocs + 1) then
102 printlog "Shortcut " & vShortcut & " opens a new document!"
106 Warnlog "Shortcut " & vShortcut & " didn't open a new document!"
108 '/// Close document opened on start
113 ' --------------------------------------------------------------------------------
115 testcase tShortcutGlobalOpen
116 Dim vShortcut as string
117 '/// This testcases checks the global shortcut -> Open
119 '/// Open a new text document
122 Case 01, 03, 07, 49, 31, 33, 39, 36, 46, 55, 86, 82, 81
123 '/// Shortcut for 'Open' in en/sv/pt-BR is <Strg+O>
124 '/// Shortcut for 'Open' in de is <Strg+O>
125 '/// Shortcut for 'Open' in fr is <Strg+O>
126 '/// Shortcut for 'Open' in it is <Strg+O>
127 vShortcut = "<Mod1 O>"
129 '/// Shortcut for 'Open' in es is <Strg+A>
130 vShortcut = "<Mod1 A>"
132 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
137 '/// After executing previous named shortcut FileOpen dialog should be opened
138 Call wTypeKeys ( vShortcut )
141 if OeffnenDlg.Exists then
142 printlog "Shortcut " & vShortcut & " opens FileOpen dialog"
143 '/// close FileOpenDialog
146 printlog "Shortcut " & vShortcut & " didn't open FileOpen dialog"
148 '/// Close document opened on start
153 ' --------------------------------------------------------------------------------
155 testcase tShortcutGlobalSave
156 Dim vShortcut as string
157 '/// This testcases checks the global shortcut -> Save
158 '/// Open a new text document
161 Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
162 '/// Shortcut for 'Save' in en/sv/pt-BR is <Strg+S>
163 '/// Shortcut for 'Save' in de is <Strg+S>
164 '/// Shortcut for 'Save' in fr is <Strg+S>
165 '/// Shortcut for 'Save' in it is <Strg+S>
166 vShortcut = "<Mod1 S>"
168 '/// Shortcut for 'Save' in es is <Strg+G>
169 vShortcut = "<Mod1 G>"
171 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
176 '/// After executing previous named shortcut FileSave dialog should be opened
177 Call wTypeKeys ( vShortcut )
178 Kontext "SpeichernDlg"
179 if SpeichernDlg.Exists then
180 printlog "Shortcut " & vShortcut & " opens FileSave dialog"
181 '/// close FileOpenDialog
184 printlog "Shortcut " & vShortcut & " didn't open FileSave dialog"
186 '/// Close document opened on start
191 ' --------------------------------------------------------------------------------
193 testcase tShortcutGlobalSaveAs
194 Dim vShortcut as string
195 '/// This testcases checks the global shortcut -> Save
197 '/// Open a new text document
199 vShortcut = "<Mod1 Shift S>"
201 '/// After executing previous named shortcut FileSave dialog should be opened
202 Call wTypeKeys ( vShortcut )
203 Kontext "SpeichernDlg"
204 if SpeichernDlg.Exists then
205 printlog "Shortcut " & vShortcut & " opens FileSaveAs dialog"
206 '/// close FileOpenDialog
209 printlog "Shortcut " & vShortcut & " didn't open FileSaveAs dialog"
211 '/// Close document opened on start
216 ' --------------------------------------------------------------------------------
218 testcase tShortcutSelectAll
219 Dim vShortcut as string
220 '/// This testcases checks the shortcut -> Select All
222 '/// Open a new text document
225 Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
226 '/// Shortcut for 'Select All' in en/sv/pt-BR is <Strg+A>
227 '/// Shortcut for 'Select All' in de is <Strg+A>
228 '/// Shortcut for 'Select All' in fr is <Strg+A>
229 '/// Shortcut for 'Select All' in it is <Strg+A>
230 vShortcut = "<Mod1 A>"
232 '/// Shortcut for 'Select All' in es is <Strg+E>
233 vShortcut = "<Mod1 E>"
235 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
240 '/// write down 'The complete text should be selected'
241 Call wTypeKeys ( "The complete text should be selected" )
242 '/// execute shortcut->the complete text should be selected
243 Call wTypeKeys ( vShortcut )
248 Warnlog "Text seems not to be selected! Edit / Copy is disabled"
253 if GetClipboardText <> "The complete text should be selected" then
254 Warnlog "Not all of the text has been selected with shortcut " & vShortcut
256 printlog "All of the text has been selected!"
259 '/// close document previously opened
264 ' --------------------------------------------------------------------------------
266 testcase tShortcutFindAndReplace
267 Dim vShortcut as string
268 '/// This testcases checks the shortcut -> Find & Replace and Repeat Search
269 '/// Open a new text document
271 '/// Check shortcut to open 'Find & Replace' dialog
273 Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
274 '/// Shortcut for 'Find & Replace' in en/sv/pt-BR is <Strg+F>
275 '/// Shortcut for 'Find & Replace' in de is <Strg+F>
276 '/// Shortcut for 'Find & Replace' in fr is <Strg+F>
277 '/// Shortcut for 'Find & Replace' in it is <Strg+F>
278 vShortcut = "<Mod1 F>"
280 '/// Shortcut for 'Find & Replace' in es is <Strg+B>
281 vShortcut = "<Mod1 B>"
283 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
288 printlog "Shortcut for 'Find & Replace'"
289 '/// write down 'Check Find & Replace'
290 Call wTypeKeys ( "Check Find & Replace" )
291 '/// execute shortcut->the Find & Replace dialog should come up
292 Call wTypeKeys ( vShortcut )
294 Kontext "FindAndReplace"
295 if FindAndReplace.Exists then
296 printlog "Shortcut " & vShortcut & " opens Find & Replace dialog"
297 FindAndReplace.Cancel
299 printlog "Shortcut " & vShortcut & " didn't open Find & Replace dialog"
302 '/// Check shortcut to Repeat search
304 Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81
305 '/// Shortcut for 'Repeat Search' in en/sv/pt-BR is <Strg+Shift+F>
306 '/// Shortcut for 'Repeat Search' in de is <Strg+Shift+F>
307 '/// Shortcut for 'Repeat Search' in fr is <Strg+Shift+F>
308 '/// Shortcut for 'Repeat Search' in it is <Strg+Shift+F>
309 vShortcut = "<Mod1 Shift F>"
311 '/// Shortcut for 'Find & Replace' in es is <Strg+N>
312 vShortcut = "<Mod1 B>"
314 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
319 printlog "Shortcut for 'Repeat Search'"
320 '/// execute shortcut->a messagebox should appear asking to start from the beginning
321 Call wTypeKeys ( vShortcut )
324 if Active.Exists then
325 if Active.GetRT = 304 then
328 printlog "Shortcut " & vShortcut & " seems to work"
331 printlog "Shortcut " & vShortcut & " seems not to work correctly"
335 '/// Quitting messagebox with 'Yes' should bring up another Messagebox
336 if Active.Exists then
337 if Active.GetRT = 304 then
342 '/// close document previously opened
347 ' --------------------------------------------------------------------------------
349 testcase tShortcutBold
350 Dim vShortcut as string
351 '/// This testcases checks the shortcut -> Bold
352 '/// Open a new text document
355 Case 01, 03, 07, 31, 36, 39, 46, 55, 86, 82, 81
356 '/// Shortcut for 'Bold' in en/sv/pt-BR is <Strg+B>
357 '/// Shortcut for 'Bold' in it is <Strg+B>
358 vShortcut = "<Mod1 B>"
360 '/// Shortcut for 'Bold' in de is <Strg+Shift+F>
361 vShortcut = "<Mod1 Shift F>"
363 '/// Shortcut for 'Bold' in fr is <Strg+G>
364 vShortcut = "<Mod1 G>"
366 '/// Shortcut for 'Bold' in es is <Strg+N>
367 vShortcut = "<Mod1 N>"
369 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
374 '/// write down word 'Bold' and select it
375 Call wTypeKeys ( "Bold" )
376 Call wTypeKeys ( "<Shift Home>" )
377 '/// execute shortcut and check if word is now formatted as 'Bold'
378 Call wTypeKeys ( vShortcut )
380 Kontext "TextObjectbar"
381 if Fett.Getstate(2) = 1 then
382 printlog "Shortcut " & vShortcut & " to format 'Bold' works"
384 Warnlog "Shortcut " & vShortcut & " to format 'Bold' doesn't work"
387 '/// close previous opened document
392 ' --------------------------------------------------------------------------------
394 testcase tShortcutItalic
395 Dim vShortcut as string
396 '/// This testcases checks the shortcut -> Italic
397 '/// Open a new text document
400 Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81
401 '/// Shortcut for 'Italic' in en/sv/pt-BR is <Strg+I>
402 '/// Shortcut for 'Italic' in fr is <Strg+I>
403 '/// Shortcut for 'Italic' in it is <Strg+I>
404 vShortcut = "<Mod1 I>"
406 '/// Shortcut for 'Italic' in de is <Strg+Shift+K>
407 vShortcut = "<Mod1 Shift K>"
409 '/// Shortcut for 'Italic' in es is <Strg+K>
410 vShortcut = "<Mod1 K>"
412 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
417 '/// write down word 'Italic' and select it
418 Call wTypeKeys ( "Italic" )
419 Call wTypeKeys ( "<Shift Home>" )
420 '/// execute shortcut and check if word is now formatted as 'Italic'
421 Call wTypeKeys ( vShortcut )
423 Kontext "TextObjectbar"
424 if Kursiv.Getstate(2) = 1 then
425 printlog "Shortcut " & vShortcut & " to format 'Italic' works"
427 Warnlog "Shortcut " & vShortcut & " to format 'Italic' doesn't work"
430 '/// close previous opened document
435 ' --------------------------------------------------------------------------------
437 testcase tShortcutUnderline
438 Dim vShortcut as string
439 '/// This testcases checks the shortcut -> Underline
440 '/// Open a new text document
443 Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81
444 '/// Shortcut for 'Underline' in en/sv/pt-BR is <Strg+U>
445 '/// Shortcut for 'Underline' in fr is <Strg+U>
446 '/// Shortcut for 'Underline' in it is <Strg+U>
447 vShortcut = "<Mod1 U>"
449 '/// Shortcut for 'Underline' in de is <Strg+Shift+U>
450 vShortcut = "<Mod1 Shift U>"
452 '/// Shortcut for 'Underline' in es is <Strg+S>
453 vShortcut = "<Mod1 S>"
455 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
460 '/// write down word 'Underline' and select it
461 Call wTypeKeys ( "Underline" )
462 Call wTypeKeys ( "<Shift Home>" )
463 '/// execute shortcut and check if word is now formatted as 'Underline'
464 Call wTypeKeys ( vShortcut )
466 Kontext "TextObjectbar"
467 if Unterstrichen.Getstate(2) = 1 then
468 printlog "Shortcut " & vShortcut & " to format 'Underline' works"
470 Warnlog "Shortcut " & vShortcut & " to format 'Underline' doesn't work"
473 '/// close previous opened document
478 ' --------------------------------------------------------------------------------
480 testcase tShortcutDoubleUnderline
481 Dim vShortcut as string
482 '/// This testcases checks the shortcut -> Double Underline
483 '/// Open a new text document
486 Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
487 '/// Shortcut for 'Underline' in en/sv/pt-BR is <Strg+D>
488 '/// Shortcut for 'Underline' in fr is <Strg+D>
489 '/// Shortcut for 'Underline' in es is <Strg+D>
490 '/// Shortcut for 'Underline' in it is <Strg+D>
491 '/// Shortcut for 'Underline' in de is <Strg+D>
492 vShortcut = "<Mod1 D>"
494 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
499 '/// write down word 'Underline' and select it
500 Call wTypeKeys ( "Double Underline" )
501 Call wTypeKeys ( "<Shift Home>" )
502 '/// execute shortcut and check if word is now formatted as 'Double Underline'
503 Call wTypeKeys ( vShortcut )
507 Active.Setpage TabFontEffects
508 Kontext "TabFontEffects"
509 if Underline.GetSelIndex <> 3 then
510 Warnlog "Shortcut " & vShortcut & " to format 'Double Underline' doesn't work"
512 printlog "Shortcut " & vShortcut & " to format 'Double Underline' works"
515 TabFontEffects.Cancel
517 '/// close previous opened document
522 ' --------------------------------------------------------------------------------
524 testcase tShortcutAlign
525 Dim vShortcut as string
526 '/// This testcases checks the shortcuts -> Align Left, Right, Centered, Justified
528 '/// Open a new text document
529 printlog "- Shortcut 'Align Left'"
531 '/// "- Shortcut 'Align Left'"
533 Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
534 '/// Shortcut for 'Align Left' in en/sv/pt-BR is <Strg+L>
535 '/// Shortcut for 'Align Left' in fr is <Strg+L>
536 '/// Shortcut for 'Align Left' in es is <Strg+L>
537 '/// Shortcut for 'Align Left' in it is <Strg+L>
538 '/// Shortcut for 'Align Left' in de is <Strg+L>
539 vShortcut = "<Mod1 L>"
541 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
546 '/// write down word 'Align Left'
547 Call wTypeKeys ( "Align Left" )
548 '/// execute shortcut and check if word is now aligned left
549 Call wTypeKeys ( vShortcut )
551 Kontext "TextObjectbar"
552 if Linksbuendig.Getstate(2) = 1 then
553 printlog "- Shortcut " & vShortcut & " to 'Align Left' works"
555 Warnlog "- Shortcut " & vShortcut & " to 'Align Left' doesn't work"
558 '/// "- Shortcut 'Align Right'"
559 printlog "- Shortcut 'Align Right'"
561 Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81
562 '/// Shortcut for 'Align Right' in en/sv/pt-BR is <Strg+R>
563 '/// Shortcut for 'Align Right' in fr is <Strg+R>
564 '/// Shortcut for 'Align Right' in es is <Strg+R>
565 '/// Shortcut for 'Align Right' in it is <Strg+R>
566 '/// Shortcut for 'Align Right' in de is <Strg+R>
567 vShortcut = "<Mod1 R>"
569 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
574 '/// Insert a line break
575 Call wTypeKeys ( "<Return>" )
576 '/// write down word 'Align Right'
577 Call wTypeKeys ( "Align Right" )
578 '/// execute shortcut and check if word is now aligned right
579 Call wTypeKeys ( vShortcut )
581 Kontext "TextObjectbar"
582 if Rechtsbuendig.Getstate(2) = 1 then
583 printlog "- Shortcut " & vShortcut & " to 'Align Right' works"
585 Warnlog "- Shortcut " & vShortcut & " to 'Align Right' doesn't work"
588 '/// "- Shortcut 'Align Centered'"
589 printlog "- Shortcut 'Align Centered'"
591 Case 01, 03, 07, 31, 33, 36, 39, 49, 46, 55, 86, 82, 81
592 '/// Shortcut for 'Align Centered' in en/sv/pt-BR is <Strg+E>
593 '/// Shortcut for 'Align Centered' in fr is <Strg+E>
594 '/// Shortcut for 'Align Centered' in it is <Strg+E>
595 '/// Shortcut for 'Align Centered' in de is <Strg+E>
596 vShortcut = "<Mod1 E>"
598 '/// Shortcut for 'Align Centered' in es is <Strg+T>
599 vShortcut = "<Mod1 T>"
601 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
606 '/// Insert a line break
607 Call wTypeKeys ( "<Return>" )
608 '/// write down word 'Align Right'
609 Call wTypeKeys ( "Align Centered" )
610 '/// execute shortcut and check if word is now aligned centered
611 Call wTypeKeys ( vShortcut )
613 Kontext "TextObjectbar"
614 if Zentriert.Getstate(2) = 1 then
615 printlog "- Shortcut " & vShortcut & " to 'Align Centered' works"
617 Warnlog "- Shortcut " & vShortcut & " to 'Align Centered' doesn't work"
620 '/// "- Shortcut 'Align Justified'"
621 printlog "- Shortcut 'Align Justified'"
623 Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
624 '/// Shortcut for 'Align Justified' in en/sv/pt-BR is <Strg+J>
625 '/// Shortcut for 'Align Justified' in fr is <Strg+J>
626 '/// Shortcut for 'Align Justified' in it is <Strg+J>
627 '/// Shortcut for 'Align Justified' in de is <Strg+J>
628 vShortcut = "<Mod1 J>"
630 '/// Shortcut for 'Align Justified' in de is <Strg+B>
631 vShortcut = "<Mod1 B>"
633 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
638 '/// Insert a line break
639 Call wTypeKeys ( "<Return>" )
640 '/// write down word 'Align Right'
641 Call wTypeKeys ( "Align Justified" )
642 '/// execute shortcut and check if word is now aligned centered
643 Call wTypeKeys ( vShortcut )
645 Kontext "TextObjectbar"
646 if Blocksatz.Getstate(2) = 1 then
647 printlog "- Shortcut " & vShortcut & " to 'Align Justified' works"
649 Warnlog "- Shortcut " & vShortcut & " to 'Align Justified' doesn't work"
652 '/// close previous opened document
657 ' --------------------------------------------------------------------------------
659 testcase tShortcutSuperscript
660 Dim vShortcut as string
661 '/// This testcases checks the shortcut -> Superscript
662 '/// Open a new text document
665 Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
666 '/// Shortcut for 'Superscript' in en/sv/pt-BR is <Strg+D>
667 '/// Shortcut for 'Superscript' in fr is <Strg+D>
668 '/// Shortcut for 'Superscript' in es is <Strg+D>
669 '/// Shortcut for 'Superscript' in it is <Strg+D>
670 vShortcut = "<Mod1 Shift P>"
672 '/// Shortcut for 'Superscript' in de is <Strg+H>
673 vShortcut = "<Mod1 H>"
675 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
681 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
682 '/// Open 'Draw functions' toolbar ///
684 '/// Draw a Textobject ///
685 Call gMouseMove ( 30, 30, 40, 40 )
686 '/// write down word 'Superscript' and select it
687 call wTypeKeys ("Superscript")
688 call wTypeKeys ("<Shift Home>")
690 '/// execute shortcut and check if word is now formatted as 'Superscript'
691 Call wTypeKeys ( vShortcut )
695 Active.Setpage TabFontPosition
696 Kontext "TabFontPosition"
697 if Superscript.IsChecked = true then
698 printlog "Shortcut " & vShortcut & " to format 'Superscript' works"
700 Warnlog "Shortcut " & vShortcut & " to format 'Superscript' doesn't work"
702 TabFontPosition.Cancel
704 '/// close previous opened document
709 ' --------------------------------------------------------------------------------
711 testcase tShortcutSubscript
712 Dim vShortcut as string
713 '/// This testcases checks the shortcut -> Subscript
714 '/// Open a new text document
717 Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81
718 '/// Shortcut for 'Subscript' in en/sv/pt-BR is <Strg+Shift+B>
719 '/// Shortcut for 'Subscript' in fr is <Strg+Shift+B>
720 '/// Shortcut for 'Subscript' in es is <Strg+Shift+B>
721 '/// Shortcut for 'Subscript' in it is <Strg+Shift+B>
722 vShortcut = "<Mod1 Shift B>"
724 '/// Shortcut for 'Subscript' in de is <Strg+T>
725 vShortcut = "<Mod1 T>"
727 Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test"
733 if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true)
734 '/// Open 'Draw functions' toolbar ///
736 '/// Draw a Textobject ///
737 Call gMouseMove ( 30, 30, 40, 40 )
738 '/// write down word 'Subscript' and select it
740 call wTypeKeys ("Subscript")
741 call wTypeKeys ("<Shift Home>")
743 '/// execute shortcut and check if word is now formatted as 'Superscript'
744 Call wTypeKeys ( vShortcut )
748 Active.Setpage TabFontPosition
749 Kontext "TabFontPosition"
750 if Subscript.IsChecked = true then
751 printlog "Shortcut " & vShortcut & " to format 'Subscript' works"
753 Warnlog "Shortcut " & vShortcut & " to format 'Subscript' doesn't work"
755 TabFontPosition.Cancel
757 '/// close previous opened document
762 ' --------------------------------------------------------------------------------
764 testcase tShortcutPasteUnformattedText
766 Dim vShortcut as string
767 Dim DefaultSize as integer
768 Dim DefaultStyle as integer
770 printlog "This testcases checks the shortcut -> Paste Unformatted Text"
771 printlog "Open a new text document"
774 vShortcut = "<Mod1 Mod2 Shift V>"
775 printlog "Type 'This is a formatted sentence'"
776 Call wTypeKeys ("This is a formatted sentence")
778 printlog "Format the word 'formatted' in bold, italic, font size 20"
779 Call wTypeKeys ("<Home>")
780 Call wTypeKeys ("<Mod1 Right>", 3)
781 Call wTypeKeys ("<Mod1 Shift Right>")
786 Active.Setpage TabFont
788 DefaultSize = Size.GetSelIndex
789 Size.Select 14 ' Size 20
790 DefaultStyle = Style.GetSelIndex
791 Style.Select 4 ' Style Bold, Italic
794 printlog "Copy word 'formatted'"
797 printlog "Go to the end of line"
798 Call wTypeKeys ("<End>")
799 printlog "insert a space"
800 Call wTypeKeys ("<Space>")
801 printlog "Press Ctrl+Alt+Shift+V (cmd+option+shift+V on Mac)"
802 Call wTypeKeys ( vShortcut )
805 Call wTypeKeys ("<Mod1 Home>")
806 printlog "check if sentence is now: This is a formatted sentence formatted"
807 Call wTypeKeys ("<Shift End>")
809 if Trim(GetClipboardText) = "This is a formatted sentence formatted" then
810 printlog "- shortcut did work"
812 if gPlatgroup = "osx" then
813 Warnlog "#103102#It is not possible to customize the keyboard combination cmd+option on MAC OSX."
817 Warnlog "Shortcut did not work"
823 printlog "Check if formatted word held its formatting"
824 Call wTypeKeys ("<Home>")
825 Call wTypeKeys ("<Mod1 Right>", 3)
826 Call wTypeKeys ("<Mod1 Shift Right>")
831 Active.Setpage TabFont
833 if Size.GetSelIndex <> 14 then
834 Warnlog "formatted word has lost its size"
836 if Style.GetSelIndex <> 4 then
837 Warnlog "formatted word has lost its style"
841 printlog "Check if pasted word has default formatting"
842 Call wTypeKeys ("<End>")
843 Call wTypeKeys ("<Mod1 Right>", 3)
844 Call wTypeKeys ("<Mod1 Shift Left>")
849 Active.Setpage TabFont
851 if Size.GetSelIndex <> DefaultSize then
852 Warnlog "formatted word has no default size"
854 if Style.GetSelIndex <> DefaultStyle then
855 Warnlog "formatted word has no default style"
859 printlog "close previous opened document"