'encoding UTF-8 Do not remove or change this line! '************************************************************************** ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ' ' Copyright 2000, 2010 Oracle and/or its affiliates. ' ' OpenOffice.org - a multi-platform office productivity suite ' ' This file is part of OpenOffice.org. ' ' OpenOffice.org is free software: you can redistribute it and/or modify ' it under the terms of the GNU Lesser General Public License version 3 ' only, as published by the Free Software Foundation. ' ' OpenOffice.org is distributed in the hope that it will be useful, ' but WITHOUT ANY WARRANTY; without even the implied warranty of ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ' GNU Lesser General Public License version 3 for more details ' (a copy is included in the LICENSE file that accompanied this code). ' ' You should have received a copy of the GNU Lesser General Public License ' version 3 along with OpenOffice.org. If not, see ' ' for a copy of the LGPLv3 License. ' '/************************************************************************ '* '* owner : helge.delfs@oracle.com '* '* short description : Shortcut-test in writer '* '************************************************************************ '* '* tShortcutGlobalNew '* tShortcutGlobalOpen '* tShortcutGlobalSave '* tShortcutGlobalSaveAs '* tShortcutSelectAll '* tShortcutFindAndReplace '* tShortcutBold '* tShortcutItalic '* tShortcutUnderline '* tShortcutDoubleUnderline '* tShortcutAlign '* tShortcutSuperscript '* tShortcutSubscript '* '\*********************************************************************** sub w_shortcuts Call tShortcutGlobalNew Call tShortcutGlobalOpen Call tShortcutGlobalSave Call tShortcutGlobalSaveAs Call tShortcutSelectAll Call tShortcutFindAndReplace Call tShortcutBold Call tShortcutItalic Call tShortcutUnderline Call tShortcutDoubleUnderline Call tShortcutAlign Call tShortcutSuperscript Call tShortcutSubscript end sub testcase tShortcutGlobalNew Dim vShortcut as string Dim vNoOfDocs as integer '/// This testcases checks the global shortcut -> New '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'New' in en/sv/pt-BR is '/// Shortcut for 'New' in de is '/// Shortcut for 'New' in fr is '/// Shortcut for 'New' in it is vShortcut = "" Case 34 '/// Shortcut for 'New' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select vNoOfDocs = GetDocumentCount '/// After executing previous named shortcut a new document should be opened Call wTypeKeys ( vShortcut ) wait 500 if GetDocumentCount = (vNoOfDocs + 1) then printlog "Shortcut " & vShortcut & " opens a new document!" '/// close document Call hCloseDocument else Warnlog "Shortcut " & vShortcut & " didn't open a new document!" end if '/// Close document opened on start Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutGlobalOpen Dim vShortcut as string '/// This testcases checks the global shortcut -> Open '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 49, 31, 33, 39, 36, 46, 55, 86, 82, 81 '/// Shortcut for 'Open' in en/sv/pt-BR is '/// Shortcut for 'Open' in de is '/// Shortcut for 'Open' in fr is '/// Shortcut for 'Open' in it is vShortcut = "" Case 34 '/// Shortcut for 'Open' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// After executing previous named shortcut FileOpen dialog should be opened Call wTypeKeys ( vShortcut ) wait 500 Kontext "OeffnenDlg" if OeffnenDlg.Exists then printlog "Shortcut " & vShortcut & " opens FileOpen dialog" '/// close FileOpenDialog OeffnenDlg.Cancel else printlog "Shortcut " & vShortcut & " didn't open FileOpen dialog" end if '/// Close document opened on start Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutGlobalSave Dim vShortcut as string '/// This testcases checks the global shortcut -> Save '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Save' in en/sv/pt-BR is '/// Shortcut for 'Save' in de is '/// Shortcut for 'Save' in fr is '/// Shortcut for 'Save' in it is vShortcut = "" Case 34 '/// Shortcut for 'Save' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// After executing previous named shortcut FileSave dialog should be opened Call wTypeKeys ( vShortcut ) Kontext "SpeichernDlg" if SpeichernDlg.Exists then printlog "Shortcut " & vShortcut & " opens FileSave dialog" '/// close FileOpenDialog SpeichernDlg.Cancel else printlog "Shortcut " & vShortcut & " didn't open FileSave dialog" end if '/// Close document opened on start Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutGlobalSaveAs Dim vShortcut as string '/// This testcases checks the global shortcut -> Save '/// Open a new text document Call hNewDocument vShortcut = "" '/// After executing previous named shortcut FileSave dialog should be opened Call wTypeKeys ( vShortcut ) Kontext "SpeichernDlg" if SpeichernDlg.Exists then printlog "Shortcut " & vShortcut & " opens FileSaveAs dialog" '/// close FileOpenDialog SpeichernDlg.Cancel else printlog "Shortcut " & vShortcut & " didn't open FileSaveAs dialog" end if '/// Close document opened on start Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutSelectAll Dim vShortcut as string '/// This testcases checks the shortcut -> Select All '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Select All' in en/sv/pt-BR is '/// Shortcut for 'Select All' in de is '/// Shortcut for 'Select All' in fr is '/// Shortcut for 'Select All' in it is vShortcut = "" Case 34 '/// Shortcut for 'Select All' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down 'The complete text should be selected' Call wTypeKeys ( "The complete text should be selected" ) '/// execute shortcut->the complete text should be selected Call wTypeKeys ( vShortcut ) wait 500 try EditCopy catch Warnlog "Text seems not to be selected! Edit / Copy is disabled" Call hCloseDocument goto endsub endcatch if GetClipboardText <> "The complete text should be selected" then Warnlog "Not all of the text has been selected with shortcut " & vShortcut else printlog "All of the text has been selected!" end if '/// close document previously opened Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutFindAndReplace Dim vShortcut as string '/// This testcases checks the shortcut -> Find & Replace and Repeat Search '/// Open a new text document Call hNewDocument '/// Check shortcut to open 'Find & Replace' dialog Select Case iSprache Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Find & Replace' in en/sv/pt-BR is '/// Shortcut for 'Find & Replace' in de is '/// Shortcut for 'Find & Replace' in fr is '/// Shortcut for 'Find & Replace' in it is vShortcut = "" Case 34 '/// Shortcut for 'Find & Replace' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select printlog "Shortcut for 'Find & Replace'" '/// write down 'Check Find & Replace' Call wTypeKeys ( "Check Find & Replace" ) '/// execute shortcut->the Find & Replace dialog should come up Call wTypeKeys ( vShortcut ) wait 500 Kontext "FindAndReplace" if FindAndReplace.Exists then printlog "Shortcut " & vShortcut & " opens Find & Replace dialog" FindAndReplace.Cancel else printlog "Shortcut " & vShortcut & " didn't open Find & Replace dialog" end if '/// Check shortcut to Repeat search Select Case iSprache Case 01, 03, 07, 49, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Repeat Search' in en/sv/pt-BR is '/// Shortcut for 'Repeat Search' in de is '/// Shortcut for 'Repeat Search' in fr is '/// Shortcut for 'Repeat Search' in it is vShortcut = "" Case 34 '/// Shortcut for 'Find & Replace' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select printlog "Shortcut for 'Repeat Search'" '/// execute shortcut->a messagebox should appear asking to start from the beginning Call wTypeKeys ( vShortcut ) wait 500 Kontext "Active" if Active.Exists then if Active.GetRT = 304 then try Active.Yes printlog "Shortcut " & vShortcut & " seems to work" catch Active.Ok printlog "Shortcut " & vShortcut & " seems not to work correctly" endcatch end if end if '/// Quitting messagebox with 'Yes' should bring up another Messagebox if Active.Exists then if Active.GetRT = 304 then Active.Ok end if end if '/// close document previously opened Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutBold Dim vShortcut as string '/// This testcases checks the shortcut -> Bold '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Bold' in en/sv/pt-BR is '/// Shortcut for 'Bold' in it is vShortcut = "" Case 49 '/// Shortcut for 'Bold' in de is vShortcut = "" Case 33 '/// Shortcut for 'Bold' in fr is vShortcut = "" Case 34 '/// Shortcut for 'Bold' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down word 'Bold' and select it Call wTypeKeys ( "Bold" ) Call wTypeKeys ( "" ) '/// execute shortcut and check if word is now formatted as 'Bold' Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Fett.Getstate(2) = 1 then printlog "Shortcut " & vShortcut & " to format 'Bold' works" else Warnlog "Shortcut " & vShortcut & " to format 'Bold' doesn't work" end if '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutItalic Dim vShortcut as string '/// This testcases checks the shortcut -> Italic '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Italic' in en/sv/pt-BR is '/// Shortcut for 'Italic' in fr is '/// Shortcut for 'Italic' in it is vShortcut = "" Case 49 '/// Shortcut for 'Italic' in de is vShortcut = "" Case 34 '/// Shortcut for 'Italic' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down word 'Italic' and select it Call wTypeKeys ( "Italic" ) Call wTypeKeys ( "" ) '/// execute shortcut and check if word is now formatted as 'Italic' Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Kursiv.Getstate(2) = 1 then printlog "Shortcut " & vShortcut & " to format 'Italic' works" else Warnlog "Shortcut " & vShortcut & " to format 'Italic' doesn't work" end if '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutUnderline Dim vShortcut as string '/// This testcases checks the shortcut -> Underline '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 33, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Underline' in en/sv/pt-BR is '/// Shortcut for 'Underline' in fr is '/// Shortcut for 'Underline' in it is vShortcut = "" Case 49 '/// Shortcut for 'Underline' in de is vShortcut = "" Case 34 '/// Shortcut for 'Underline' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down word 'Underline' and select it Call wTypeKeys ( "Underline" ) Call wTypeKeys ( "" ) '/// execute shortcut and check if word is now formatted as 'Underline' Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Unterstrichen.Getstate(2) = 1 then printlog "Shortcut " & vShortcut & " to format 'Underline' works" else Warnlog "Shortcut " & vShortcut & " to format 'Underline' doesn't work" end if '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutDoubleUnderline Dim vShortcut as string '/// This testcases checks the shortcut -> Double Underline '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81 '/// Shortcut for 'Underline' in en/sv/pt-BR is '/// Shortcut for 'Underline' in fr is '/// Shortcut for 'Underline' in es is '/// Shortcut for 'Underline' in it is '/// Shortcut for 'Underline' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down word 'Underline' and select it Call wTypeKeys ( "Double Underline" ) Call wTypeKeys ( "" ) '/// execute shortcut and check if word is now formatted as 'Double Underline' Call wTypeKeys ( vShortcut ) wait 500 FormatCharacter Kontext Active.Setpage TabFontEffects Kontext "TabFontEffects" if Underline.GetSelIndex <> 3 then Warnlog "Shortcut " & vShortcut & " to format 'Double Underline' doesn't work" else printlog "Shortcut " & vShortcut & " to format 'Double Underline' works" end if TabFontEffects.Cancel '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutAlign Dim vShortcut as string '/// This testcases checks the shortcuts -> Align Left, Right, Centered, Justified '/// Open a new text document printlog "- Shortcut 'Align Left'" Call hNewDocument '/// "- Shortcut 'Align Left'" Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81 '/// Shortcut for 'Align Left' in en/sv/pt-BR is '/// Shortcut for 'Align Left' in fr is '/// Shortcut for 'Align Left' in es is '/// Shortcut for 'Align Left' in it is '/// Shortcut for 'Align Left' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// write down word 'Align Left' Call wTypeKeys ( "Align Left" ) '/// execute shortcut and check if word is now aligned left Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Linksbuendig.Getstate(2) = 1 then printlog "- Shortcut " & vShortcut & " to 'Align Left' works" else Warnlog "- Shortcut " & vShortcut & " to 'Align Left' doesn't work" end if '/// "- Shortcut 'Align Right'" printlog "- Shortcut 'Align Right'" Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 49, 46, 55, 86, 82, 81 '/// Shortcut for 'Align Right' in en/sv/pt-BR is '/// Shortcut for 'Align Right' in fr is '/// Shortcut for 'Align Right' in es is '/// Shortcut for 'Align Right' in it is '/// Shortcut for 'Align Right' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// Insert a line break Call wTypeKeys ( "" ) '/// write down word 'Align Right' Call wTypeKeys ( "Align Right" ) '/// execute shortcut and check if word is now aligned right Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Rechtsbuendig.Getstate(2) = 1 then printlog "- Shortcut " & vShortcut & " to 'Align Right' works" else Warnlog "- Shortcut " & vShortcut & " to 'Align Right' doesn't work" end if '/// "- Shortcut 'Align Centered'" printlog "- Shortcut 'Align Centered'" Select Case iSprache Case 01, 03, 07, 31, 33, 36, 39, 49, 46, 55, 86, 82, 81 '/// Shortcut for 'Align Centered' in en/sv/pt-BR is '/// Shortcut for 'Align Centered' in fr is '/// Shortcut for 'Align Centered' in it is '/// Shortcut for 'Align Centered' in de is vShortcut = "" case 34 '/// Shortcut for 'Align Centered' in es is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// Insert a line break Call wTypeKeys ( "" ) '/// write down word 'Align Right' Call wTypeKeys ( "Align Centered" ) '/// execute shortcut and check if word is now aligned centered Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Zentriert.Getstate(2) = 1 then printlog "- Shortcut " & vShortcut & " to 'Align Centered' works" else Warnlog "- Shortcut " & vShortcut & " to 'Align Centered' doesn't work" end if '/// "- Shortcut 'Align Justified'" printlog "- Shortcut 'Align Justified'" Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Align Justified' in en/sv/pt-BR is '/// Shortcut for 'Align Justified' in fr is '/// Shortcut for 'Align Justified' in it is '/// Shortcut for 'Align Justified' in de is vShortcut = "" case 49 '/// Shortcut for 'Align Justified' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select '/// Insert a line break Call wTypeKeys ( "" ) '/// write down word 'Align Right' Call wTypeKeys ( "Align Justified" ) '/// execute shortcut and check if word is now aligned centered Call wTypeKeys ( vShortcut ) wait 500 Kontext "TextObjectbar" if Blocksatz.Getstate(2) = 1 then printlog "- Shortcut " & vShortcut & " to 'Align Justified' works" else Warnlog "- Shortcut " & vShortcut & " to 'Align Justified' doesn't work" end if '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutSuperscript Dim vShortcut as string '/// This testcases checks the shortcut -> Superscript '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Superscript' in en/sv/pt-BR is '/// Shortcut for 'Superscript' in fr is '/// Shortcut for 'Superscript' in es is '/// Shortcut for 'Superscript' in it is vShortcut = "" Case 49 '/// Shortcut for 'Superscript' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select Kontext "DrawBar" if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true) '/// Open 'Draw functions' toolbar /// Textobjekt.Click '/// Draw a Textobject /// Call gMouseMove ( 30, 30, 40, 40 ) '/// write down word 'Superscript' and select it call wTypeKeys ("Superscript") call wTypeKeys ("") '/// execute shortcut and check if word is now formatted as 'Superscript' Call wTypeKeys ( vShortcut ) wait 500 FormatCharacter Kontext Active.Setpage TabFontPosition Kontext "TabFontPosition" if Superscript.IsChecked = true then printlog "Shortcut " & vShortcut & " to format 'Superscript' works" else Warnlog "Shortcut " & vShortcut & " to format 'Superscript' doesn't work" end if TabFontPosition.Cancel '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutSubscript Dim vShortcut as string '/// This testcases checks the shortcut -> Subscript '/// Open a new text document Call hNewDocument Select Case iSprache Case 01, 03, 07, 31, 33, 34, 36, 39, 46, 55, 86, 82, 81 '/// Shortcut for 'Subscript' in en/sv/pt-BR is '/// Shortcut for 'Subscript' in fr is '/// Shortcut for 'Subscript' in es is '/// Shortcut for 'Subscript' in it is vShortcut = "" Case 49 '/// Shortcut for 'Subscript' in de is vShortcut = "" Case else Warnlog "Shortcuts for language: " & iSprache & " are not defined in this test" Call hCloseDocument goto endsub end select Kontext "DrawBar" if Not DrawBar.Exists then Call hToolbarSelect("Drawing", true) '/// Open 'Draw functions' toolbar /// Textobjekt.Click '/// Draw a Textobject /// Call gMouseMove ( 30, 30, 40, 40 ) '/// write down word 'Subscript' and select it call wTypeKeys ("Subscript") call wTypeKeys ("") '/// execute shortcut and check if word is now formatted as 'Superscript' Call wTypeKeys ( vShortcut ) wait 500 FormatCharacter Kontext Active.Setpage TabFontPosition Kontext "TabFontPosition" if Subscript.IsChecked = true then printlog "Shortcut " & vShortcut & " to format 'Subscript' works" else Warnlog "Shortcut " & vShortcut & " to format 'Subscript' doesn't work" end if TabFontPosition.Cancel '/// close previous opened document Call hCloseDocument endcase ' -------------------------------------------------------------------------------- testcase tShortcutPasteUnformattedText Dim vShortcut as string Dim DefaultSize as integer Dim DefaultStyle as integer printlog "This testcases checks the shortcut -> Paste Unformatted Text" printlog "Open a new text document" Call hNewDocument vShortcut = "" printlog "Type 'This is a formatted sentence'" Call wTypeKeys ("This is a formatted sentence") printlog "Format the word 'formatted' in bold, italic, font size 20" Call wTypeKeys ("") Call wTypeKeys ("", 3) Call wTypeKeys ("") FormatCharacter WaitSlot (5) Kontext Active.Setpage TabFont Kontext "TabFont" DefaultSize = Size.GetSelIndex Size.Select 14 ' Size 20 DefaultStyle = Style.GetSelIndex Style.Select 4 ' Style Bold, Italic TabFont.Ok printlog "Copy word 'formatted'" EditCopy printlog "Go to the end of line" Call wTypeKeys ("") printlog "insert a space" Call wTypeKeys ("") printlog "Press Ctrl+Alt+Shift+V (cmd+option+shift+V on Mac)" Call wTypeKeys ( vShortcut ) wait 500 Call wTypeKeys ("") printlog "check if sentence is now: This is a formatted sentence formatted" Call wTypeKeys ("") EditCopy if Trim(GetClipboardText) = "This is a formatted sentence formatted" then printlog "- shortcut did work" else if gPlatgroup = "osx" then Warnlog "#103102#It is not possible to customize the keyboard combination cmd+option on MAC OSX." Call hCloseDocument goto endsub else Warnlog "Shortcut did not work" Call hCloseDocument goto endsub end if end if printlog "Check if formatted word held its formatting" Call wTypeKeys ("") Call wTypeKeys ("", 3) Call wTypeKeys ("") FormatCharacter WaitSlot (5) Kontext Active.Setpage TabFont Kontext "TabFont" if Size.GetSelIndex <> 14 then Warnlog "formatted word has lost its size" endif if Style.GetSelIndex <> 4 then Warnlog "formatted word has lost its style" endif TabFont.Cancel printlog "Check if pasted word has default formatting" Call wTypeKeys ("") Call wTypeKeys ("", 3) Call wTypeKeys ("") FormatCharacter WaitSlot (5) Kontext Active.Setpage TabFont Kontext "TabFont" if Size.GetSelIndex <> DefaultSize then Warnlog "formatted word has no default size" endif if Style.GetSelIndex <> DefaultStyle then Warnlog "formatted word has no default style" endif TabFont.Cancel printlog "close previous opened document" Call hCloseDocument endcase