[ooo-build-commit] Branch 'ooo/OOO320' - 2 commits - testautomation/extensions testautomation/global testautomation/writer
Jan Holesovsky
kendy at kemper.freedesktop.org
Mon Nov 23 20:22:55 PST 2009
testautomation/extensions/optional/includes/help.inc | 3
testautomation/global/tools/includes/required/t_option2.inc | 6
testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc | 659 ++++------
testautomation/writer/optional/input/hyphenation/tHyphenation.odt |binary
testautomation/writer/optional/w_hyphenation.bas | 8
testautomation/writer/required/includes/w_005b_.inc | 37
testautomation/writer/required/includes/w_020_.inc | 12
testautomation/writer/tools/includes/w_tools_hyphenation.inc | 85 +
8 files changed, 460 insertions(+), 350 deletions(-)
New commits:
commit 2704f95ace7808614462f8d3df345ef674e68032
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Nov 23 15:33:39 2009 +0000
CWS-TOOLING: integrate CWS fwk125
2009-11-19 08:11:20 +0100 jsk r277554 : fwk125: #i105760# - removed warnlog, re-enabled autotest e_help.bas
2009-11-16 16:21:49 +0100 tl r277521 : #i106571# fixed locale list for dictionaries to get rid of duplicate entries
2009-11-12 08:47:31 +0100 hde r277469 : rework of hyphenation
2009-11-11 15:25:16 +0100 hde r277462 : rework of hyphenation
2009-11-11 15:24:09 +0100 hde r277461 : rework of hyphenation
2009-11-11 13:52:02 +0100 hde r277453 : new include for hyphenation tools
2009-11-10 12:28:51 +0100 tl r277427 : #i102304# fix for hyphenation dialog
2009-11-10 12:00:10 +0100 mav r277425 : #i10000# A workaround for pch and windows headers conflict
2009-11-10 11:58:32 +0100 mav r277424 : #i10000# A workaround for pch and windows headers conflict
2009-11-09 15:47:59 +0100 kso r277414 : #i16732# fixed url matching.
2009-11-09 11:51:40 +0100 mav r277406 : #i10000# use precompiled headers
2009-11-08 23:53:03 +0100 mav r277399 : #i10000# fix warning
2009-11-08 23:50:23 +0100 mav r277398 : #i10000# adapt for unix
2009-11-08 23:49:52 +0100 mav r277397 : #i10000# adapt for unix
2009-11-08 21:26:06 +0100 mav r277396 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320 at 277373 (milestone: OOO320:m4)
2009-11-06 16:30:27 +0100 ab r277394 : #i106100# Hold references to packages to speed up further calls to getDeployedPackages()
2009-11-06 15:58:48 +0100 mav r277392 : #i102464# check the Windows ACL
2009-11-06 15:58:23 +0100 mav r277391 : #i102464# check the Windows ACL
2009-11-04 11:54:06 +0100 tl r277342 : #i106497# incorrectly found 'supported languages' fixed
2009-11-04 10:40:51 +0100 tl r277335 : #i106571# dictionary updates for Polish and Swedish.
2009-10-28 09:54:41 +0100 tl r277236 : #i106100# context menu performance
2009-10-27 15:47:05 +0100 tl r277213 : #i106100# context menu performance
2009-10-23 17:31:56 +0200 mav r277170 : #i106075# use correct path to inprocserv.dll
2009-10-23 16:07:27 +0200 mav r277168 : #i105760# seek the temporary file to beginning also for URL case
2009-10-23 11:03:58 +0200 mav r277134 : CWS-TOOLING: rebase CWS fwk125 to branches/OOO320 at 276942 (milestone: OOO320:m2)
diff --git a/testautomation/extensions/optional/includes/help.inc b/testautomation/extensions/optional/includes/help.inc
index 8bcddfe..7807287 100755
--- a/testautomation/extensions/optional/includes/help.inc
+++ b/testautomation/extensions/optional/includes/help.inc
@@ -39,9 +39,6 @@
testcase tExtensibleHelp
- warnlog( "#i105760# - Extensible help not displayed" )
- goto endsub
-
'///<h1>Extensible help</h1>
'///<u><pre>Synopsis</pre></u>Beginning with CWS ab38 extensions can extend the help application with index entries and content<br>
diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
index c663faf..8b7296d 100755
--- a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
+++ b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
@@ -40,354 +40,347 @@
' #1 tHyphenation_1
' #1 tHyphenation_2
' #1 tHyphenation_3
+' #1 tHyphenation_4
'*
'\***********************************************************************
testcase tHyphenation_1
- Dim testFile as String
- Dim testWord as String
- Dim firstPartOfTestWord as String
- Dim secondPartOfTestWord as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- firstPartOfTestWord = "fol"
- secondPartOfTestWord = "follow"
-
- PrintLog "- Test Hyphenation using ctrl and -"
-
- printlog "Test Hyphenation using ctrl and -"
-
- printlog "open a test file"
- Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
- Call sMakeReadOnlyDocumentEditable
-
- Call wTypeKeys "<End><Shift Mod1 Left>"
-
- EditCopy
-
- printlog "add '-' between 'fol' and 'lowing' , then press 3 times 'space bar' (pc). (7 times on linux)"
- printlog "+ check if fol in the end of the line"
- if GetClipboardText = testWord then
- Call wTypeKeys "<Right>" , 3
- Call wTypeKeys "<Mod1 SUBTRACT>"
- Call wTypeKeys "<Home>"
- if gPlatGroup <> "unx" then
- Call wTypeKeys "<SPACE>" ,3
- else
- Call wTypeKeys "<SPACE>" ,7
- end if
-
- Call wTypeKeys "<End><Left><Shift Mod1 Left>"
- EditCopy
-
- if GetClipboardText <> firstPartOfTestWord then
- Warnlog "The hyphenation does NOT work well in first part!"
- end if
-
- printlog "add '-' between 'follow' and 'ing' , then press 6 times 'space bar'"
- printlog "+ check if follow in the end of the line ."
- Call wTypeKeys "<Mod1 z>",2
- Call wTypeKeys "<End>"
- Call wTypeKeys "<Left>",3
- Call wTypeKeys "<Mod1 SUBTRACT>"
- Call wTypeKeys "<Home>"
- if gPlatGroup <> "unx" then
- Call wTypeKeys "<SPACE>" ,3
- else
- Call wTypeKeys "<SPACE>" ,6
- end if
- Call wTypeKeys "<End><Left><Shift Mod1 Left>"
- EditCopy
-
- if GetClipboardText = secondPartOfTestWord then
- Call wTypeKeys "<Home>"
-
- printlog "press 5 times 'space bar'"
- printlog "check if fol in the end of the line ."
- if gPlatGroup <> "unx" then
- Call wTypeKeys "<SPACE>" ,3
- else
- Call wTypeKeys "<SPACE>" ,5
- end if
- Call wTypeKeys "<End><Shift Mod1 Left>"
- EditCopy
-
- if GetClipboardText <> firstPartOfTestWord then
- Warnlog "The hyphenation does NOT work well in first part, but it works fine in second part!"
- end if
- else
- Warnlog "The hyphenation does NOT work well in second part!"
- end if
-
- else
- Warnlog "The test word is wrong !!"
- end if
-
- Call hCloseDocument
-
-endcase
+ Dim testFile as String
+ Dim testWord as String
+ Dim PartOfTestWord as String
+
+ testFile = "tHyphenation.odt"
+ testWord = "following"
+ PartOfTestWord = "fol"
+
+ printlog "Test Hyphenation using ctrl and -"
+
+ printlog "open a test file"
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ ' we must assure the word 'following' is the first word in second line
+ ' otherwise the test will not work correctly
+ if fPrepareHyphenationDocument(testWord) = false then
+ Warnlog "Unable to prepare document for hyphenation. Check testcase"
+ Call hCloseDocument
+ end if
+
+ printlog "add '-' between 'fol' and 'lowing'"
+ printlog "+ check if fol in the end of the line"
+
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Right>" , 3
+ Call wTypeKeys "<Mod1 SUBTRACT>"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ Call wTypeKeys "<Delete>"
+
+ Call wTypeKeys "<End><Left>"
+ Call wTypeKeys "<Mod1 Shift Left>"
+ EditCopy
+
+ if GetClipboardText <> PartOfTestWord then
+ Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
+ end if
+
+ Call hCloseDocument
+
+endcase
'-------------------------------------------------------------------------
testcase tHyphenation_2
-warnlog "#i102304# - outcommenting tHyphenation_2 due to bug."
-goto endsub
-
- Dim testFile as String
- Dim testWord as String
- Dim firstPartOfTestWord as String
- Dim secondPartOfTestWord as String
- Dim testWordInHyphenationDlg as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- testWordInHyphenationDlg = "fol=low-ing"
- firstPartOfTestWord = "fol"
- secondPartOfTestWord = "follow"
-
- PrintLog "- Test Hyphenation using Tools/Hyphenation ,test like fol-lowing"
-
- printlog "Test Hyphenation using Tools/Hyphenation ,test like fol-lowing"
-
- printlog "open a test file"
- Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
- Call sMakeReadOnlyDocumentEditable
-
- Call wTypeKeys "<End><Shift Mod1 Left>"
-
- EditCopy
-
- if GetClipboardText <> testWord then
- Warnlog "The test word is wrong !!"
- goto endsub
- end if
-
- printlog "Press 3 times 'space bar'"
- Call wTypeKeys "<Home>"
- if gPlatGroup <> "unx" then
- Call wTypeKeys "<SPACE>" ,3
- else
- Call wTypeKeys "<SPACE>" ,6
- end if
-
- printlog "Tools/Hyphenation"
- ToolsLanguageHyphenate
- Kontext "Silbentrennung"
-
- if Not Silbentrennung.Exists then
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.Ok
- end if
- end if
- end if
- Warnlog "Unable to bring up Dialog 'Hyphenation'!"
- goto endsub
- end if
-
- printlog "check if get 'fol=low-ing'"
- if Wort.Gettext <> testWordInHyphenationDlg then
- Warnlog "#i40561# The test can NOT be seperated two times , or something wrong!"
- Silbentrennung.Cancel
- goto NOTest
- end if
-
- if NOT Vor.IsEnabled then
- Warnlog "the Vor button is Not enabled, or something wrong!"
- Silbentrennung.Cancel
- goto NOTest
- end if
-
- printlog "add '-' between 'fol' and 'lowing' using left arrow key"
- Vor.Click
- Silbentrennung.OK
-
- printlog "Close all dialogue, and recover the file to default"
- Kontext "Active"
- if NOT Active.Exists then
- Kontext "Silbentrennung"
- Silbentrennung.Cancel
- Warnlog "The first message box is NOT pop up"
- goto NOTest
- end if
-
- Active.Yes
-
- Kontext "Active"
- if NOT Active.Exists then
- Warnlog "The second message box is NOT pop up"
- goto endsub
- end if
-
- Active.OK
-
- printlog "Press 3 times 'space bar' in front of the line"
- Call wTypeKeys "<BACKSPACE>",3
- Call wTypeKeys "<SPACE>",3
-
- Call wTypeKeys "<End><Left><Shift Mod1 Left>"
- EditCopy
-
- printlog "Check if get 'fol'"
- if GetClipboardText <> firstPartOfTestWord then
- Warnlog "The hyphenation does NOT work well in first part!"
- end if
-
-NOTest:
- Call hCloseDocument
-
-endcase
+ Dim testFile as String
+ Dim testWord as String
+ Dim PartOfTestWord as String
+
+ testFile = "tHyphenation.odt"
+ testWord = "following"
+ PartOfTestWord = "follow"
+
+ printlog "Test Hyphenation using ctrl and -"
+
+ printlog "open a test file"
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ ' we must assure the word 'following' is the first word in second line
+ ' otherwise the test will not work correctly
+ if fPrepareHyphenationDocument(testWord) = false then
+ Warnlog "Unable to prepare document for hyphenation. Check testcase"
+ Call hCloseDocument
+ end if
+
+ printlog "add '-' between 'follow' and 'ing'"
+ printlog "+ check if 'follow' in the end of the line"
+
+ Call wTypeKeys "<Home>"
+ Call wTypeKeys "<Right>" , 6
+ Call wTypeKeys "<Mod1 SUBTRACT>"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ if gPlatgroup = "unx" then
+ Call wTypeKeys "<Delete>", 6
+ else
+ Call wTypeKeys "<Delete>", 7
+ end if
+
+ Call wTypeKeys "<End><Left>"
+ Call wTypeKeys "<Mod1 Shift Left>"
+ EditCopy
+
+ if GetClipboardText <> PartOfTestWord then
+ Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
+ end if
+
+ Call hCloseDocument
+
+endcase
'-------------------------------------------------------------------------
testcase tHyphenation_3
-warnlog "#i102304# - outcommenting tHyphenation_3 due to bug."
-goto endsub
-
- Dim testFile as String
- Dim testWord as String
- Dim firstPartOfTestWord
- Dim secondPartOfTestWord as String
- Dim testWordInHyphenationDlg1 as String
- Dim testWordInHyphenationDlg2 as String
-
- testFile = "tHyphenation.odt"
- testWord = "following"
- firstPartOfTestWord = "fol"
- secondPartOfTestWord = "follow"
- testWordInHyphenationDlg1 = "fol=low-ing"
- testWordInHyphenationDlg2 = "fol-low=ing"
-
- printLog "- Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
- printlog "Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
-
- printlog "open a test file"
- Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
- Call sMakeReadOnlyDocumentEditable
-
- Call wTypeKeys "<End><Shift Mod1 Left>"
-
- EditCopy
-
- if GetClipboardText <> testWord then
- Warnlog "The test word is wrong !!"
- goto endsub
- end if
-
- printlog "Press 3 times 'space bar'"
- Call wTypeKeys "<Home>"
- if gPlatGroup <> "unx" then
- Call wTypeKeys "<SPACE>" ,3
- else
- Call wTypeKeys "<SPACE>" ,6
- end if
-
- printlog "Tools/Hyphenation"
- ToolsLanguageHyphenate
- Kontext "Silbentrennung"
-
- if Not Silbentrennung.Exists then
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Yes
-
- Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then Active.Ok
- end if
- end if
- end if
- Warnlog "Unable to bring up Dialog 'Hyphenation'!"
- goto endsub
- end if
-
- printlog "check if get 'fol=low-ing'"
- if Wort.Gettext <> testWordInHyphenationDlg1 then
- Warnlog "#i40561# The test can NOT be seperated two times , or something wrong!"
- Silbentrennung.Cancel
- goto NOTest
- end if
-
- printlog "click left arrow key"
- if NOT Vor.IsEnabled then
- Warnlog "the Vor button is Not enabled, or something wrong!"
- Silbentrennung.Cancel
- goto NOTest
- end if
- Vor.Click
-
- printlog "check if get ''fol-low=ing'"
- if Wort.Gettext <> testWordInHyphenationDlg2 then
- Warnlog "The test word should be changed after clicking Vor!"
- goto endsub
- end if
-
- printlog "add '-' between 'follow' and 'ing' pressing right arrow key"
- if NOT Zurueck.IsEnabled then
- Warnlog "the Zuruech button is Not enabled, or something wrong!"
- goto endsub
- end if
- Zurueck.Click
-
- printlog "check if get 'fol-low=ing'"
- if Wort.Gettext <> testWordInHyphenationDlg1 then
- Warnlog "The test word should be changed after clicking Zurueck!"
- goto endsub
- end if
-
- Sleep 1
-
- printlog "close all dialogue"
- Silbentrennung.OK
-
- Kontext "Active"
- if NOT Active.Exists then
- Warnlog "The first message box is NOT pop up"
- goto endsub
- end if
-
- Active.Yes
-
- Kontext "Active"
- if NOT Active.Exists then
- Warnlog "The second message box is NOT pop up"
- goto endsub
- end if
-
- Active.OK
-
- printlog "recover to the default file and press 3 sparc bar in front of the line"
- Call wTypeKeys "<BACKSPACE>",3
- Call wTypeKeys "<SPACE>",3
-
- Call wTypeKeys "<End><Left><Shift Mod1 Left>"
- EditCopy
-
- printlog "check if get 'follow' in the end of the line"
- if GetClipboardText = secondPartOfTestWord then
- Call wTypeKeys "<Home>"
- Call wTypeKeys "<SPACE>" , 5
-
- Call wTypeKeys "<End><Shift Mod1 Left>"
- EditCopy
+ Dim testFile as String
+ Dim testWord as String
+ Dim firstPartOfTestWord as String
+ Dim secondPartOfTestWord as String
+ Dim testWordInHyphenationDlg as String
+
+ testFile = "tHyphenation.odt"
+ testWord = "following"
+ testWordInHyphenationDlg = "fol=low-ing"
+ firstPartOfTestWord = "fol"
+ secondPartOfTestWord = "follow"
+
+ printlog "Test Hyphenation using Tools/Hyphenation ,test like fol-lowing"
+
+ printlog "open a test file"
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ ' we must assure the word 'following' is the first word in second line
+ ' otherwise the test will not work correctly
+ if fPrepareHyphenationDocument(testWord) = false then
+ Warnlog "Unable to prepare document for hyphenation. Check testcase"
+ Call hCloseDocument
+ end if
+
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ if gPlatgroup = "unx" then
+ Call wTypeKeys "<Delete>", 6
+ else
+ Call wTypeKeys "<Delete>", 7
+ end if
+
+ printlog "Tools/Hyphenation"
+ ToolsLanguageHyphenate
+ Kontext "Silbentrennung"
+
+ if Not Silbentrennung.Exists then
+ Warnlog "Unable to bring up Dialog 'Hyphenation'!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog "check if get 'fol=low-ing'"
+ if Wort.Gettext <> testWordInHyphenationDlg then
+ Warnlog "Expected " & testWordInHyphenationDlg & " but found " & Wort.Gettext
+ Silbentrennung.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ if NOT Vor.IsEnabled then
+ Warnlog "the 'Vor' button is Not enabled, or something wrong!"
+ Silbentrennung.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog "add '-' between 'fol' and 'lowing' using left arrow key"
+ Vor.Click
+ Silbentrennung.OK
+
+ ' Messagebox 'Start hypheantion from the beginning ?
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes
+ catch
+ Active.ok
+ endcatch
+ else
+ Warnlog "No messagebox asking for hyphenate at beginning of document"
+ end if
+ end if
+
+ ' End of hyphenation message
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Ok
+ catch
+ Active.yes
+ endcatch
+ else
+ Warning "No 'end of hyphenation' messagebox"
+ end if
+ end if
+
+ printlog "Press 3 times 'space bar' in front of the line"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ Call wTypeKeys "<Left>"
+ Call wTypeKeys "<Shift Mod1 Left>"
+ EditCopy
+
+ printlog "Check if get 'fol'"
+ if GetClipboardText <> firstPartOfTestWord then
+ Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & PartOfTestWord & "'"
+ end if
+
+ Call hCloseDocument
+
+endcase
- if GetClipboardText <> firstPartOfTestWord then
- Warnlog "The hyphenation does NOT work well in first part, but it works fine in second part!"
- end if
- else
- Warnlog "The hyphenation does NOT work well in second part!"
- end if
-NOTest:
- Call hCloseDocument
+'-------------------------------------------------------------------------
+testcase tHyphenation_4
+
+ Dim testFile as String
+ Dim testWord as String
+ Dim firstPartOfTestWord as string
+ Dim secondPartOfTestWord as String
+ Dim testWordInHyphenationDlg1 as String
+ Dim testWordInHyphenationDlg2 as String
+
+ testFile = "tHyphenation.odt"
+ testWord = "following"
+ firstPartOfTestWord = "fol"
+ secondPartOfTestWord = "follow"
+ testWordInHyphenationDlg1 = "fol=low-ing"
+ testWordInHyphenationDlg2 = "fol-low=ing"
+
+ printLog "- Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
+ printlog "Test Hyphenation using Tools/Hyphenation ,test like follow-ing"
+
+ printlog "open a test file"
+ Call hFileOpen ( gTesttoolPath + "writer\optional\input\hyphenation\" + testFile )
+ Call sMakeReadOnlyDocumentEditable
+
+ ' we must assure the word 'following' is the first word in second line
+ ' otherwise the test will not work correctly
+ if fPrepareHyphenationDocument(testWord) = false then
+ Warnlog "Unable to prepare document for hyphenation. Check testcase"
+ Call hCloseDocument
+ end if
+
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ if gPlatgroup = "unx" then
+ Call wTypeKeys "<Delete>", 6
+ else
+ Call wTypeKeys "<Delete>", 7
+ end if
+
+ printlog "Tools/Hyphenation"
+ ToolsLanguageHyphenate
+ Kontext "Silbentrennung"
+
+ if Not Silbentrennung.Exists then
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog "check if get 'fol=low-ing'"
+ if Wort.Gettext <> testWordInHyphenationDlg1 then
+ Warnlog "Expected " & testWordInHyphenationDlg1 & " but found " & Wort.Gettext
+ Silbentrennung.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog "click left arrow key"
+ if NOT Vor.IsEnabled then
+ Warnlog "the Vor button is Not enabled, or something wrong!"
+ Silbentrennung.Cancel
+ Call hCloseDocument
+ goto endsub
+ end if
+ Vor.Click
+
+ printlog "check if get ''fol-low=ing'"
+ if Wort.Gettext <> testWordInHyphenationDlg2 then
+ Warnlog "Expected " & testWordInHyphenationDlg2 & " but found " & Wort.Gettext
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ printlog "add '-' between 'follow' and 'ing' pressing right arrow key"
+ if NOT Zurueck.IsEnabled then
+ Warnlog "the 'Back' button is Not enabled, or something wrong!"
+ Call hCloseDocument
+ goto endsub
+ end if
+ Zurueck.Click
+
+ printlog "check if get 'fol-low=ing'"
+ if Wort.Gettext <> testWordInHyphenationDlg1 then
+ Warnlog "The test word should be changed after clicking Zurueck!"
+ Call hCloseDocument
+ goto endsub
+ end if
+
+ Sleep 1
+
+ printlog "close all dialogs"
+ Silbentrennung.OK
+
+ ' Messagebox 'Start hypheantion from the beginning ?
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Yes
+ catch
+ Active.ok
+ endcatch
+ else
+ Warnlog "No messagebox asking for hyphenate at beginning of document"
+ end if
+ end if
+
+ ' End of hyphenation message
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ Active.Ok
+ catch
+ Active.yes
+ endcatch
+ else
+ Warning "No 'end of hyphenation' messagebox"
+ end if
+ end if
+
+ printlog "Press 3 times 'space bar' in front of the line"
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<End>"
+ Call wTypeKeys "<Left>"
+ Call wTypeKeys "<Shift Mod1 Left>"
+ EditCopy
+
+ printlog "Check if get 'follow'"
+ if GetClipboardText <> secondPartOfTestWord then
+ Warnlog "The hyphenation does NOT work ! Found '" & GetClipboardText & "' and not '" & secondPartOfTestWord & "'"
+ end if
+
+ Call hCloseDocument
+
endcase
diff --git a/testautomation/writer/optional/input/hyphenation/tHyphenation.odt b/testautomation/writer/optional/input/hyphenation/tHyphenation.odt
index 8854a64..b2b0494 100755
Binary files a/testautomation/writer/optional/input/hyphenation/tHyphenation.odt and b/testautomation/writer/optional/input/hyphenation/tHyphenation.odt differ
diff --git a/testautomation/writer/optional/w_hyphenation.bas b/testautomation/writer/optional/w_hyphenation.bas
index e71c1ad..0a4fe26 100644
--- a/testautomation/writer/optional/w_hyphenation.bas
+++ b/testautomation/writer/optional/w_hyphenation.bas
@@ -41,15 +41,17 @@ sub main
use "writer\tools\includes\w_tools.inc"
use "writer\tools\includes\w_tool4.inc"
+ use "writer\tools\includes\w_tools_hyphenation.inc"
use "writer\optional\includes\hyphenation\w_hyphenation.inc"
printlog Chr(13) + "******* Writer - Hyphenation - Test *******"
Call hStatusIn ( "writer" , "w_hyphenation.bas" )
Call wEnableHyphenation(true)
- Call tHyphenation_1 'Test Hyphenation using ctrl and "-"
- Call tHyphenation_2 'Test Hyphenation using Tools/Hyphenation ,test like fol-lowing
- Call tHyphenation_3 'Test Hyphenation using Tools/Hyphenation ,test like follow-ing
+ Call tHyphenation_1
+ Call tHyphenation_2
+ Call tHyphenation_3
+ Call tHyphenation_4
Call wEnableHyphenation(false)
Call hStatusOut
diff --git a/testautomation/writer/tools/includes/w_tools_hyphenation.inc b/testautomation/writer/tools/includes/w_tools_hyphenation.inc
new file mode 100644
index 0000000..c49c07a
--- /dev/null
+++ b/testautomation/writer/tools/includes/w_tools_hyphenation.inc
@@ -0,0 +1,85 @@
+'**************************************************************************
+'* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+'*
+'* Copyright 2008 by Sun Microsystems, Inc.
+'*
+'* OpenOffice.org - a multi-platform office productivity suite
+'*
+'* $RCSfile: w_tools_hyphenation.inc,v $
+'*
+'* $Revision: 1.2 $
+'*
+'* last change: $Author: vg $ $Date: 2008-08-18 12:43:40 $
+'*
+'* 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
+'* <http://www.openoffice.org/license.html>
+'* for a copy of the LGPLv3 License.
+'*
+'/******************************************************************
+'* **
+'* owner : helge.delfs at sun.com **
+'* **
+'* short description : Misc tools for writer hyphenation tests **
+'* **
+'\******************************************************************
+
+
+
+function fPrepareHyphenationDocument(testWord as string)
+
+ Dim SpaceTickCount as integer
+
+ SpaceTickCount = 1
+ Do
+ Call wTypeKeys "<Mod1 Home>"
+ Call wTypeKeys "<Down>"
+ Call wTypeKeys "<Mod1 Shift Right>"
+ try
+ EditCopy
+ catch
+ endcatch
+ if trim(GetClipboardText) <> testWord then
+ EditSearchAndReplace
+ Kontext "FindAndReplace"
+ SearchFor.SetText testWord
+ SearchNow.Click
+ Kontext "Active"
+ if Active.Exists then
+ if Active.GetRT = 304 then
+ try
+ active.Yes
+ catch
+ Warnlog Active.Gettext
+ Active.ok
+ endcatch
+ end if
+ end if
+ Kontext "FindAndReplace"
+ FindAndReplace.Close
+ Call wTypeKeys "<Mod1 Left>"
+ Call wTypeKeys "<Space>"
+ inc SpaceTickCount
+ if SpaceTickCount >= 30 then
+ fPrepareHyphenationDocument = false
+ exit do
+ end if
+ else
+ fPrepareHyphenationDocument = true
+ exit do
+ end if
+ Loop
+
+end function
commit 0de42b804b965cdd6ad8604ec926d7b8e44a4520
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Mon Nov 23 14:54:29 2009 +0000
CWS-TOOLING: integrate CWS automationooo320m5cat0
2009-11-20 10:34:15 +0100 hde r277574 : added exception for unx because page isn't centered like on windows
2009-11-20 08:01:23 +0100 hde r277571 : added exception for unx because page isn't centered like on windows
2009-11-18 14:00:51 +0100 hde r277546 : fixed loop in Path-Dialog for Asian languages
diff --git a/testautomation/global/tools/includes/required/t_option2.inc b/testautomation/global/tools/includes/required/t_option2.inc
index 74f49d9..fdf11f1 100644
--- a/testautomation/global/tools/includes/required/t_option2.inc
+++ b/testautomation/global/tools/includes/required/t_option2.inc
@@ -136,9 +136,9 @@ sub DialogeFuerTypenKontrollieren
if OeffnenDlg.Exists() then
if ( Dateityp.IsVisible ) then
Warnlog "The normal FileOpen-Dialog is visible with the Filetype-Listbox => BUG!"
- OeffnenDlg.Cancel
- exit do
endif
+ OeffnenDlg.Cancel
+ exit do
endif
Kontext "PfadeAuswaehlen"
@@ -146,6 +146,8 @@ sub DialogeFuerTypenKontrollieren
PfadeAuswaehlen.Cancel
exit do
end if
+
+ iExitCounter = iExitCounter + 1
loop
Kontext "TabPfade"
else
diff --git a/testautomation/writer/required/includes/w_005b_.inc b/testautomation/writer/required/includes/w_005b_.inc
index ce7ce26..0e4f8ea 100755
--- a/testautomation/writer/required/includes/w_005b_.inc
+++ b/testautomation/writer/required/includes/w_005b_.inc
@@ -892,9 +892,16 @@ testcase tFormatAlignmentArea
Call hNewDocument
printlog " Paste a rectangle from draw via clipboard"
- Call wZeichenobjektEinfuegen ( "Rechteck", 45, 30, 55, 45 )
- sleep (1)
- Call wObjektSelektieren ( 43, 25, 60, 50 )
+ if gPlatgroup = "unx" then
+ Call wZeichenobjektEinfuegen ( "Rechteck", 10, 30, 20, 45 )
+ sleep (1)
+ gMouseClick ( 15, 38 )
+ else
+ Call wZeichenobjektEinfuegen ( "Rechteck", 45, 30, 55, 45 )
+ sleep (1)
+ Call wObjektSelektieren ( 43, 25, 60, 50 )
+ endif
+
Sleep 1
try
printlog " Format / Anchor / As Character"
@@ -1151,7 +1158,11 @@ testcase tFormatStyleEdit
printlog " Insert a textobject from toolbar"
Sleep 2
- Call gMouseMove(50, 20, 70, 40)
+ if gPlatgroup = "unx" then
+ Call gMouseMove(10, 20, 30, 40)
+ else
+ Call gMouseMove(50, 20, 70, 40)
+ endif
hUseAsyncSlot( "FormatStyleBold" )
printlog " Format / Style / Bold"
@@ -1220,7 +1231,11 @@ testcase tFormatAlignmentEdit
Textobjekt.Click
printlog " Insert a textbox via 'Draw functions' toolbar"
- Call gMouseMove(50, 20, 70, 40)
+ if gPlatgroup = "unx" then
+ Call gMouseMove(10, 20, 30, 40)
+ else
+ Call gMouseMove(50, 20, 70, 40)
+ endif
printlog " Insert some text in document"
Call wTypeKeys ("Ein Wort")
@@ -1259,7 +1274,11 @@ testcase tFormatLineSpacing
Textobjekt.Click
printlog " In a textbox via 'Draw Functions' toolbox"
- Call gMouseMove(50, 20, 70, 40)
+ if gPlatgroup = "unx" then
+ Call gMouseMove(10, 20, 30, 40)
+ else
+ Call gMouseMove(50, 20, 70, 40)
+ endif
Sleep 1
printlog " Format / Spacing / Single line"
@@ -1300,7 +1319,11 @@ testcase tFormatParagraphEdit
Textobjekt.Click
printlog " In a textbox via 'Draw Functions' toolbox"
- Call gMouseMove(50, 20, 70, 40)
+ if gPlatgroup = "unx" then
+ Call gMouseMove(10, 20, 30, 40)
+ else
+ Call gMouseMove(50, 20, 70, 40)
+ endif
printlog " Format / Paragraph "
hUseAsyncSlot( "FormatParagraph" )
diff --git a/testautomation/writer/required/includes/w_020_.inc b/testautomation/writer/required/includes/w_020_.inc
index 62bffb9..05d1168 100755
--- a/testautomation/writer/required/includes/w_020_.inc
+++ b/testautomation/writer/required/includes/w_020_.inc
@@ -421,7 +421,11 @@ testcase t_TB_Form
wait 500
Label.Click
printlog " Insert a textbox from toolbox"
- Call hMalZeichnenMitSelektion ( 57, 20, 68, 25 )
+ if gplatgroup = "unx" then
+ Call hMalZeichnenMitSelektion ( 10, 40, 21, 25 )
+ else
+ Call hMalZeichnenMitSelektion ( 57, 20, 68, 25 )
+ endif
printlog "+ Open Control Properties"
Call sMenufunktionen("-Textbox-")
end if
@@ -450,7 +454,11 @@ testcase t_TB_Form
Combobox.Click
printlog " Insert a Combobox from toolbox"
Wait 500
- Call hMalZeichnenMitSelektion ( 57, 30, 68, 35 )
+ if gPlatgroup = "unx" then
+ Call hMalZeichnenMitSelektion ( 41, 40, 52, 35 )
+ else
+ Call hMalZeichnenMitSelektion ( 57, 30, 68, 35 )
+ endif
printlog "+ Step through pages of upcoming Autopilot"
Call sAutopilot_ListboxCombobox("Combo")
printlog "+ Open Control Properties"
More information about the ooo-build-commit
mailing list