summaryrefslogtreecommitdiff
path: root/testautomation/writer
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2009-11-23 16:33:39 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2009-11-23 16:33:39 +0000
commit7d8ad2213bcd3caa2cc4bbf02695933d534fd028 (patch)
tree45f78333bcb68b32f012c4b552249494d99f0f3c /testautomation/writer
parent4018bfb201551af7e6e2b4379b516c133751e7e7 (diff)
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@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@276942 (milestone: OOO320:m2)
Diffstat (limited to 'testautomation/writer')
-rwxr-xr-xtestautomation/writer/optional/includes/hyphenation/w_hyphenation.inc659
-rwxr-xr-xtestautomation/writer/optional/input/hyphenation/tHyphenation.odtbin6608 -> 9034 bytes
-rw-r--r--testautomation/writer/optional/w_hyphenation.bas8
-rw-r--r--testautomation/writer/tools/includes/w_tools_hyphenation.inc85
4 files changed, 416 insertions, 336 deletions
diff --git a/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc b/testautomation/writer/optional/includes/hyphenation/w_hyphenation.inc
index c663faf68001..8b7296d1d5a4 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 8854a645a9d7..b2b0494cd4e7 100755
--- a/testautomation/writer/optional/input/hyphenation/tHyphenation.odt
+++ b/testautomation/writer/optional/input/hyphenation/tHyphenation.odt
Binary files differ
diff --git a/testautomation/writer/optional/w_hyphenation.bas b/testautomation/writer/optional/w_hyphenation.bas
index e71c1ad8a978..0a4fe264f5ab 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 000000000000..c49c07a7f3f2
--- /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@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