summaryrefslogtreecommitdiffstats
path: root/testautomation/writer/optional/includes
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-07-16 15:07:54 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-07-16 15:07:54 +0000
commitd805bf8cfc822eb118dfbc1a813ef4d683d368e4 (patch)
tree7a82a27d40ada2413bc893754efcf8b793a4bae3 /testautomation/writer/optional/includes
parentCWS-TOOLING: integrate CWS tbo07 (diff)
downloadcore-d805bf8cfc822eb118dfbc1a813ef4d683d368e4.tar.gz
core-d805bf8cfc822eb118dfbc1a813ef4d683d368e4.zip
CWS-TOOLING: integrate CWS mox01
2009-07-07 09:26:41 +0200 hde r273770 : added testcase tShortcutPasteUnformattedText 2009-07-07 09:26:04 +0200 hde r273769 : added testcase tShortcutPasteUnformattedText 2009-06-26 17:27:39 +0200 mba r273431 : #i17563#: moved slot to sfx2 2009-06-26 17:26:40 +0200 mba r273430 : #i17563#: moved slot to sfx2 2009-06-24 21:16:18 +0200 mox r273365 : Update UI strings to follow the Uppercase All Convention. 2009-06-13 23:26:58 +0200 mox r272958 : CWS-TOOLING: rebase CWS mox01 to trunk@272827 (milestone: DEV300:m50) 2009-04-04 14:26:36 +0200 mox r270524 : Fix bugs to make shortcut work 2009-04-04 12:38:36 +0200 mox r270523 : Command definition for shortcut 2009-04-04 08:56:29 +0200 mox r270522 : Revert changes of menu item 2009-04-04 08:28:46 +0200 mox r270521 : Revert changes 2009-03-02 20:41:11 +0100 mox r268690 : Menu item and shortcut key for Paste and Match Style 2009-03-02 20:40:45 +0100 mox r268689 : Menu item and shortcut key for Paste and Match Style
Diffstat (limited to 'testautomation/writer/optional/includes')
-rwxr-xr-xtestautomation/writer/optional/includes/shortcut/w_shortcuts.inc102
1 files changed, 102 insertions, 0 deletions
diff --git a/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc b/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc
index fb5f98968bcd..3a38dda8d56f 100755
--- a/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc
+++ b/testautomation/writer/optional/includes/shortcut/w_shortcuts.inc
@@ -758,3 +758,105 @@ testcase tShortcutSubscript
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 = "<Mod1 Mod2 Shift V>"
+ 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 ("<Home>")
+ Call wTypeKeys ("<Mod1 Right>", 3)
+ Call wTypeKeys ("<Mod1 Shift Right>")
+
+ 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 ("<End>")
+ printlog "insert a space"
+ Call wTypeKeys ("<Space>")
+ printlog "Press Ctrl+Alt+Shift+V (cmd+option+shift+V on Mac)"
+ Call wTypeKeys ( vShortcut )
+ wait 500
+
+ Call wTypeKeys ("<Mod1 Home>")
+ printlog "check if sentence is now: This is a formatted sentence formatted"
+ Call wTypeKeys ("<Shift End>")
+ 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 ("<Home>")
+ Call wTypeKeys ("<Mod1 Right>", 3)
+ Call wTypeKeys ("<Mod1 Shift Right>")
+
+ 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 ("<End>")
+ Call wTypeKeys ("<Mod1 Right>", 3)
+ Call wTypeKeys ("<Mod1 Shift Left>")
+
+ 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