summaryrefslogtreecommitdiff
path: root/testautomation/framework/optional
diff options
context:
space:
mode:
Diffstat (limited to 'testautomation/framework/optional')
-rwxr-xr-xtestautomation/framework/optional/f_CJK_GridLayout.bas6
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc1267
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc887
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc271
-rwxr-xr-xtestautomation/framework/optional/includes/options_ooo_general.inc615
-rwxr-xr-xtestautomation/framework/optional/includes/options_so_4.inc707
-rwxr-xr-xtestautomation/framework/optional/includes/options_so_5.inc612
-rw-r--r--[-rwxr-xr-x]testautomation/framework/optional/includes/w_grid_layout1.inc542
8 files changed, 2108 insertions, 2799 deletions
diff --git a/testautomation/framework/optional/f_CJK_GridLayout.bas b/testautomation/framework/optional/f_CJK_GridLayout.bas
index d131afc451ba..7d3d212fc7de 100755
--- a/testautomation/framework/optional/f_CJK_GridLayout.bas
+++ b/testautomation/framework/optional/f_CJK_GridLayout.bas
@@ -43,7 +43,7 @@ sub main
PrintLog "---------------------------------------------------------------------"
Printlog "----- Grid Layout for CJK in Writer -----"
PrintLog "---------------------------------------------------------------------"
-
+
use "framework\optional\includes\w_grid_layout1.inc"
sAsianLanguageFlag = CheckAsianLanguageSupport("Current")
@@ -80,7 +80,9 @@ sub LoadIncludeFiles
use "global\system\includes\gvariabl.inc"
use "global\tools\includes\required\t_doc1.inc"
use "global\tools\includes\required\t_tools1.inc"
- use "framework\tools\includes\CJK_tools.inc"
+ use "global\tools\includes\optional\t_docfuncs.inc"
+
+ use "framework\tools\includes\CJK_tools.inc"
gApplication = "WRITER"
Call GetUseFiles
end sub
diff --git a/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc b/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
index ce8dabdfaa7d..209e5b0ed0c9 100755..100644
--- a/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
+++ b/testautomation/framework/optional/includes/CJK_CollationDialogue_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* 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
@@ -39,213 +39,220 @@
testcase tLanguageTest_1
- Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
- Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
- Dim i as Integer
-
-
- select case iSprache
- case 01 :' English (USA)
- sKeyTypeEnglishUSA = "Alphanumeric"
- sKeyTypeSChinese = "Character set"
- sKeyTypeTChinese = "Numeric"
- sKeyTypeJapanese = "Character set"
- sKeyTypeKoren = "Character set"
- case 49 :' German
- sKeyTypeEnglishUSA = "Alphanumerisch"
- sKeyTypeSChinese = "Numerisch"
- sKeyTypeTChinese = "Numerisch"
- sKeyTypeJapanese = "Numerisch"
- sKeyTypeKoren = "Numerisch"
- case 55 :' Brazilian
- sKeyTypeEnglishUSA = "Alfanumérico"
- sKeyTypeSChinese = "Conjunto de caracteres"
- sKeyTypeTChinese = "numérico"
- sKeyTypeJapanese = "Conjunto de caracteres"
- sKeyTypeKoren = "Conjunto de caracteres"
- case 81 :' Japanese
- sKeyTypeEnglishUSA = "英数字"
- sKeyTypeSChinese = "ピンイン(中国語のローマ字表記法)"
- sKeyTypeTChinese = "ピンイン(中国語のローマ字表記法)"
- sKeyTypeJapanese = "数字"
- sKeyTypeKoren = "数字"
-' case 82 : ' Korean
-' sKeyTypeEnglishUSA = 1 'alphanumeric
-' sKeyTypeSChinese = 1 'Character set
-' sKeyTypeTChinese = 3 'Pin yin
-' sKeyTypeJapanese = 2 'Character set
-' sKeyTypeKoren = 3 'Character set
- case 86 :' Chinese (simplified)
- sKeyTypeEnglishUSA = "字母数字式"
- sKeyTypeSChinese = "字符集"
- sKeyTypeTChinese = "拼音"
- sKeyTypeJapanese = "字符集"
- sKeyTypeKoren = "字典"
- case 88 :' Chinese (traditional)
- sKeyTypeEnglishUSA = "字母數字式"
- sKeyTypeSChinese = "字型"
- sKeyTypeTChinese = "拼音"
- sKeyTypeJapanese = "字型"
- sKeyTypeKoren = "字典"
- case else :' Fallback
- PrintLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- sLanguageIDEnglishUSA = fGetCountryName(01)
- sLanguageIDSChinese = fGetCountryName(86)
- sLanguageIDTChinese = fGetCountryName(88)
- sLanguageIDJapanese = fGetCountryName(81)
- sLanguageIDKoren = fGetCountryName(82)
-
- call hNewDocument
-
- DocumentWriter.TypeKeys "test"
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 1
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- Sleep 2
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDTChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
- ' try fallback to 'Chinese (traditional)'
- try
- Sprache.Select ("Chinese (traditional)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
- for i = 1 to Sprache.getItemCount
- printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
- next i
- endcatch
- endcatch
- Sleep 2
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDJapanese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
- ' try fallback to 'Japanese'
- try
- Sprache.Select ("Japanese")
- catch
- qaErrorLog "Can't select even tha fallback: 'Japanese'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
- warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDKoren)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
- ' try fallback to 'Korean (RoK)'
- try
- Sprache.Select ("Korean (RoK)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
- for i = 1 to Sprache.getItemCount
- printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
- next i
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
- warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
- end if
-
- Sortieren.Cancel
-
- Call hCloseDocument
+ Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
+ Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
+ Dim i as Integer
+
+ '/// Check if the default setting for &quot;key type&quot; is right for CJK when alphanumeric is chosen in English
+
+ select case iSprache
+ case 01 :' English (USA)
+ sKeyTypeEnglishUSA = "Alphanumeric"
+ sKeyTypeSChinese = "Character set"
+ sKeyTypeTChinese = "Numeric"
+ sKeyTypeJapanese = "Character set"
+ sKeyTypeKoren = "Character set"
+ case 49 :' German
+ sKeyTypeEnglishUSA = "Alphanumerisch"
+ sKeyTypeSChinese = "Numerisch"
+ sKeyTypeTChinese = "Numerisch"
+ sKeyTypeJapanese = "Numerisch"
+ sKeyTypeKoren = "Numerisch"
+ case 55 :' Brazilian
+ sKeyTypeEnglishUSA = "Alfanumérico"
+ sKeyTypeSChinese = "Conjunto de caracteres"
+ sKeyTypeTChinese = "numérico"
+ sKeyTypeJapanese = "Conjunto de caracteres"
+ sKeyTypeKoren = "Conjunto de caracteres"
+ case 81 :' Japanese
+ sKeyTypeEnglishUSA = "英数字"
+ sKeyTypeSChinese = "ピンイン(中国語のローマ字表記法)"
+ sKeyTypeTChinese = "ピンイン(中国語のローマ字表記法)"
+ sKeyTypeJapanese = "数字"
+ sKeyTypeKoren = "数字"
+ ' case 82 : ' Korean
+ ' sKeyTypeEnglishUSA = 1 'alphanumeric
+ ' sKeyTypeSChinese = 1 'Character set
+ ' sKeyTypeTChinese = 3 'Pin yin
+ ' sKeyTypeJapanese = 2 'Character set
+ ' sKeyTypeKoren = 3 'Character set
+ case 86 :' Chinese (simplified)
+ sKeyTypeEnglishUSA = "字母数字式"
+ sKeyTypeSChinese = "字符集"
+ sKeyTypeTChinese = "拼音"
+ sKeyTypeJapanese = "字符集"
+ sKeyTypeKoren = "字典"
+ case 88 :' Chinese (traditional)
+ sKeyTypeEnglishUSA = "字母數字式"
+ sKeyTypeSChinese = "字型"
+ sKeyTypeTChinese = "拼音"
+ sKeyTypeJapanese = "字型"
+ sKeyTypeKoren = "字典"
+ case else :' Fallback
+ PrintLog "The test does not support the language " + iSprache
+ Goto endsub
+ end select
+
+ sLanguageIDEnglishUSA = fGetCountryName(01)
+ sLanguageIDSChinese = fGetCountryName(86)
+ sLanguageIDTChinese = fGetCountryName(88)
+ sLanguageIDJapanese = fGetCountryName(81)
+ sLanguageIDKoren = fGetCountryName(82)
+
+ call hNewDocument
+
+ DocumentWriter.TypeKeys "test"
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 1
+
+ '/// Open Tools/Sort
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: English and key type: alphanumeric
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ '/// Check to simplified Chinese
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ Sleep 2
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to traditional Chinese
+ try
+ Sprache.Select (sLanguageIDTChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
+ ' try fallback to 'Chinese (traditional)'
+ try
+ Sprache.Select ("Chinese (traditional)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
+ next i
+ endcatch
+ endcatch
+ Sleep 2
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Japanese
+ try
+ Sprache.Select (sLanguageIDJapanese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
+ ' try fallback to 'Japanese'
+ try
+ Sprache.Select ("Japanese")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Japanese'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
+ warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Korean
+ try
+ Sprache.Select (sLanguageIDKoren)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
+ ' try fallback to 'Korean (RoK)'
+ try
+ Sprache.Select ("Korean (RoK)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "("+i+"/"+ Sprache.getItemCount + "): '"+Sprache.getItemText(i)+"'"
+ next i
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
+ warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ Sortieren.Cancel
+
+ Call hCloseDocument
endcase
@@ -253,458 +260,452 @@ endcase
testcase tLanguageTest_2
- Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
- Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
- Dim i as Integer
-
-
- select case iSprache
- case 01 :' English (USA)
- sKeyTypeEnglishUSA = "Numeric"
- sKeyTypeSChinese = "Numeric"
- sKeyTypeTChinese = "Numeric"
- sKeyTypeJapanese = "Numeric"
- sKeyTypeKoren = "Numeric"
- case 49 :' German
- sKeyTypeEnglishUSA = "Numerisch"
- sKeyTypeSChinese = "Numerisch"
- sKeyTypeTChinese = "Numerisch"
- sKeyTypeJapanese = "Numerisch"
- sKeyTypeKoren = "Numerisch"
- case 55 :' Brazilian
- sKeyTypeEnglishUSA = "numérico"
- sKeyTypeSChinese = "numérico"
- sKeyTypeTChinese = "numérico"
- sKeyTypeJapanese = "numérico"
- sKeyTypeKoren = "numérico"
- case 81 :' Japanese
- sKeyTypeEnglishUSA = "数字"
- sKeyTypeSChinese = "数字"
- sKeyTypeTChinese = "数字"
- sKeyTypeJapanese = "数字"
- sKeyTypeKoren = "数字"
-' case 82 ' Korean
-' sKeyTypeEnglishUSA = 2 'numeric
-' sKeyTypeSChinese = 4 'numeric
-' sKeyTypeTChinese = 4 'numeric
-' sKeyTypeJapanese = 4 'numeric
-' sKeyTypeKoren = 4 'numeric
- case 86 :' Chinese (simplified)
- sKeyTypeEnglishUSA = "数字"
- sKeyTypeSChinese = "数字"
- sKeyTypeTChinese = "数字"
- sKeyTypeJapanese = "数字"
- sKeyTypeKoren = "数字"
- case 88 :' Chinese (traditional)
- sKeyTypeEnglishUSA = "數字"
- sKeyTypeSChinese = "數字"
- sKeyTypeTChinese = "數字"
- sKeyTypeJapanese = "數字"
- sKeyTypeKoren = "數字"
- case else :' Fallback
- printLog "The test does not support the language " + iSprache
- Goto endsub
- end select
-
- sLanguageIDEnglishUSA = fGetCountryName(01)
- sLanguageIDSChinese = fGetCountryName(86)
- sLanguageIDTChinese = fGetCountryName(88)
- sLanguageIDJapanese = fGetCountryName(81)
- sLanguageIDKoren = fGetCountryName(82)
-
- call hNewDocument
-
- DocumentWriter.TypeKeys "123"
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 1
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- for i = 1 to Sprache.getItemCount
- printlog "" + i + ": '" + Sprache.getItemText(i) + "'"
- next i
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeSChinese then
- warnlog "The default key type for Simplified Chinese should be: '" + sKeyTypeSChinese + "' but is '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDTChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
- ' try fallback to 'Chinese (traditional)'
- try
- Sprache.Select ("Chinese (traditional)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeTChinese then
- warnlog "The default key type for traditional Chinese should be " + sKeyTypeTChinese + " but get " + Schluesseltyp1.GetSelText
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDJapanese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
- ' try fallback to 'Japanese'
- try
- Sprache.Select ("Japanese")
- catch
- qaErrorLog "Can't select even tha fallback: 'Japanese'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
- warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
- end if
-
- try
- Sprache.Select (sLanguageIDEnglishUSA)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
- ' try fallback to 'English (USA)'
- try
- Sprache.Select ("English (USA)")
- catch
- qaErrorLog "Can't select even tha fallback: 'English (USA)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeEnglishUSA
- catch
- qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
- endcatch
-
- try
- Sprache.Select (sLanguageIDKoren)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
- ' try fallback to 'Korean (RoK)'
- try
- Sprache.Select ("Korean (RoK)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
- endcatch
- endcatch
- Sleep 2
- if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
- warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
- end if
-
- Sortieren.Cancel
-
- Call hCloseDocument
+ Dim sLanguageIDEnglishUSA ,sLanguageIDSChinese, sLanguageIDTChinese , sLanguageIDJapanese , sLanguageIDKoren as String
+ Dim sKeyTypeEnglishUSA ,sKeyTypeSChinese , sKeyTypeTChinese , sKeyTypeJapanese , sKeyTypeKoren as String
+ Dim i as Integer
+
+ '/// Check if the default setting for &quot;key type&quot; is right for CJK when numeric is chosen in English
+
+ select case iSprache
+ case 01 :' English (USA)
+ sKeyTypeEnglishUSA = "Numeric"
+ sKeyTypeSChinese = "Numeric"
+ sKeyTypeTChinese = "Numeric"
+ sKeyTypeJapanese = "Numeric"
+ sKeyTypeKoren = "Numeric"
+ case 49 :' German
+ sKeyTypeEnglishUSA = "Numerisch"
+ sKeyTypeSChinese = "Numerisch"
+ sKeyTypeTChinese = "Numerisch"
+ sKeyTypeJapanese = "Numerisch"
+ sKeyTypeKoren = "Numerisch"
+ case 55 :' Brazilian
+ sKeyTypeEnglishUSA = "numérico"
+ sKeyTypeSChinese = "numérico"
+ sKeyTypeTChinese = "numérico"
+ sKeyTypeJapanese = "numérico"
+ sKeyTypeKoren = "numérico"
+ case 81 :' Japanese
+ sKeyTypeEnglishUSA = "数字"
+ sKeyTypeSChinese = "数字"
+ sKeyTypeTChinese = "数字"
+ sKeyTypeJapanese = "数字"
+ sKeyTypeKoren = "数字"
+ ' case 82 ' Korean
+ ' sKeyTypeEnglishUSA = 2 'numeric
+ ' sKeyTypeSChinese = 4 'numeric
+ ' sKeyTypeTChinese = 4 'numeric
+ ' sKeyTypeJapanese = 4 'numeric
+ ' sKeyTypeKoren = 4 'numeric
+ case 86 :' Chinese (simplified)
+ sKeyTypeEnglishUSA = "数字"
+ sKeyTypeSChinese = "数字"
+ sKeyTypeTChinese = "数字"
+ sKeyTypeJapanese = "数字"
+ sKeyTypeKoren = "数字"
+ case 88 :' Chinese (traditional)
+ sKeyTypeEnglishUSA = "數字"
+ sKeyTypeSChinese = "數字"
+ sKeyTypeTChinese = "數字"
+ sKeyTypeJapanese = "數字"
+ sKeyTypeKoren = "數字"
+ case else :' Fallback
+ printLog "The test does not support the language " + iSprache
+ Goto endsub
+ end select
+
+ sLanguageIDEnglishUSA = fGetCountryName(01)
+ sLanguageIDSChinese = fGetCountryName(86)
+ sLanguageIDTChinese = fGetCountryName(88)
+ sLanguageIDJapanese = fGetCountryName(81)
+ sLanguageIDKoren = fGetCountryName(82)
+
+ call hNewDocument
+
+ DocumentWriter.TypeKeys "123"
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 1
+
+ '/// Open Tools/Sort
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: English and key type: Numeric
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ for i = 1 to Sprache.getItemCount
+ printlog "" + i + ": '" + Sprache.getItemText(i) + "'"
+ next i
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ '/// Check to simplified Chinese
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeSChinese then
+ warnlog "The default key type for Simplified Chinese should be: '" + sKeyTypeSChinese + "' but is '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to traditional Chinese
+ try
+ Sprache.Select (sLanguageIDTChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDTChinese + "'"
+ ' try fallback to 'Chinese (traditional)'
+ try
+ Sprache.Select ("Chinese (traditional)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (traditional)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeTChinese then
+ warnlog "The default key type for traditional Chinese should be " + sKeyTypeTChinese + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Japanese
+ try
+ Sprache.Select (sLanguageIDJapanese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDJapanese + "'"
+ ' try fallback to 'Japanese'
+ try
+ Sprache.Select ("Japanese")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Japanese'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeJapanese then
+ warnlog "The default key type for Japanese should be: '" + sKeyTypeJapanese + "' but is: '" + Schluesseltyp1.GetSelText + "'"
+ end if
+
+ try
+ Sprache.Select (sLanguageIDEnglishUSA)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDEnglishUSA + "'"
+ ' try fallback to 'English (USA)'
+ try
+ Sprache.Select ("English (USA)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'English (USA)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeEnglishUSA
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeEnglishUSA + "'"
+ endcatch
+
+ '/// Check to Korean
+ try
+ Sprache.Select (sLanguageIDKoren)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDKoren + "'"
+ ' try fallback to 'Korean (RoK)'
+ try
+ Sprache.Select ("Korean (RoK)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Korean (RoK)'"
+ endcatch
+ endcatch
+ Sleep 2
+ if Schluesseltyp1.GetSelText <> sKeyTypeKoren then
+ warnlog "The default key type for Korean should be " + sKeyTypeKoren + " but get " + Schluesseltyp1.GetSelText
+ end if
+
+ Sortieren.Cancel
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tStrokeSort
- Dim testFile as String
- Dim sLanguageIDSChinese as String
- Dim sKeyTypeSChinese as String
- Dim aCorrectSequence() as String
-
- Dim i , j as Integer
-
- testFile = "sortTest.sxw"
- aCorrectSequence = Array( "1" , "2" , "3" , "4" ,"5" )
-
- j = UBound(aCorrectSequence)
-
- select case iSprache
- case 01 : ' English (USA)
- sKeyTypeSChinese = "Stroke"
- case 49 : ' German
- sKeyTypeSChinese = "Stroke"
- case 55 : ' Brazilian
- sKeyTypeSChinese = "Traço"
- case 81 : ' Japanese
- sKeyTypeSChinese = "総画数"
- case 86 : ' Chinese (simplified)
- sKeyTypeSChinese = "笔画"
- case 88 : ' Chinese (simplified)
- sKeyTypeSChinese = "筆畫"
- case else : ' Fallback
- printLog "Now, the test does not support for the language " +iSprache
- Goto endsub
+ Dim testFile as String
+ Dim sLanguageIDSChinese as String
+ Dim sKeyTypeSChinese as String
+ Dim aCorrectSequence() as String
+
+ Dim i , j as Integer
+
+ testFile = "sortTest.sxw"
+ aCorrectSequence = Array( "1" , "2" , "3" , "4" ,"5" )
+
+ j = UBound(aCorrectSequence)
+
+ select case iSprache
+ case 01 : ' English (USA)
+ sKeyTypeSChinese = "Stroke"
+ case 49 : ' German
+ sKeyTypeSChinese = "Stroke"
+ case 55 : ' Brazilian
+ sKeyTypeSChinese = "Traço"
+ case 81 : ' Japanese
+ sKeyTypeSChinese = "総画数"
+ case 86 : ' Chinese (simplified)
+ sKeyTypeSChinese = "笔画"
+ case 88 : ' Chinese (simplified)
+ sKeyTypeSChinese = "筆畫"
+ case else : ' Fallback
+ printLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
end select
- sLanguageIDSChinese = fGetCountryName(86)
-
+ sLanguageIDSChinese = fGetCountryName(86)
+
+ '/// Check Stroke sort for Simplified Chinese
+
+ Call hNewDocument
+ '/// Open a test file and check <i>No Grid</i> checkbox
+ Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
+ sMakeReadOnlyDocumentEditable
+ EditSelectAll
+
+ '/// Open <i>Tools/Sort</i>
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: Simplified Chinese and key type <i>Stroke</i>
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeSChinese
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ Sortieren.OK
+
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<MOD1 Home>"
+
+ For i = 0 to j
+ DocumentWriter.TypeKeys "<End>"
+ DocumentWriter.TypeKeys "<Shift Left>"
+
+ EditCopy
+ if GetClipboardText <> aCorrectSequence(i) then Warnlog "The Stroke sort is wrong , should be " + aCorrectSequence(i) + " ,but get " +GetClipboardText
+
+ DocumentWriter.TypeKeys "<Down>"
+ next i
+
+ Call hCloseDocument
- Call hNewDocument
- Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
- sMakeReadOnlyDocumentEditable
- EditSelectAll
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeSChinese
- catch
- qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- Sortieren.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<MOD1 Home>"
+endcase
- For i = 0 to j
- DocumentWriter.TypeKeys "<End>"
- DocumentWriter.TypeKeys "<Shift Left>"
+'-------------------------------------------------------------------------
- EditCopy
- if GetClipboardText <> aCorrectSequence(i) then Warnlog "The Stroke sort is wrong , should be " + aCorrectSequence(i) + " ,but get " +GetClipboardText
+testcase tPinyinSort
- DocumentWriter.TypeKeys "<Down>"
- next i
+ Dim testFile as String
+ Dim sLanguageIDSChinese as String
+ Dim sKeyTypeSChinese as String
+ Dim aCorrectSequence() as String
+
+ Dim i , j as Integer
+
+ testFile = "sortTest.sxw"
+ aCorrectSequence = Array( "2" , "3" , "4" , "1" , "5" )
+
+ j = UBound(aCorrectSequence)
+
+ select case iSprache
+ case 01 : ' English (USA)
+ sKeyTypeSChinese = "Pinyin"
+ case 49 : ' German
+ sKeyTypeSChinese = "Pinyin"
+ case 55 : ' Brazilian
+ sKeyTypeSChinese = "Pinyin"
+ case 81 : ' Japanese
+ sKeyTypeSChinese = "ピンイン(中国語のローマ字表記法)"
+ case 86 : ' Chinese (simplified)
+ sKeyTypeSChinese = "拼音"
+ case 88 : ' Chinese (simplified)
+ sKeyTypeSChinese = "拼音"
+ case else : ' Fallback
+ printLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
- Call hCloseDocument
+ sLanguageIDSChinese = fGetCountryName(86)
+
+ '/// Check <i>Pinyin</i> sort for Simplified Chinese
+
+ Call hNewDocument
+ '/// Open a test file and check <i>No Grid</i> checkbox
+ Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
+ sMakeReadOnlyDocumentEditable
+ EditSelectAll
+
+ '/// Open <i>Tools/Sort</i>
+ ToolsSort
+ Kontext "Sortieren"
+
+ '/// Choose language: Simplified Chinese and key type <i>Pin yin</i>
+ try
+ Sprache.Select (sLanguageIDSChinese)
+ catch
+ qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
+ ' try fallback to 'Chinese (simplyfied)'
+ try
+ Sprache.Select ("Chinese (simplyfied)")
+ catch
+ qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
+ endcatch
+ endcatch
+ try
+ Schluesseltyp1.Select sKeyTypeSChinese
+ catch
+ qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
+ for i = 1 to Schluesseltyp1.getItemCount
+ printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
+ next i
+ endcatch
+
+ Sortieren.OK
+
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys "<MOD1 Home>"
+
+ For i = 0 to j
+ DocumentWriter.TypeKeys "<End>"
+ DocumentWriter.TypeKeys "<Shift Left>"
+
+ EditCopy
+ if GetClipboardText <> aCorrectSequence(i) then
+ Warnlog "The Pin yin sort is wrong, should be: '" + aCorrectSequence(i) + "' ,but is: '" +GetClipboardText + "'"
+ endif
+
+ DocumentWriter.TypeKeys "<Down>"
+ next i
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
-testcase tPinyinSort
+testcase tSortOptionTest_1
- Dim testFile as String
- Dim sLanguageIDSChinese as String
- Dim sKeyTypeSChinese as String
- Dim aCorrectSequence() as String
-
- Dim i , j as Integer
-
- testFile = "sortTest.sxw"
- aCorrectSequence = Array( "2" , "3" , "4" , "1" , "5" )
-
- j = UBound(aCorrectSequence)
-
- select case iSprache
- case 01 : ' English (USA)
- sKeyTypeSChinese = "Pinyin"
- case 49 : ' German
- sKeyTypeSChinese = "Pinyin"
- case 55 : ' Brazilian
- sKeyTypeSChinese = "Pinyin"
- case 81 : ' Japanese
- sKeyTypeSChinese = "ピンイン(中国語のローマ字表記法)"
- case 86 : ' Chinese (simplified)
- sKeyTypeSChinese = "拼音"
- case 88 : ' Chinese (simplified)
- sKeyTypeSChinese = "拼音"
- case else : ' Fallback
- printLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- sLanguageIDSChinese = fGetCountryName(86)
-
-
- Call hNewDocument
- Call hFileOpen ( gTesttoolPath + "framework\optional\input\CJK\" + testFile )
- sMakeReadOnlyDocumentEditable
- EditSelectAll
-
- ToolsSort
- Kontext "Sortieren"
-
- try
- Sprache.Select (sLanguageIDSChinese)
- catch
- qaErrorLog "Can't select: '" + sLanguageIDSChinese + "'"
- ' try fallback to 'Chinese (simplyfied)'
- try
- Sprache.Select ("Chinese (simplyfied)")
- catch
- qaErrorLog "Can't select even tha fallback: 'Chinese (simplyfied)'"
- endcatch
- endcatch
- try
- Schluesseltyp1.Select sKeyTypeSChinese
- catch
- qaErrorLog "Can't select: '" + sKeyTypeSChinese + "'"
- for i = 1 to Schluesseltyp1.getItemCount
- printlog "" + i + ": '" + Schluesseltyp1.getItemText(i) + "'"
- next i
- endcatch
-
- Sortieren.OK
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "<MOD1 Home>"
-
- For i = 0 to j
- DocumentWriter.TypeKeys "<End>"
- DocumentWriter.TypeKeys "<Shift Left>"
-
- EditCopy
- if GetClipboardText <> aCorrectSequence(i) then
- Warnlog "The Pin yin sort is wrong, should be: '" + aCorrectSequence(i) + "' ,but is: '" +GetClipboardText + "'"
- endif
-
- DocumentWriter.TypeKeys "<Down>"
- next i
-
- Call hCloseDocument
+ Dim i , j as Integer
+ Dim asList() as String
+
+ select case iSprache
+ case 81 :' Japanese
+ if iSystemSprache <> 81 then goto NOTest
+ asList = Array( "Sun,Mon,Tue,Wed,Thu,Fri,Sat" , "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday" , "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" , "January,February,March,April,May,June,July,August,September,October,November,December" , "日,月,火,水,木,金,土" , "日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日" , )
+ case 82 :' Korean
+ if iSystemSprache <> 82 then goto NOTest
+ asList = Array( "일,월,화,수,목,금,토" ,"일요일,월요일,화요일,수요일,목요일,금요일,토요일" ,"1,2,3,4,5,6,7,8,9,10,11,12" , "日,月,火,水,木,金,土" , "日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日" , )
+ case 86 :' Chinese (simplified)
+ if iSystemSprache <> 86 then goto NOTest
+ asList = Array( "日,一,二,三,四,五,六" , "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , "一,二,三,四,五,六,七,八,九,十,十一,十二" , "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月" , )
+ case 88 :' Chinese (traditional)
+ if iSystemSprache <> 88 then goto NOTest
+ asList = Array( "日,一,二,三,四,五,六" , "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , "一,二,三,四,五,六,七,八,九,十,十一,十二" , "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月" , )
+ case else :' Fallback
+ NOTest:
+ printLog "The test does not support for the language " +iSprache + " System language " + iSystemSprache
+ Goto endsub
+ end select
-endcase
+ '/// Check if the entries in custom sort order is right in CJK version
-'-------------------------------------------------------------------------
+ call hNewDocument
-testcase tSortOptionTest_1
+ '/// Open <i>Data/Sort</i> -&gt; tabpage <i>option</i>
+
+ DataSort
+
+ Kontext
+ active.SetPage TabSortierenOptionen
+ Kontext "TabSortierenOptionen"
-Dim i , j as Integer
-Dim asList() as String
-
-select case iSprache
- case 81 :' Japanese
- if iSystemSprache <> 81 then goto NOTest
- asList = Array( _
- "Sun,Mon,Tue,Wed,Thu,Fri,Sat" , _
- "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday" , _
- "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec" , _
- "January,February,March,April,May,June,July,August,September,October,November,December" , _
- "日,月,火,水,木,金,土" , _
- "日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日" , _
- )
- case 82 :' Korean
- if iSystemSprache <> 82 then goto NOTest
- asList = Array( _
- "일,월,화,수,목,금,토" ,_
- "일요일,월요일,화요일,수요일,목요일,금요일,토요일" ,_
- "1,2,3,4,5,6,7,8,9,10,11,12" , _
- "日,月,火,水,木,金,土" , _
- "日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日" , _
- )
- case 86 :' Chinese (simplified)
- if iSystemSprache <> 86 then goto NOTest
- asList = Array( _
- "日,一,二,三,四,五,六" , _
- "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , _
- "一,二,三,四,五,六,七,八,九,十,十一,十二" , _
- "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月" , _
- )
- case 88 :' Chinese (traditional)
- if iSystemSprache <> 88 then goto NOTest
- asList = Array( _
- "日,一,二,三,四,五,六" , _
- "星期日,星期一,星期二,星期三,星期四,星期五,星期六" , _
- "一,二,三,四,五,六,七,八,九,十,十一,十二" , _
- "一月,二月,三月,四月,五月,六月,七月,八月,九月,十月,十一月,十二月" , _
- )
- case else :' Fallback
-NOTest:
- printLog "The test does not support for the language " +iSprache + " System language " + iSystemSprache
- Goto endsub
-end select
-
-
- call hNewDocument
-
-
- DataSort
-
- Kontext
- active.SetPage TabSortierenOptionen
- Kontext "TabSortierenOptionen"
-
- BenutzerdefinierteSortierreihenfolge.Check
+ BenutzerdefinierteSortierreihenfolge.Check
For i = 1 to SortierreihenfolgeListe.GetItemCount
- if SortierreihenfolgeListe.GetItemText(i) <> asList(i-1) then
- warnlog "Should get " +asList(i) + " but get " +SortierreihenfolgeListe.GetItemText(i)
- end if
- next i
+ if SortierreihenfolgeListe.GetItemText(i) <> asList(i-1) then
+ warnlog "Should get " +asList(i) + " but get " +SortierreihenfolgeListe.GetItemText(i)
+ end if
+ next i
- TabSortierenOptionen.Cancel
+ TabSortierenOptionen.Cancel
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
index 8e6f85afac01..37b905ec4e1e 100755..100644
--- a/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
+++ b/testautomation/framework/optional/includes/CJK_FeatureSwitchTest_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* 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
@@ -38,45 +38,69 @@
'\***********************************************************************
testcase tSwitchLocation
- ToolsOptions
+ '/// Check if the switch "Asian Language support" exist -- tools/options/language settings/language
+ ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS" , "LANGUAGES")
+ Call hToolsOptions("LANGUAGESETTINGS" , "LANGUAGES")
- try
- if Aktivieren.IsChecked = TRUE then
- printLog "CJK language is checked"
- else
- printLog "CJK language isn't checked"
- end if
- catch
- warnlog "Something wrong in checkbox 'Asian Language Support'"
- endcatch
+ try
+ if Aktivieren.IsChecked = TRUE then
+ printLog "CJK language is checked"
+ else
+ printLog "CJK language isn't checked"
+ end if
+ catch
+ warnlog "Something wrong in checkbox 'Asian Language Support'"
+ endcatch
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.OK
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest1
- call hNewDocument
+ '/// Check if checkbox "Snap to text grid" is enable or not -- Format/Paragraph tabpage "Alignment"
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , check if checkbox "Snap to text grid" is enable
+ Call CheckAsianLanguageSupport("On")
- Kontext
- FormatParagraph
+ Kontext
+ FormatParagraph
Active.SetPage TabAusrichtungAbsatz
Kontext "TabAusrichtungAbsatz"
- try
- if TextrasterFangen.IsChecked = TRUE then
- printLog "snap to text grid is checked"
- else
- printLog "snap to text grid isn't checked"
+ try
+ if TextrasterFangen.IsChecked = TRUE then
+ printLog "snap to text grid is checked"
+ else
+ printLog "snap to text grid isn't checked"
+ end if
+ catch
+ warnlog "Something wrong in checkbox 'snap to text grid'"
+ endcatch
+
+ TabAusrichtungAbsatz.Cancel
+
+ '/// turn off "Asian Language support" , check if checkbox "Snap to text grid" isn't enable
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+
+ Kontext
+ FormatParagraph
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+
+ try
+ if TextrasterFangen.IsChecked = TRUE Or TextrasterFangen.IsChecked <> TRUE then
+ warnlog "Something wrong in checkbox 'snap to text grid'"
+ end if
+ catch
+ endcatch
+
+ TabAusrichtungAbsatz.Cancel
end if
- catch
- warnlog "Something wrong in checkbox 'snap to text grid'"
- endcatch
TabAusrichtungAbsatz.Cancel
@@ -104,278 +128,303 @@ endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest2
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatParagraph
+ '/// Check if tabpage "Asian Typography" appear or not -- Format/Paragraph
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , check if tabpage "Asian Typography" appears
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatParagraph
+
+ try
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ TabAsianTypography.Cancel
+ catch
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ TabAusrichtungAbsatz.Cancel
+ warnlog "Something wring in tabpage - Asian Typography!"
+ endcatch
+
+ '/// turn off "Asian Language support" , check if tabpage "Asian Typography" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- try
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- catch
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- TabAusrichtungAbsatz.Cancel
- warnlog "Something wring in tabpage - Asian Typography!"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatParagraph
+ Kontext
+ FormatParagraph
- try
- Active.SetPage TabAsianTypography
- Kontext "TabAsianTypography"
- TabAsianTypography.Cancel
- warnlog "tabpage - Asian Typography should NOT appear!"
- catch
- Active.SetPage TabAusrichtungAbsatz
- Kontext "TabAusrichtungAbsatz"
- TabAusrichtungAbsatz.Cancel
- endcatch
- end if
+ try
+ Active.SetPage TabAsianTypography
+ Kontext "TabAsianTypography"
+ TabAsianTypography.Cancel
+ warnlog "tabpage - Asian Typography should NOT appear!"
+ catch
+ Active.SetPage TabAusrichtungAbsatz
+ Kontext "TabAusrichtungAbsatz"
+ TabAusrichtungAbsatz.Cancel
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest3
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
- try
- FontEast.Select 1
- catch
- warnlog "Something wrong in list box Asian text font when Asian Language support is on"
- endcatch
- TabFont.Cancel
+ '/// Check if list box "Asian text font" appear or not -- Format/Character
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if list box "Asian text font" appear
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
+ try
+ FontEast.Select 1
+ catch
+ warnlog "Something wrong in list box Asian text font when Asian Language support is on"
+ endcatch
+ TabFont.Cancel
+
+ '/// turn off "Asian Language support" , Check if list box "Asian text font" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFont
- kontext "TabFont"
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFont
+ kontext "TabFont"
try
- FontEast.Select 1
- warnlog "Something wrong in list box Asian text font when Asian Language support is off"
+ FontEast.Select 1
+ warnlog "Something wrong in list box Asian text font when Asian Language support is off"
catch
endcatch
- TabFont.Cancel
- end if
+ TabFont.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest4
- call hNewDocument
+ '/// Check if list box "Emphasis mark" appear or not -- Format/Character
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if list box "Emphasis mark" appear
+ Call CheckAsianLanguageSupport("On")
+
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
+ try
+ Emphasis.Select 1
+ catch
+ warnlog "Something wrong in list box Emphasis mark when Asian Language support is on"
+ endcatch
+ TabFontEffects.Cancel
+
+ '/// turn off "Asian Language support" , Check if list box "Emphasis mark" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- Call CheckAsianLanguageSupport("On")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
- try
- Emphasis.Select 1
- catch
- warnlog "Something wrong in list box Emphasis mark when Asian Language support is on"
- endcatch
- TabFontEffects.Cancel
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
-
- Kontext
- FormatCharacter
- Kontext
- active.SetPage TabFontEffects
- kontext "TabFontEffects"
+ Kontext
+ FormatCharacter
+ Kontext
+ active.SetPage TabFontEffects
+ kontext "TabFontEffects"
try
- Emphasis.Select 1
- warnlog "Something wrong in list box Emphasis mark when Asian Language support is off"
+ Emphasis.Select 1
+ warnlog "Something wrong in list box Emphasis mark when Asian Language support is off"
catch
endcatch
- TabFontEffects.Cancel
- end if
+ TabFontEffects.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest5
- call hNewDocument
+ '/// Check if tabpage "Searching in Japanese" appear or not -- tools/options/language settings/
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" appear
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE") <> TRUE then
- warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is on"
- end if
+ ToolsOptions
+ if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE") <> TRUE then
+ warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is on"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- ToolsOptions
+ '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE" , TRUE) = FALSE then
- printLog Chr(13) + "Yes, 'Searching Japanese'-page has been disabled after switching Asian Language Support 'off'."
- else
- warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is off"
- end if
+ if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE" , TRUE) = FALSE then
+ printLog Chr(13) & "Yes, 'Searching Japanese'-page has been disabled after switching Asian Language Support 'off'."
+ else
+ warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is off"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest6
- call hNewDocument
+ '/// Check if tabpage "Asian Layout" appear or not -- tools/options/language settings/
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if tabpage "Asian Layout" appear
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT") <> TRUE then
- warnlog "Something wrong in tabpage Asian Layout when Asian Language support is on"
- end if
+ ToolsOptions
+ if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT") <> TRUE then
+ warnlog "Something wrong in tabpage Asian Layout when Asian Language support is on"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- ToolsOptions
+ '/// turn off "Asian Language support" , Check if tabpage "Asian Layout" disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ ToolsOptions
- if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT", TRUE) = FALSE then
- printLog Chr(13) + "Yes, 'Asian Layout'-page has been disabled after switching 'Asian Language Support' off."
- else
- warnlog "Something wrong in tabpage Asian Layout when Asian Language support is off"
- end if
+ if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT", TRUE) = FALSE then
+ printLog Chr(13) & "Yes, 'Asian Layout'-page has been disabled after switching 'Asian Language Support' off."
+ else
+ warnlog "Something wrong in tabpage Asian Layout when Asian Language support is off"
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
- end if
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest7
- call hNewDocument
+ '/// Check if menu format/Ruby is active or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if menu format/Ruby is actived
+ Call CheckAsianLanguageSupport("On")
- try
- formatRuby
- Kontext "RubyDialog"
- DialogClose.Click
- Sleep 2
- catch
- warnlog "Something wrong in menu format/Ruby when Asian Language support is on"
- endcatch
+ try
+ formatRuby
+ Kontext "RubyDialog"
+ DialogClose.Click
+ Sleep 2
+ catch
+ warnlog "Something wrong in menu format/Ruby when Asian Language support is on"
+ endcatch
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ '/// turn off "Asian Language support" , Check if menu format/Ruby is inactived
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- try
- formatRuby
- Kontext "RubyDialog"
- DialogClose.Click
- Sleep 2
- QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off"
- catch
- endcatch
- end if
+ try
+ formatRuby
+ Kontext "RubyDialog"
+ DialogClose.Click
+ Sleep 2
+ QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest8
+ '/// Check if the following submenus in format/change case is active or not
+ '/// - Half width
+ '/// - Full width
+ '/// - Hiragana
+ '/// - Katagana
+
+ call hNewDocument
+
+ '/// turn on "Asian Language support" , Check if submenus in format/change case is actived
+ Call CheckAsianLanguageSupport("On")
+
+ try
+ FormatChangeCaseHalfWidth
+ catch
+ warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseFullWidth
+ catch
+ warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseHiragana
+ catch
+ warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is on"
+ endcatch
+
+ try
+ FormatChangeCaseKatagana
+ catch
+ warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if submenus in format/change case is inactived
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
-
- try
- FormatChangeCaseHalfWidth
- catch
- warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is on"
- endcatch
-
- try
- FormatChangeCaseFullWidth
- catch
- warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is on"
- endcatch
-
- try
- FormatChangeCaseHiragana
- catch
- warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is on"
- endcatch
+ try
+ FormatChangeCaseHalfWidth
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off"
+ catch
+ endcatch
- try
- FormatChangeCaseKatagana
- catch
- warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is on"
- endcatch
+ try
+ FormatChangeCaseFullWidth
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off"
+ catch
+ endcatch
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ try
+ FormatChangeCaseHiragana
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off"
+ catch
+ endcatch
- try
- FormatChangeCaseHalfWidth
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseFullWidth
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseHiragana
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off"
- catch
- endcatch
-
- try
- FormatChangeCaseKatagana
- QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off"
- catch
- endcatch
- end if
+ try
+ FormatChangeCaseKatagana
+ QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
@@ -383,76 +432,81 @@ endcase
testcase tWriterUIChangesTest9
call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if list box text direction appear
+ Call CheckAsianLanguageSupport("On")
- FormatPageWriter
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
+ FormatPageWriter
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
- try
- Textfluss.select 1
- catch
- warnlog "Something wrong in list box text direction when Asian Language support is on"
- endcatch
- TabSeite.Cancel
+ try
+ Textfluss.select 1
+ catch
+ warnlog "Something wrong in list box text direction when Asian Language support is on"
+ endcatch
+ TabSeite.Cancel
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ '/// turn off "Asian Language support" , Check if list box text direction disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- FormatPageWriter
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
+ FormatPageWriter
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
- try
- Textfluss.select 1
- warnlog "Something wrong in list box text direction when Asian Language support is off"
- catch
- endcatch
- TabSeite.Cancel
- end if
+ try
+ Textfluss.select 1
+ warnlog "Something wrong in list box text direction when Asian Language support is off"
+ catch
+ endcatch
+ TabSeite.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tWriterUIChangesTest10
- call hNewDocument
+ '/// Check if vertical text box and callout appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- sleep(1)
-
- Call hToolbarSelect("DRAWING", true)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
- try
- VerticalCallout.Click
- catch
- warnlog "Something wrong in vertical text callout when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
- VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- try
- VerticalCallout.Click
- warnlog "Something wrong in vertical text callout when Asian Language support is off"
- catch
- endcatch
- end if
+ '/// turn on "Asian Language support" , Check if vertical text box and callout appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
- Call hCloseDocument
+ Call hToolbarSelect("DRAWING", true)
+ try
+ VerticalText.Click
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+ try
+ VerticalCallout.Click
+ catch
+ warnlog "Something wrong in vertical text callout when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ try
+ VerticalCallout.Click
+ warnlog "Something wrong in vertical text callout when Asian Language support is off"
+ catch
+ endcatch
+ end if
+
+ Call hCloseDocument
endcase
@@ -463,46 +517,52 @@ testcase tWriterUIChangesTest11
dim i as integer
dim iCount as integer
- iHopeNumber1 = 38
- iHopeNumber2 = 19
+ iHopeNumber1 = 38
+ iHopeNumber2 = 19
+ '/// Check if the number in listbox numbering is right or not.
+ '/// [if the number of the listbox numbering is changed, this case should be modified according]
- call hNewDocument
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if the number in listbox numbering is right
+ Call CheckAsianLanguageSupport("On")
FormatNumberingBullets
- Kontext
- Active.SetPage TabOptionenNumerierung
- Kontext "TabOptionenNumerierung"
-
- iCount = Numerierung.GetItemCount
- if iCount = iHopeNumber1 then
+ Kontext
+ Active.SetPage TabOptionenNumerierung
+ Kontext "TabOptionenNumerierung"
+
+ iCount = Numerierung.GetItemCount
+ if iCount = iHopeNumber1 then
Numerierung.Select 15
TabOptionenNumerierung.OK
- printLog Chr(13) + "Pls. go to the printer to find if you can get a paper"
- printLog Chr(13) + "which is printed like '-'.Otherwise , something wrong!"
+ printLog Chr(13) & "Pls. go to the printer to find if you can get a paper"
+ printLog Chr(13) & "which is printed like '-'.Otherwise , something wrong!"
+ '/// --Pls. go to the printer to find if you can get a paper which is printed like '-'. Otherwise , something is wrong!
FilePrint
Kontext "Active"
- if Active.Exists then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if Active.Exists( 1 ) then
+ if Active.GetRT = 304 then
+ Active.Ok
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 ) ) then
+ Printing.cancel()
+ endif
+ end if
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- end if
- else
+ Kontext "Printing"
+ if ( Printing.exists( 2 ) ) then
+ Printing.cancel()
+ Printing.notExists( 5 )
+ endif
+ endif
+ else
for i =1 to iCount
- printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
+ printlog "(" & i & "/" & iCount & "): " & Numerierung.getItemText(i)
next i
'Referenze:
TabOptionenNumerierung.Cancel
@@ -516,47 +576,57 @@ testcase tWriterUIChangesTest11
active.ok
endif
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
+ 'print warning if no printer is available
+ kontext
+ if active.exists(5) then
+ qaErrorlog "print warning: '" & active.getText & "'"
+ active.ok
+ endif
+
+ '/// turn off "Asian Language support" , Check if the number in listbox numbering is right
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
- FormatNumberingBullets
+ FormatNumberingBullets
Kontext
Active.SetPage TabOptionenNumerierung
Kontext "TabOptionenNumerierung"
- iCount = Numerierung.GetItemCount
+ iCount = Numerierung.GetItemCount
if iCount <> iHopeNumber2 then
- for i =1 to iCount
- printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
- next i
- 'Referenze:
- qaerrorlog "the number of list box numbering is wrong when Asian Language support is off; expected: " + iHopeNumber2 + "; is: " + iCount
+ for i =1 to iCount
+ printlog "(" & i & "/" & iCount & "): " & Numerierung.getItemText(i)
+ next i
+ 'Referenze:
+ warnlog "the number of list box numbering is wrong when Asian Language support is off; expected: " & iHopeNumber2 & "; is: " & iCount
end if
- TabOptionenNumerierung.Cancel
- end if
+ TabOptionenNumerierung.Cancel
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tProlongedVowelsTest1
+ '/// Check if the default setting of "Prolonged vowels (ka-/kaa) will be ACTIVATED.
- call hNewDocument
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
+ '/// turn on "Asian Language support" , Check if the default setting of "Prolonged vowels (ka-/kaa) is ACTIVATED.
+ Call CheckAsianLanguageSupport("On")
- ToolsOptions
- Call hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE")
+ ToolsOptions
+ Call hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE")
- if ProlongedSoundmarks.IsChecked <> TRUE then
- warnlog "The default setting of 'Prolonged vowels (ka-/kaa)' isn't ACTIVATED."
- end if
+ if ProlongedSoundmarks.IsChecked <> TRUE then
+ warnlog "The default setting of 'Prolonged vowels (ka-/kaa)' isn't ACTIVATED."
+ end if
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.Cancel
+ Kontext "ExtrasOptionenDlg"
+ ExtrasOptionenDlg.Cancel
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -564,39 +634,42 @@ endcase
testcase tCalcUIChangesTest_10
+ '/// Check if vertical text box and callout appear or not
- call hNewDocument
-
- Call CheckAsianLanguageSupport("On")
- sleep(1)
- Call hToolbarSelect("DRAWING", true)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
- try
- VerticalCallout.Click
- catch
- warnlog "Something wrong in vertical text callout when Asian Language support is on"
- endcatch
+ call hNewDocument
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box and callout appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
+ Call hToolbarSelect("DRAWING", true)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- try
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+ try
VerticalCallout.Click
- warnlog "Something wrong in vertical text callout when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text callout when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ try
+ VerticalCallout.Click
+ warnlog "Something wrong in vertical text callout when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -604,30 +677,33 @@ endcase
testcase tImpressUIChangesTest_10
- call hNewDocument
+ '/// Check if vertical text box and callout and fit vertical text to frame appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- sleep(1)
- Kontext "Drawbar"
- sleep(1)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- sleep(1)
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box appear
+ Call CheckAsianLanguageSupport("On")
+ sleep(1)
+ Kontext "Drawbar"
+ sleep(1)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ sleep(1)
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -635,28 +711,31 @@ endcase
testcase tDrawUIChangesTest_10
- call hNewDocument
+ '/// Check if vertical text box and callout and fit vertical text to frame appear or not
+ call hNewDocument
- Call CheckAsianLanguageSupport("On")
- Kontext "Drawbar"
- sleep(1)
- try
- VerticalText.Click
- catch
- warnlog "Something wrong in vertical text box when Asian Language support is on"
- endcatch
-
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- Kontext "Drawbar"
- try
+ '/// turn on "Asian Language support" , Check if vertical text box appear
+ Call CheckAsianLanguageSupport("On")
+ Kontext "Drawbar"
+ sleep(1)
+ try
VerticalText.Click
- warnlog "Something wrong in vertical text box when Asian Language support is off"
- catch
- endcatch
- end if
+ catch
+ warnlog "Something wrong in vertical text box when Asian Language support is on"
+ endcatch
+
+ '/// turn off "Asian Language support" , Check if vertical text box disappear
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ Kontext "Drawbar"
+ try
+ VerticalText.Click
+ warnlog "Something wrong in vertical text box when Asian Language support is off"
+ catch
+ endcatch
+ end if
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc b/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
index c4caed718803..0df9c6c97aae 100755..100644
--- a/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
+++ b/testautomation/framework/optional/includes/CJK_RubyDialogueProposal_1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* 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
@@ -39,18 +39,23 @@
testcase tRubyDialog_1
- Dim sBaseText , sRubyText as String
- Dim sBaseText1 , sRubyText1 as String
+ Dim sBaseText , sRubyText as String
+ Dim sBaseText1 , sRubyText1 as String
- sBaseText = "BaseText"
- sRubyText = "RubyText"
+ sBaseText = "BaseText"
+ sRubyText = "RubyText"
- sBaseText1 = "BaseText1"
- sRubyText1 = "RubyText1"
+ sBaseText1 = "BaseText1"
+ sRubyText1 = "RubyText1"
- Call hNewDocument
+ '/// Check Apply and Close button in Ruby dialogue
+ Call hNewDocument
- FormatRuby
+ '/// Check close button.
+ '/// open ruby dialogue , input base text and ruby text , then press close button
+ '/// 1) check if the ruby dialogue is closed
+ '/// 2) check if the base text and ruby text is recorded
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
BasisText1.SetText sBaseText
@@ -58,19 +63,23 @@ testcase tRubyDialog_1
RubyText1.SetText sRubyText
Sleep 1
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- if RubyDialog.Exists then
- Warnlog "The Ruby dialogue is NOT closed !"
- end if
+ if RubyDialog.Exists then
+ Warnlog "The Ruby dialogue is NOT closed !"
+ end if
- FormatRuby
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
if Len(BasisText1.GetText) <> 0 then Warnlog "The base text should not been inputed"
if Len(RubyText1.SetText) <> 0 then Warnlog "The ruby text should not been inputed"
+ '/// Check Apply button -- Normally , we think it is RubyDialog.OK
+ '/// open ruby dialogue , input base text and ruby text , then press close button
+ '/// Press Apply button , then press close button
+ '/// check if the base text and ruby text is recorded
BasisText1.SetText sBaseText1
Sleep 1
@@ -80,22 +89,22 @@ testcase tRubyDialog_1
RubyDialog.OK
Sleep 2
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- EditSelectAll
- Sleep 1
+ EditSelectAll
+ Sleep 1
- FormatRuby
- Kontext "RubyDialog"
+ FormatRuby
+ Kontext "RubyDialog"
Sleep 3
if BasisText1.GetText <> sBaseText1 then Warnlog "The base text should be "+sBaseText1 + " but get " + BasisText1.GetText
if RubyText1.GetText <> sRubyText1 then Warnlog "The ruby text should be "+sRubyText1 + " but get " + RubyText1.GetText
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -103,61 +112,72 @@ endcase
testcase tRubyDialog_2
- Dim sBaseText as String
+ Dim sBaseText as String
- sBaseText = "test1 test2 test3 test4 test5 test6 test7 test8 test9"
+ sBaseText = "test1 test2 test3 test4 test5 test6 test7 test8 test9"
+ '/// Test scrollbar in Ruby dialog
- Call hNewDocument
+ Call hNewDocument
- FormatRuby
+ '/// when there is less basetext, the scrollbar should appear
+ FormatRuby
Kontext "RubyDialog"
if RubyDialog.HasScrollbar <> TRUE then warnlog "The Scrollbar should appear when less basetext!"
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys sBaseText
- DocumentWriter.TypeKeys "<Shift Home>"
+ '/// when there is more basetext(here is >4), the scrollbar should appear
+ Kontext "DocumentWriter"
+ DocumentWriter.TypeKeys sBaseText
+ DocumentWriter.TypeKeys "<Shift Home>"
- FormatRuby
+ FormatRuby
Kontext "RubyDialog"
if RubyDialog.HasScrollbar <> TRUE then warnlog "The Scrollbar should appear when more basetext!"
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tRubyDialog_3
- Dim sTestText as String
- Dim sBaseText1, sBaseText2 as String
+ Dim sTestText as String
+ Dim sBaseText1, sBaseText2 as String
- sTestText = "Test1 Test2"
- sBaseText1 = "Test1"
- sBaseText2 = "Test2"
+ sTestText = "Test1 Test2"
+ sBaseText1 = "Test1"
+ sBaseText2 = "Test2"
+ '/// The list in ruby dialogure will be updated as soon as the uses
+ '/// selects new or further words of his text.
+ '/// The update will be done once the user changes his focus
+ '/// back to the Ruby-Dialogue from the text
- Call hNewDocument
+ Call hNewDocument
- DocumentWriter.TypeKeys sTestText
- DocumentWriter.TypeKeys "<Shift Left>" , 5
+ '/// input 2 test words, and mark the second
+ DocumentWriter.TypeKeys sTestText
+ DocumentWriter.TypeKeys "<Shift Left>" , 5
- FormatRuby
+ '/// There should be only the second test word in basetext1 in ruby dialogue
+ FormatRuby
Kontext "RubyDialog"
Sleep 2
if BasisText1.GetText <> sBaseText2 then warnlog "The BaseText1 should be:" +sBaseText2 + " but get "+BasisText1.GetText
- Kontext "DocumentWriter"
- try
- DocumentWriter.TypeKeys "<Shift Home>"
- Sleep 2
- catch
- warnlog "The ruby dialogue is MODE less dialogue , the document can be edited!"
- endcatch
+ '/// Mark 2 test words
+ Kontext "DocumentWriter"
+ try
+ DocumentWriter.TypeKeys "<Shift Home>"
+ Sleep 2
+ catch
+ warnlog "The ruby dialogue is MODE less dialogue , the document can be edited!"
+ endcatch
+ '/// Check if the 2 test words are all in the ruby dialogue when set forcus back to the dialogue
Kontext "RubyDialog"
Sleep 1
'this step is meaningless, just let the focus back to ruby dialogue
@@ -167,10 +187,10 @@ testcase tRubyDialog_3
Sleep 1
if BasisText2.GetText <> sBaseText2 then warnlog "The BaseText2 should be:" +sBaseText2 + " but get "+BasisText2.GetText
- DialogClose.Click
- Sleep 1
+ DialogClose.Click
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -178,41 +198,42 @@ endcase
testcase tRubyDialog_4
- Dim sCharacterStyle as String
- dim i as integer
-
-
- select case iSprache
- case 01 : sCharacterStyle = "Rubies"
- case 33 : sCharacterStyle = "Rubys"
- case 34 : sCharacterStyle = "Rubys"
- case 39 : sCharacterStyle = "Testo Ruby"
- case 46 : sCharacterStyle = "Rubytext"
- case 49 : sCharacterStyle = "Rubys"
- case 55 : sCharacterStyle = "Rubys"
- case 81 : sCharacterStyle = "ふりがな"
- case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO
- case 86 : sCharacterStyle = "拼音和注音符号"
- case 88 : sCharacterStyle = "注音符號"
- case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- Call hNewDocument
-
- FormatRuby
+ Dim sCharacterStyle as String
+ dim i as integer
+
+ '/// Check default setting for Character Style of Ruby Text
+
+ select case iSprache
+ case 01 : sCharacterStyle = "Rubies"
+ case 33 : sCharacterStyle = "Rubys"
+ case 34 : sCharacterStyle = "Rubys"
+ case 39 : sCharacterStyle = "Testo Ruby"
+ case 46 : sCharacterStyle = "Rubytext"
+ case 49 : sCharacterStyle = "Rubys"
+ case 55 : sCharacterStyle = "Rubys"
+ case 81 : sCharacterStyle = "ふりがな"
+ case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO
+ case 86 : sCharacterStyle = "拼音和注音符号"
+ case 88 : sCharacterStyle = "注音符號"
+ case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
+
+ Call hNewDocument
+
+ FormatRuby
Kontext "RubyDialog"
Sleep 3
- if CharacterStyle.GetSelText <> sCharacterStyle then
- warnlog "Default setting for Character Style of Ruby Text isn't right, should be "+sCharacterStyle + " but get "+CharacterStyle.GetSelText
- for i = 1 to CharacterStyle.getItemCount
- printlog "("+i+"/"+CharacterStyle.getItemCount+"): '"+CharacterStyle.getItemText(i)+"'"
- next i
+ if CharacterStyle.GetSelText <> sCharacterStyle then
+ warnlog "Default setting for Character Style of Ruby Text isn't right, should be "+sCharacterStyle + " but get "+CharacterStyle.GetSelText
+ for i = 1 to CharacterStyle.getItemCount
+ printlog "("+i+"/"+CharacterStyle.getItemCount+"): '"+CharacterStyle.getItemText(i)+"'"
+ next i
endif
DialogClose.Click
- Sleep 1
+ Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
@@ -220,45 +241,49 @@ endcase
testcase tRubyDialog_5
- Dim sCharacterStyle as String
- Dim sStyleName as String
- Dim i as Integer
- dim iCount as integer
- dim bError as boolean
- dim bWileExit as boolean
-
-
- select case iSprache
- case 01 : sCharacterStyle = "Rubies"
- case 33 : sCharacterStyle = "Rubys"
- case 34 : sCharacterStyle = "Rubys"
- case 39 : sCharacterStyle = "Testo Ruby"
- case 46 : sCharacterStyle = "Rubytext"
- case 49 : sCharacterStyle = "Rubys"
- case 55 : sCharacterStyle = "Rubys"
- case 81 : sCharacterStyle = "ふりがな"
- case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO was "덧말"
- case 86 : sCharacterStyle = "拼音和注音符号"
- case 88 : sCharacterStyle = "注音符號"
- case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
- Goto endsub
- end select
-
- sStyleName = "ZZZ-Test-ZZZ"
-
- Call hNewDocument
-
- FormatRuby
+ Dim sCharacterStyle as String
+ Dim sStyleName as String
+ Dim i as Integer
+ dim iCount as integer
+ dim bError as boolean
+ dim bWileExit as boolean
+
+ '/// Check stylist
+
+ select case iSprache
+ case 01 : sCharacterStyle = "Rubies"
+ case 33 : sCharacterStyle = "Rubys"
+ case 34 : sCharacterStyle = "Rubys"
+ case 39 : sCharacterStyle = "Testo Ruby"
+ case 46 : sCharacterStyle = "Rubytext"
+ case 49 : sCharacterStyle = "Rubys"
+ case 55 : sCharacterStyle = "Rubys"
+ case 81 : sCharacterStyle = "ふりがな"
+ case 82 : sCharacterStyle = "윗주 달기" ' not sure TBO was "덧말"
+ case 86 : sCharacterStyle = "拼音和注音符号"
+ case 88 : sCharacterStyle = "注音符號"
+ case else :' QAErrorLog "Now, the test does not support for the language " +iSprache
+ Goto endsub
+ end select
+
+ sStyleName = "ZZZ-Test-ZZZ"
+
+ Call hNewDocument
+
+ '/// Open ruby dialogue
+ FormatRuby
Kontext "RubyDialog"
+ '/// Click stylist button
CallStylist.Click
Sleep 2
Kontext "Stylist"
if Stylist.NotExists then
- Warnlog "No Stylist with clicking Stylist button!"
+ Warnlog "No Stylist with clicking Stylist button!"
end if
+ '/// click Character Style
Zeichenvorlagen.Click
' needed to update the listbox count :-(
@@ -282,22 +307,24 @@ testcase tRubyDialog_5
endif
if (NOT bError) then
+ '/// find entry ruby and add a new entry
AusSelektion.OpenMenu
Sleep 1
printlog "hMenuSelect 1"
hMenuSelectNr(1)
printlog "hMenuSelect 1 survived"
Sleep 1
-
+
Kontext "VorlageErzeugen"
Sleep 1
Vorlagenname.SetText sStyleName
Sleep 1
VorlageErzeugen.OK
Sleep 2
-
+
+ '/// check if the new entry is in the Character Style list box in ruby dialogue
Kontext "RubyDialog"
-
+
' needed to update the listbox count :-(
CharacterStyle.typeKeys ("<end><up><down>")
iCount = CharacterStyle.GetItemCount
@@ -317,14 +344,14 @@ testcase tRubyDialog_5
CharacterStyle.select (i)
bError = false
endif
-
+
if (NOT bError) then
Kontext "Stylist"
iCount = Vorlagenliste.getItemCount
i=0
while ((i<iCount) AND (Vorlagenliste.getItemText (i+1) <> sStyleName))
inc (i)
- printlog "" + (i) + ": " + Vorlagenliste.getItemText (i)
+ printlog "" + (i) + ": " + Vorlagenliste.getItemText (i)
wEnd
if (i = iCount) then
warnlog "Style (Rubies) not found for deleting: '" + sStyleName + "' inside of entries: " + iCount
@@ -362,7 +389,7 @@ testcase tRubyDialog_5
DialogClose.Click
Sleep 1
- Call hCloseDocument
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/options_ooo_general.inc b/testautomation/framework/optional/includes/options_ooo_general.inc
index e0a07bb6b741..bda3b9a24d8f 100755
--- a/testautomation/framework/optional/includes/options_ooo_general.inc
+++ b/testautomation/framework/optional/includes/options_ooo_general.inc
@@ -1,16 +1,16 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* 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: options_ooo_general.inc,v $
+'* $RCSfile: w_grid_layout1.inc,v $
'*
-'* $Revision: 1.1 $
+'* $Revision: 1.2 $
'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
+'* last change: $Author: jsk $ $Date: 2008-06-17 07:50:24 $
'*
'* This file is part of OpenOffice.org.
'*
@@ -31,20 +31,39 @@
'*
'/************************************************************************
'*
-'* owner : joerg.skottke@sun.com
+'* owner : thorsten.bosbach@sun.com
'*
-'* short description : 1. test for general group userdata ... view)
+'* short description : Grid Layout for CJK test in Writer
'*
-'\******************************************************************************
+'\***********************************************************************
+private const SOURCE_PATH = "framework\optional\input\CJK\"
-testcase tOOoGeneral
+testcase tTextGridDialog_1
- dim lsSave (4) as String
- dim lbSave (3) as Boolean
+ '/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ hNewDocument()
+ FormatPageWriter
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ warnlog "Shouldn't get Tabpage: Grid Text"
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ endcatch
+ endif
- hNewDocument
+ '/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
+ Call CheckAsianLanguageSupport("On")
+ hNewDocument
ToolsOptions
hToolsOptions ( "StarOffice", "General" )
@@ -72,129 +91,499 @@ testcase tOOoGeneral
if ( ExtrasOptionenDlg.notExists( 3 ) ) then
printlog( "Options closed" )
endif
+ hCloseDocument()
+endcase
+'-------------------------------------------------------------------------
- hCloseDocument
+testcase tTextGridDialog_2
+ '/// No grid is active, no changes to existing version
+ Dim testFile , sCorrectResult as String
- printlog " - exit/restart StarOffice"
- ExitRestartTheOffice
+ testFile = "gridtest.sxw"
+ sCorrectResult = "1"
- printlog " - check data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ Call hNewDocument
- if Zweistellig.GetText <> "1950" then Warnlog "Year ( 2 digits ) => changes not saved: '" + Zweistellig.GetText +"' #i29810"
- if Aktivieren.IsChecked <> TRUE then Warnlog "Enable HelpAgent => changes not saved"
- Zuruecksetzen.Click
- if gPlatgroup = "w95" then
- if StarOfficeDialogeBenutzen.IsChecked = lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
- end if
- If DruckenStatus.IsChecked = lbSave ( 3 ) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
+ '/// open a test file , and check No Grid checkbox
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
- printlog " - 2. change data"
- Zweistellig.SetText "1800"
- DruckenStatus.UnCheck
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ NoGrid.Check
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ '/// In No Grid mode, there should be only 1 page, the focus is before the first line
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tTextGridDialog_3
+ '/// Grid (lines only): The page is set up with a defined number of lines
+ Dim testFile , sCorrectResult , sLinesPerPage as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "G"
+ sLinesPerPage = "10"
+
+ Call hNewDocument
+
+ '/// open a test file and check Grid(lines onle) checkbox ,
+ '/// + set 10 line/page
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ LinesGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tTextGridDialog_4
+ '/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "E"
+ sLinesPerPage = "10"
+ sCharsPerLine = "9"
+
+ Call hNewDocument
+
+ '/// open a test file and check Grid(lines and characters) checkbox
+ '/// + set 10 line/page and 9 characters/line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Active navigator dialogue , set page to '2' and wait for a while
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tGridDisplay_1
+ '/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
+ Call hNewDocument
+
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and check "print grid"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.Check
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
- 'It's a little tricky to reproduce.
- if gPlatgroup = "unx" then
- hNewDocument()
- FilePrint
- Kontext "DruckenDLG"
- if DruckenDLG.exists(5) then
- if gPlatform <> "osx" then
- Eigenschaften.click
- kontext
- active.setPage TabSPAPaper
- Kontext "TabSPAPaper"
- if TabSPAPaper.exists (5) then
- TabSPAPaper.OK
- sleep 5
- else
- qaErrorlog "Properties of Printer didn't come up."
- endif
- end if
- Kontext "DruckenDLG"
- DruckenDLG.OK
- ' check state
- kontext
- if active.exists(5) then
- printlog "active: printing failed? '" + active.gettext + "'"
- active.ok
+ '/// Print to printer
+ FilePrint
+ Kontext "Active"
+ if ( Active.Exists( 5 ) ) then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel
endif
- try
- FileSave
- qaErrorlog "#i52248# Modify flag is set after printing though option is not set."
- kontext "SpeichernDlg"
- if SpeichernDlg.exists(5) then
- SpeichernDlg.cancel
- endif
- catch
- printlog "#i52248# doesn't come up."
- endcatch
- else
- qaErrorLog "No printer available - resuming."
- kontext
- if active.exists(5) then
- printlog active.getText
- active.ok
+ endif
+ else
+ Kontext "Printing"
+ if ( Printing.exists( 2 )) then
+ Printing.OK()
+ Printing.notExists( 5 )
+ endif
+
+ kontext "Active"
+ if active.exists(5) then
+ qaErrorLog active.getText()
+ active.ok()
+ endif
+ endif
+
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and uncheck "print grid"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.UnCheck
+ Sleep 1
+ TabGrid.OK
+ Sleep 1
+
+ '/// Print to printer
+ FilePrint
+ Kontext "Active"
+ if ( Active.Exists( 5 ) )then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel()
endif
- endif
- hCloseDocument
- endif
-
- printlog " - check data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ endif
+ else
+ Kontext "Printing"
+ if( Printing.exists( 1 )) then
+ Printing.OK
+ Printing.notExists( 5 )
+ endif
+ kontext
+ if ( active.exists( 2 ) ) then
+ qaErrorLog active.getText
+ active.ok
+ endif
+ endif
- if Zweistellig.GetText <> "1800" then Warnlog "Year ( 2 digits ) => changes not saved : '" + Zweistellig.GetText +"'"
- If DruckenStatus.IsChecked <> FALSE then Warnlog "Printing sets 'Document modified' status => changes not saved!"
- if StyleSheet.GetSelIndex <> 3 then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+ Call hCloseDocument
+endcase
- printlog " - reset to saved data"
- Zweistellig.SetText lsSave ( 1 )
- Aktivieren.Check
- Zuruecksetzen.Click
- if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
- if gPlatgroup = "w95" then
- if lbSave (2) = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
- end if
- If lbSave(3)= TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
- StyleSheet.Select lsSave(3)
+'-------------------------------------------------------------------------
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+testcase tUserDefineLayout_1
+ '/// Decrease characters per line will cause lines per page decrease accordingly
+ Dim sLinesPerPage , sCharsPerLine as String
+ Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
+
+ sLinesPerPage = "20"
+ sCharsPerLine = "2"
+ sExpectLinesPerPage = "2"
+ sExpectLinesPerPage1 = "3"
+
+ Call hNewDocument
+
+ '/// Format/page , set lines per page to 20, and set charsets per line to 2
+ '/// + wait for a moment , then check the the number of lines per page.
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
endif
+ Kontext "TabGrid"
+ CharsGrid.Check
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 2
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 2
- printlog " - check the reset data"
- if Zweistellig.GetText <> lsSave ( 1 ) then Warnlog "Year ( 2 digits ) => changes not saved"
- if Aktivieren.IsChecked <> lbSave (1) then Warnlog "Enable HelpAgent => changes not saved"
- Aktivieren.Check
- Zuruecksetzen.Click
- if lbSave (1) = TRUE then Aktivieren.Check else Aktivieren.Uncheck
- if gPlatgroup = "w95" then
- if StarOfficeDialogeBenutzen.IsChecked <> lbSave (2) then Warnlog "Use StarOffice dialogs => changes not saved!"
- end if
- If DruckenStatus.IsChecked <> lbSave(3) then Warnlog "Printing sets 'Document modified' status => changes not saved!"
- if StyleSheet.GetSelText <> lsSave (3) then Warnlog "Style sheet for StarOffice Help => changes not saved!"
+ 'This step is no use, just let the LinesPerPage change the number
+ CharsGrid.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- if ( ExtrasOptionenDlg.notExists( 3 ) ) then
- printlog( "Options closed" )
+ if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
+ Warnlog "The lines per page should be" + sExpectLinesPerPage + " OR " + sExpectLinesPerPage1 +" but get " +LinesPerPage.GetText
endif
+ TabGrid.Cancel
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tFontSizeChanges_1
+ '/// Change the font size to bigger enough will change the layout
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
+ dim sTemp as string
+
+ testFile = "FontSizeChanges_1.sxw"
+ sCorrectResult = "1"
+ sLinesPerPage = "2"
+ sCharsPerLine = "9"
+
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+
+ Kontext "FormatObjectbar"
+ Schriftgroesse.Select "60"
+ Schriftgroesse.TypeKeys "<Return>"
+ Sleep 1
+
+ Kontext "DocumentWriter"
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ if TabGrid.exists(5) then
+ sTemp = LinesPerPage.GetText
+ if sTemp <> sLinesPerPage then
+ Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
+ endif
+ sTemp = CharsPerLine.GetText
+ if sTemp <> sCharsPerLine then
+ Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
+ endif
+ TabGrid.Cancel
+ else
+ warnlog "TabGrid is not available."
+ endif
+
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if NavigatorWriter.exists(5) then
+ Seitennummer.SetText "2"
+ Sleep 5
+ else
+ warnlog "Navigator not available"
+ endif
+ hCloseNavigator
+
+ Kontext "DocumentWriter"
+ sleep 3
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+
+ hUseAsyncSlot( "EditCopy" )
+ sTemp = GetClipboardText
+ if sTemp <> sCorrectResult then
+ Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tRubyText_1
+ '/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
+ Dim testFile , sRubyText as String
+
+ testFile = "rubytest.sxw"
+ sRubyText = "Ruby Test Text ....................."
+
+ Call hNewDocument
+
+ '/// open a test file , and insert long ruby test text
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+ Sleep 1
+
+ FormatRuby
+ Kontext "RubyDialog"
+ Sleep 3
+ RubyText1.setText sRubyText
+ Sleep 2
+ RubyDialog.OK
+ Sleep 2
+ DialogClose.Click
+ Sleep 1
+
+ Kontext "DocumentWriter"
+ FormatAutoformatApply
+ Sleep 2
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 2
+ Call DocumentWriter.TypeKeys "<Shift Left>"
+ hUseAsyncSlot( "EditCopy" )
+
+ if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
+ Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tIndentsTest_1
+ '/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "IndentsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Down>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+
+ '/// Active navigator dialogue , check if the page number is 1
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
+ hCloseNavigator
+
+ '/// press TAB in second line again
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Home>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+
+ '/// Active navigator dialogue , check if the page number is 2
+ Kontext
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
+ hCloseNavigator
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tObjectsTest_1
+ '/// If objects are anchored to text they will "wander" with its surrounding text.
+ '/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "objectsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+
+ '/// If object is anchored as Character , check if it will snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Sleep 1
+ Auswahlliste.TypeKeys "<Return>"
+ Sleep 1
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorAsCharacter
+ WaitSlot()
+
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
+ hCloseNavigator
+
+ '/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Auswahlliste.TypeKeys "<Return>"
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorToCharacter
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
+ hCloseNavigator
+ Kontext
+ Call hCloseDocument
endcase
diff --git a/testautomation/framework/optional/includes/options_so_4.inc b/testautomation/framework/optional/includes/options_so_4.inc
deleted file mode 100755
index e8c5639d5f35..000000000000
--- a/testautomation/framework/optional/includes/options_so_4.inc
+++ /dev/null
@@ -1,707 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* 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: options_so_4.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
-'*
-'* 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 : thorsten.bosbach@sun.com
-'*
-'* short description : options test (General/Memory/View)
-'*
-'\******************************************************************************
-
-testcase func_StarOfficeGeneral_1
- gApplication = "WRITER"
- Dim sSave as String
- Dim ClipText as String
-
-
- printlog " - other"
- printlog " - years two digits => 1899"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- sSave = Zweistellig.GetText
- Zweistellig.SetText "1899"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "CALC"
- hNewDocument
- DocumentCalc.TypeKeys "04.03.00<return>"
- DocumentCalc.TypeKeys "<up>"
- DocumentCalc.TypeKeys "<F2><Home><Shift End>"
- Sleep (1)
- EditCopy
- DocumentCalc.TypeKeys "<Escape>"
-
- ClipText = GetClipboardText
- if ClipText <> "04.03.1900" AND ClipText <> "04/03/1900" then Warnlog "Wrong date not 04.03.1900 or 04/03/1900 : => '" + ClipText + "'"
-
- hCloseDocument
-
- printlog " - years two digits => 2050"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zweistellig.SetText "2050"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "CALC"
- hNewDocument
- DocumentCalc.TypeKeys "05.03.68<return>"
- DocumentCalc.TypeKeys "<up>"
- DocumentCalc.TypeKeys "<F2><Home><Shift End>"
- Sleep (1)
- EditCopy
- DocumentCalc.TypeKeys "<Escape>"
-
- ClipText = GetClipboardText
- if ClipText <> "05.03.2068" AND ClipText <> "05/03/2068" then Warnlog "Wrong date not 05.03.2068 or 05/03/2068 : => '" + ClipText + "'"
-
- hCloseDocument
-
- printlog " - reset to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zweistellig.SetText sSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "WRITER"
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_2
- Dim bSave as Boolean
- Dim sSave as String
- Dim i as Integer, iTime as Integer
-
- gApplication = "WRITER"
-
- printlog "tools / options / staroffice / general -> help agent"
- printlog "- check the minimum and the maximum of display duration for help agent ( 60sec and 5sec )"
- printlog " activate the help agent options-dialog -> OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bSave = Aktivieren.IsChecked
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- working with activated HelpAgent"
- printlog " - check display duration of 10sec"
- printlog " new writer-doc"
- gApplication = "WRITER"
- hNewDocument
-
- printlog " tools / options / staroffice / general -> help agent -> duration to 10 -> "
- printlog " click also reset to delete the ignore-list for help-agent -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Zuruecksetzen.Click
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- printlog " check if agent closed after ~10sec"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 20
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=21
- end if
- next i
- if iTime < 9 then Warnlog "The help agent is closed faster than 9 seconds!"
- if iTime > 12 then Warnlog "The help agent isn't closed after 12 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 20 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
-
- Kontext "TabFont"
- TabFont.Cancel
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check another display duration of 40sec"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 40 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- printlog " check if agent closed after ~40sec"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 60
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=61
- end if
- next i
- if iTime < 35 then Warnlog "The help agent is closed faster than 35 seconds!"
- if iTime > 45 then Warnlog "The help agent isn't closed after 45 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 40 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check another display duration of 60sec"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 60 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent must be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) <> TRUE then
- Warnlog "The help agent wasn't activated for autocorrection!"
- else
- for i=1 to 80
- if HelpAgent.Exists then
- Sleep 1
- else
- iTime = i
- i=81
- end if
- next i
- if iTime < 55 then Warnlog "The help agent is closed faster than 55 seconds!"
- if iTime > 65 then Warnlog "The help agent isn't closed after 65 seconds!"
- if HelpAgent.Exists then
- Warnlog "The help agent isn't closed after 60 seconds, the test close it!"
- HelpAgent.Close
- end if
- end if
-
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check if the help agent isn't active, when you ignore it 3 times ( inserted in the ignore-list )"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> duration to 10 -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent should not be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists then
- Warnlog "Ignore HelpAgent 3 time for the same slot does not work, HelpAgent is active!"
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - check if ignore-list can be deleted"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> help agent -> click on reset -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Zuruecksetzen.Click
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- printlog " Format/Character - Font-Tabpage => help-agent should not be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(2) <> TRUE then
- Warnlog "Ignore-list isn't reset, the HelpAgent is not active"
- else
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - working with deactivated the help agent"
- printlog " new writer-doc"
- hNewDocument
- printlog " tools / options / staroffice / general -> deactivate help agent -> options-dialog OK"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog " Format/Character - Font-Tabpage => help-agent ust be activated"
- FormatCharacter
- Kontext
- active.SetPage TabFont
-
- Kontext "HelpAgent"
- if HelpAgent.Exists(1) = TRUE then
- Warnlog "The help agent was active!"
- HelpAgent.Close
- end if
- Kontext "TabFont"
- TabFont.Cancel
-
- printlog " close options-dialog and close the writer-doc"
- hCloseDocument
-
- printlog " - reset help-agent-options"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- Aktivieren.Check
- Zuruecksetzen.Click
- if bSave = TRUE then Aktivieren.Check else Aktivieren.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_3
- Dim bStatus as Boolean
-
- gApplication = "WRITER"
-
-
- printlog "StarOffice / General => 'printing sets 'document modified' status'"
- printlog "save a writer-doc"
- hNewDocument
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "This is a file, for options test: <return> Tools / Options / StarOffice / General -> 'Printing sets 'document modified' status'"
- DocumentWriter.TypeKeys "<Return><Return>This file is created by an automated test. It can be trashed after one day!<Return>Today is " + Date
- hFileSaveAsKill ( gOfficePath + "user\work\opt.sxw" )
-
- printlog "- open tools/option/StarOffice/general and save the state of the checkbox"
- printlog "- check it"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bStatus = DruckenStatus.IsChecked
- DruckenStatus.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/print and click OK at the print-dialog"
- FilePrint
-
- Kontext "Active"
- if Active.Exists() then
- warnlog( "Unexpected dialog, no default printer found (#108776?)" )
- Active.OK()
- else
- Kontext "DruckenDlg"
- DruckenDlg.OK
- Sleep (5)
- endif
-
- printlog "- file/close"
- FileClose
- Kontext "Active"
- if Active.Exists(2) <> TRUE then
- Warnlog "No warning, when this options is checked!"
- else
- Active.Cancel
- end if
-
- printlog "- file/save"
- FileSave
-
- printlog "- uncheck the checkbox"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- DruckenStatus.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/print"
- FilePrint
- Kontext "DruckenDlg"
- DruckenDlg.OK
- Sleep (5)
-
- printlog "- file/close"
- FileClose
- Kontext "Active"
- if Active.Exists(2) then
- Warnlog "The document is modified, a messagebox came up at closing"
- Active.Yes
- end if
-
- printlog "- reset this option"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- if bStatus = TRUE then DruckenStatus.Check else DruckenStatus.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeGeneral_4
- Dim bStatus as Boolean
-
- gApplication = "WRITER"
-
-
- hNewDocument
- printlog "StarOffice / General => 'use StarOffice dialogs'"
- if gPlatgroup = "unx" then
- printlog "This feature is only available on windows systems"
- else
- printlog "- open tools/options/staroffice/general and uncheck 'use StarOffice dialogs'"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- bStatus = StarOfficeDialogeBenutzen.IsChecked
- StarOfficeDialogeBenutzen.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- file/open and check if the file-dialog is a system-dialog"
- FileOpen
- if ExistsSysDialog ( FilePicker ) = FALSE then
- Warnlog "The file-open-dialog is no system dialog"
- Kontext "OeffnenDlg"
- OeffnenDlg.Cancel
- else
- CloseSysDialog ( FilePicker )
- end if
-
- printlog Chr(13) + "check that StarOffice dialogs are used => state of the checkbox is checked"
- printlog "- open tools/options/staroffice/general"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- StarOfficeDialogeBenutzen.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- printlog "- open tools/options/staroffice/general and check 'use StarOffice dialogs'"
- FileOpen
- Kontext "OeffnenDlg"
- if OeffnenDlg.Exists (1) <> TRUE then
- Warnlog "StarOffice dialogs are not used!"
- if ExistsSysDialog ( FilePicker ) then CloseSysDialog ( FilePicker )
- else
- OeffnenDlg.Cancel
- end if
-
- printlog Chr(13) + "reset the state of 'use StarOffice dialogs' to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "General" )
- if bStatus = TRUE then StarOfficeDialogeBenutzen.Check else StarOfficeDialogeBenutzen.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- end if
-
- hCloseDocument
-
-endcase
-
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeMemory_1
- Dim sSave as String
- Dim i, ilast as Integer
- gApplication = "WRITER"
-
-
- printlog " - save"
- printlog " - undo"
- printlog " - set number of steps => 1"
-
- hNewDocument
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- sSave = UndoSteps.GetText
- UndoSteps.SetText "1"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.TypeKeys "Hello "
- DocumentWriter.TypeKeys "friends "
-
- EditUndo
- try
- EditUndo
- Warnlog "More than 1 undo was possible!"
- catch
- endcatch
-
- printlog " - set number of steps => 15"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText "15"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- for i=1 to 20
- DocumentWriter.TypeKeys "Hello<return>"
- next i
- Sleep (2)
-
- for i=1 to 20
- if i<16 then
- try
- EditUndo
- catch
- iLast = i-1
- Warnlog "The 15th undo was impossible! The test can do only " + iLast + " undos! => BugID 83891"
- endcatch
- else
- try
- EditUndo
- Warnlog "More than 15 undo was possible!"
- catch
- endcatch
- end if
- next i
-
- printlog " - set number of steps => 99"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText "99"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- for i=1 to 102
- DocumentWriter.TypeKeys "Hello<return>"
- next i
-
- for i=1 to 102
- if i<100 then
- try
- EditUndo
- catch
- iLast = i-1
- Warnlog "The 99th undo was impossible! The test can do only " + iLast + " undos! => BugID 83891"
- i=105
- endcatch
- else
- try
- EditUndo
- Warnlog "More than 99 undo are possible!"
- catch
- i=105
- endcatch
- end if
- next i
-
- hCloseDocument
-
- printlog " - reset the number of steps"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Memory" )
- UndoSteps.SetText sSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_1
- Dim bSave as Boolean
- Dim iSave as Integer
- Dim sSave as String
-
-hNewDocument
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - view"
- printlog " - display"
- printlog " - scaling"
- sSave = FontScale.GetText
- FontScale.SetText "50"
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- FontScale.SetText "150"
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- FontScale.SetText(sSave)
- FontScale.More
- FontScale.Less
- printlog " - " + FontScale.GetText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
- hclosedocument
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_2
- Dim iSave as Integer
-
- printlog " - view"
- printlog " - mouse positioning"
-
- hNewDocument
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- iSave = MousePositioning.GetSelIndex
- MousePositioning.Select 1
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select 2
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select 3
- printlog " - " + MousePositioning.GetSelText
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.MouseMove 1, 1
-
- DialogTestForViewOptions
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- MousePositioning.Select iSave
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-endcase
-
-
diff --git a/testautomation/framework/optional/includes/options_so_5.inc b/testautomation/framework/optional/includes/options_so_5.inc
deleted file mode 100755
index 200e37ad47c1..000000000000
--- a/testautomation/framework/optional/includes/options_so_5.inc
+++ /dev/null
@@ -1,612 +0,0 @@
-'encoding UTF-8 Do not remove or change this line!
-'**************************************************************************
-'* 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: options_so_5.inc,v $
-'*
-'* $Revision: 1.1 $
-'*
-'* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
-'*
-'* 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 : thorsten.bosbach@sun.com
-'*
-'* short description : general option test
-'*
-'\******************************************************************************
-
-
-testcase func_StarOfficeView_3
-
- Dim bSave as Boolean
- Dim iSave as Integer
- Dim xPos, yPos as Integer
-
- printlog " - view"
- printlog " - buttons"
-
- hNewDocument
-
- Kontext "DocumentWriter"
- xPos = DocumentWriter.getSizeX
- yPos = DocumentWriter.getSizeY
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- iSave = IconScale.getSelIndex()
-
- printlog " - set buttonsize to 'large'"
- IconScale.Select( 3 )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- if DocumentWriter.getSizeX = xPos AND DocumentWriter.getSizeY = yPos then
- warnlog "Perhaps the buttons are not large!"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- printlog " - set buttonsize to 'small'"
- IconScale.Select( 2 )
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- if DocumentWriter.getSizeX <> xPos OR DocumentWriter.getSizeY <> yPos then
- warnlog "Perhaps the buttons are not small!"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- printlog " - large buttons => default"
- if iSave <> 1 then
- IconScale.Select( iSave )
- endif
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-endcase
-
-'*******************************************************************************
-
-testcase func_StarOfficeView_4
- Dim bSave ( 10 ) as Boolean
- Dim i as Integer, iCount as Integer
-
- printlog " - view"
- printlog " - options"
-
- hNewDocument
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- bSave(4) = VorschauInSchriftlisten.IsChecked
- bSave(6) = SchriftenHistorie.IsChecked
-
- printlog " - inactive menu items : => check"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- iCount = hMenuItemGetCount
- Sleep (2)
- hMenuClose
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - inactive menu items : => uncheck"
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "DocumentWriter"
- DocumentWriter.OpenContextMenu
- if hMenuItemGetCount <> iCount then
- Warnlog "The number of entries at the context menu on a writer doc is NOT the same at 'show inactive' is checked or not => BUG!"
- end if
- Sleep (2)
- hMenuClose
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - preview in fontlist : => Uncheck"
- VorschauInSchriftlisten.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- if textobjectbar.exists then
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
- else
- warnlog "No Textobjectbar?"
- endif
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - preview in fontlist : => check"
- VorschauInSchriftlisten.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(4) = TRUE then VorschauInSchriftlisten.Check else VorschauInSchriftlisten.UnCheck
- printlog " - font history : => Uncheck"
- SchriftenHistorie.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- printlog " - font history : => check"
- SchriftenHistorie.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Kontext "textobjectbar"
- for i=1 to Schriftart.GetItemCount
- Schriftart.Select i
- next i
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(6) = TRUE then SchriftenHistorie.Check else SchriftenHistorie.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hCloseDocument
-
-endcase
-
-'*******************************************************************************
-
-testcase func_StarOfficeView_5
-
- Dim bSave ( 5 ) as Boolean
- Dim i as Integer
-
- printlog " - view"
- printlog " - 3D-view"
-
- printlog " - use OpenGL => Uncheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- bSave (1) = OpenGL.IsChecked
- bSave (2) = OptimierteAusgabe.IsChecked
-
- OpenGL.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => Check + optimized output => UnCheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Check
- OptimierteAusgabe.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => Check + optimized output => Check"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Check
- OptimierteAusgabe.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use dithering => uncheck"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(2) = TRUE then OptimierteAusgabe.Check else OptimierteAusgabe.Check
- if bSave(1) = TRUE then OpenGL.Check else OpenGL.UnCheck
- bSave (3) = Dithering.IsChecked
- Dithering.Uncheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use dithering => Check"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- Dithering.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => UnCheck + Dithering => UnCheck!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Uncheck
- Dithering.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - Object refresh after interaction => check!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
- if bSave(3) = TRUE then Dithering.Check else Dithering.UnCheck
- bSave (4) = Volldarstellung.IsChecked
- Volldarstellung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - use OpenGL => UnCheck + Object refresh after interaction => check!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- OpenGL.Uncheck
- Volldarstellung.Check
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - Object refresh after interaction => UnCheck!"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(1) = TRUE then OpenGL.check else OpenGL.UnCheck
- Volldarstellung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- Call Make3D
-
- printlog " - reset to default"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- if bSave(4) = TRUE then Volldarstellung.check else Volldarstellung.UnCheck
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- gApplication = "WRITER"
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficeView_6
- Dim bSave as Boolean
- Dim sSave as String
- Dim i as Integer
-
- if gPlatgroup <> "unx" then
- printlog "No test for 'anti aliasing' fonts on windows platforms!"
- goto endsub
- end if
-
- printlog "open a new writer-document"
- gApplication = "WRITER"
- hNewDocument
-
- printlog " - view"
- printlog " - anti aliasing"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
-
- bSave = FontAntiAliasing.IsChecked
- FontAntiAliasing.Check
- sSave = AAPixel.GetText
-
- printlog " change pixelsize to 5"
- AAPixel.SetText "5"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " change pixelsize to 15"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText "15"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " change pixelsize to 25"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText "25"
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- for i=1 to 8
- Kontext "DocumentWriter"
- DocumentWriter.UseMenu
- hMenuSelectNr i
- Sleep (2)
- hMenuClose
- next i
-
- printlog " reset all changes to raw data"
- ToolsOptions
- hToolsOptions ( "StarOffice", "View" )
- AAPixel.SetText sSave
- if bSave = TRUE then FontAntiAliasing.Check else FontAntiAliasing.UnCheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
-
- hCloseDocument
-
-endcase
-
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
-testcase func_StarOfficePrint_1
- Dim bSave as Boolean, bSave2 as Boolean
- Dim i as Integer
-
- gApplication = "DRAW"
-
- printlog " - printer warnings"
-
- printlog " - Paper size => active"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- bSave = PaperSize.IsChecked
- PaperSize.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- FormatSlideDraw
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- Papierformat.Select 1 ' select the format A0
- TabSeite.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- else
- Warnlog "The warning-message for papersize does not turn up!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Paper size => disabled"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- PaperSize.uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- FormatSlideDraw
- Kontext
- Active.Setpage TabSeite
- Kontext "TabSeite"
- Papierformat.Select 1 ' select the format A0
- TabSeite.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- Printlog "The warning-message for papersize does exist => not realy a BUG"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Transparency => active"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- bSave2 = Transparency.IsChecked
- PaperSize.Uncheck
- Transparency.Check
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- hRechteckErstellen ( 30, 30, 60, 60 )
-
- FormatArea
- Kontext
- Active.Setpage TabTransparenz
- Kontext "TabTransparenz"
- LineareTransparenz.Check
- TabTransparenz.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintOptions"
- if WarningPrintOptions.Exists(3) then
- WarningPrintOptions.Cancel
- else
- Warnlog "The warning-message for papersize does not turn up!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- hCloseDocument
-
- printlog " - Transparency => disabled"
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
-
- Transparency.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
- hNewDocument
- hRechteckErstellen ( 30, 30, 60, 60 )
-
- FormatArea
- Kontext
- Active.Setpage TabTransparenz
- Kontext "TabTransparenz"
- LineareTransparenz.Check
- TabTransparenz.OK
-
- FilePrint
- Kontext "DruckenDlg"
- if DruckenDlg.Exists then
- DruckenDlg.OK
- Sleep 5
- Kontext "WarningPrintTransparency"
- if WarningPrintTransparency.Exists(3) then
- WarningPrintTransparency.Cancel
- Warnlog "The warning-message for papersize does exist => BUG!"
- end if
- else
- Kontext "Active"
- if Active.Exists then Warnlog Active.GetText
- Active.OK
- end if
-
- for i=1 to 100
- FileClose
- Sleep 2
- Kontext "Active"
- if Active.Exists then
- try
- Active.OK
- Sleep ( 5 )
- catch
- Active.No
- i=101
- endcatch
- end if
- next i
-
- printlog " - reset the printing options"
-
- ToolsOptions
- hToolsOptions ( "StarOffice", "Print" )
- if bSave = TRUE then PaperSize.Check else PaperSize.Uncheck
- if bSave2 = TRUE then Transparency.Check else Transparency.Uncheck
-
- Kontext "ExtrasOptionenDlg"
- ExtrasOptionenDlg.OK
- Sleep (2)
-
-endcase
-
diff --git a/testautomation/framework/optional/includes/w_grid_layout1.inc b/testautomation/framework/optional/includes/w_grid_layout1.inc
index 8909045f288b..b467a7be3ae1 100755..100644
--- a/testautomation/framework/optional/includes/w_grid_layout1.inc
+++ b/testautomation/framework/optional/includes/w_grid_layout1.inc
@@ -1,7 +1,7 @@
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
'* 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
@@ -41,265 +41,335 @@ private const SOURCE_PATH = "framework\optional\input\CJK\"
testcase tTextGridDialog_1
- if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
- Call CheckAsianLanguageSupport("Off")
- hNewDocument()
- FormatPageWriter
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- warnlog "Shouldn't get Tabpage: Grid Text"
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- endcatch
- end if
-
- Call CheckAsianLanguageSupport("On")
-
- sleep 5
- FormatPageWriter
- Kontext
- if Active.exists (10) then
- try
- Kontext
- Active.SetPage TabGrid
- Kontext "TabGrid"
- TabGrid.Cancel
- catch
- Kontext
- Active.SetPage TabSeite
- Kontext "TabSeite"
- TabSeite.Cancel
- warnlog "Couldn't get Tabpage: Grid Text"
- endcatch
- else
- warnlog "FormatPageWriter didn't bring up ndialog"
- endif
- hCloseDocument()
+ '/// Check if tabpage 'Text Grid' disappears when "Asian Language support" is NOT checked
+ if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
+ Call CheckAsianLanguageSupport("Off")
+ hNewDocument()
+ FormatPageWriter
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ warnlog "Shouldn't get Tabpage: Grid Text"
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ endcatch
+ endif
+
+ '/// Check if tabpage 'Text Grid' appears when "Asian Language support" is checked
+ Call CheckAsianLanguageSupport("On")
+
+ sleep 5
+ FormatPageWriter
+ Kontext
+ if Active.exists (10) then
+ try
+ Kontext
+ Active.SetPage TabGrid
+ Kontext "TabGrid"
+ TabGrid.Cancel
+ catch
+ Kontext
+ Active.SetPage TabSeite
+ Kontext "TabSeite"
+ TabSeite.Cancel
+ warnlog "Couldn't get Tabpage: Grid Text"
+ endcatch
+ else
+ warnlog "FormatPageWriter didn't bring up ndialog"
+ endif
+ hCloseDocument()
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_2
- Dim testFile , sCorrectResult as String
+ '/// No grid is active, no changes to existing version
+ Dim testFile , sCorrectResult as String
+
+ testFile = "gridtest.sxw"
+ sCorrectResult = "1"
- testFile = "gridtest.sxw"
- sCorrectResult = "1"
+ Call hNewDocument
- Call hNewDocument
+ '/// open a test file , and check No Grid checkbox
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
-
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- NoGrid.Check
- Sleep 1
+ Kontext "TabGrid"
+ NoGrid.Check
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
+ '/// In No Grid mode, there should be only 1 page, the focus is before the first line
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing NoGrid option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_3
- Dim testFile , sCorrectResult , sLinesPerPage as String
+ '/// Grid (lines only): The page is set up with a defined number of lines
+ Dim testFile , sCorrectResult , sLinesPerPage as String
- testFile = "gridtest.sxw"
- sCorrectResult = "G"
- sLinesPerPage = "10"
+ testFile = "gridtest.sxw"
+ sCorrectResult = "G"
+ sLinesPerPage = "10"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
+ '/// open a test file and check Grid(lines onle) checkbox ,
+ '/// + set 10 line/page
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- LinesGrid.Check
- LinesPerPage.SetText sLinesPerPage
- Sleep 1
+ Kontext "TabGrid"
+ LinesGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines only) option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tTextGridDialog_4
- Dim testFile , sCorrectResult as String
- Dim sLinesPerPage , sCharsPerLine as String
+ '/// Grid (lines and characters): The page is set up with a defined number of lines and a defined number of characters in each line
+ Dim testFile , sCorrectResult as String
+ Dim sLinesPerPage , sCharsPerLine as String
- testFile = "gridtest.sxw"
- sCorrectResult = "E"
- sLinesPerPage = "10"
- sCharsPerLine = "9"
+ testFile = "gridtest.sxw"
+ sCorrectResult = "E"
+ sLinesPerPage = "10"
+ sCharsPerLine = "9"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
- sMakeReadOnlyDocumentEditable
+ '/// open a test file and check Grid(lines and characters) checkbox
+ '/// + set 10 line/page and 9 characters/line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ sMakeReadOnlyDocumentEditable
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- LinesPerPage.SetText sLinesPerPage
- CharsPerLine.SetText sCharsPerLine
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ LinesPerPage.SetText sLinesPerPage
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Active navigator dialogue , set page to '2' and wait for a while
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
+ Kontext "NavigatorWriter"
- Seitennummer.SetText "2"
- Sleep 5
- fCloseNavigator
+ Seitennummer.SetText "2"
+ Sleep 5
+ hCloseNavigator
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if GetClipboardText <> sCorrectResult then Warnlog "Something wrong when choosing Grid(lines and characters) option!"
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tGridDisplay_1
- Call hNewDocument
+ '/// Print grid: The grid lines will be printed. Inactive if "Display grid" is inactive.
+ Call hNewDocument
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and check "print grid"
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.Check
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.Check
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Print to printer
FilePrint
Kontext "Active"
- if Active.Exists(5) then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if ( Active.Exists( 5 ) ) then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel
+ endif
+ endif
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- kontext
- if active.exists(5) then
- qaErrorLog active.getText
- active.ok
- end if
- end if
+ Kontext "Printing"
+ if ( Printing.exists( 2 )) then
+ printing.cancel()
+ Printing.notExists( 5 )
+ endif
+
+ kontext "Active"
+ if active.exists(5) then
+ qaErrorLog active.getText()
+ active.ok()
+ endif
+ endif
+ '/// format / page / tabpage Text grid
+ '/// + check "display grid" and uncheck "print grid"
FormatPageWriter
Kontext
if active.exists(5) then
Active.SetPage TabGrid
endif
- Kontext "TabGrid"
- CharsGrid.Check
- Display.Check
- Sleep 1
- PrintGrid.UnCheck
- Sleep 1
+ Kontext "TabGrid"
+ CharsGrid.Check
+ Display.Check
+ Sleep 1
+ PrintGrid.UnCheck
+ Sleep 1
TabGrid.OK
Sleep 1
+ '/// Print to printer
FilePrint
Kontext "Active"
- if Active.Exists(5) then
- if Active.GetRT = 304 then
- Active.Ok
- QAErrorLog "No Default-Printer!"
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.Cancel
- end if
+ if ( Active.Exists( 5 ) )then
+ if Active.GetRT() = 304 then
+ Active.Ok()
+ QAErrorLog "No Default-Printer!"
+ Kontext "Printing"
+ if ( Printing.exists( 1 )) then
+ Printing.Cancel()
+ endif
+ endif
else
- Kontext "DruckenDlg"
- Sleep 1
- DruckenDlg.OK
- Sleep 5
- kontext
- if active.exists(5) then
- qaErrorLog active.getText
- active.ok
- end if
- end if
-
- Call hCloseDocument
+ Kontext "Printing"
+ if( Printing.exists( 1 )) then
+ printing.cancel()
+ Printing.notExists( 5 )
+ endif
+ kontext
+ if ( active.exists( 2 ) ) then
+ qaErrorLog active.getText
+ active.ok
+ endif
+ endif
+
+ Call hCloseDocument
+endcase
+
+'-------------------------------------------------------------------------
+
+testcase tUserDefineLayout_1
+ '/// Decrease characters per line will cause lines per page decrease accordingly
+ Dim sLinesPerPage , sCharsPerLine as String
+ Dim sExpectLinesPerPage , sExpectLinesPerPage1 as String
+
+ sLinesPerPage = "20"
+ sCharsPerLine = "2"
+ sExpectLinesPerPage = "2"
+ sExpectLinesPerPage1 = "3"
+
+ Call hNewDocument
+
+ '/// Format/page , set lines per page to 20, and set charsets per line to 2
+ '/// + wait for a moment , then check the the number of lines per page.
+ FormatPageWriter
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ CharsGrid.Check
+
+ LinesPerPage.SetText sLinesPerPage
+ Sleep 2
+ CharsPerLine.SetText sCharsPerLine
+ Sleep 2
+
+ 'This step is no use, just let the LinesPerPage change the number
+ CharsGrid.Check
+
+ if LinesPerPage.GetText <> sExpectLinesPerPage AND LinesPerPage.GetText <> sExpectLinesPerPage1 then
+ Warnlog( "#i106381# - LInes per page changed" )
+ printlog( "The lines per page should be" + sExpectLinesPerPage & " OR " & sExpectLinesPerPage1 & " but get " &LinesPerPage.GetText )
+ endif
+
+ TabGrid.Cancel
+
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tFontSizeChanges_1
+
+ '/// Change the font size to bigger enough will change the layout
Dim testFile , sCorrectResult as String
Dim sLinesPerPage , sCharsPerLine as String
dim sTemp as string
@@ -315,30 +385,30 @@ testcase tFontSizeChanges_1
Call DocumentWriter.TypeKeys "<Shift Right>"
Kontext "FormatObjectbar"
- Schriftgroesse.Select "60"
- Schriftgroesse.TypeKeys "<Return>"
- Sleep 1
+ Schriftgroesse.Select "60"
+ Schriftgroesse.TypeKeys "<Return>"
+ Sleep 1
Kontext "DocumentWriter"
FormatPageWriter
- Kontext
- if active.exists(5) then
- Active.SetPage TabGrid
+ Kontext
+ if active.exists(5) then
+ Active.SetPage TabGrid
+ endif
+ Kontext "TabGrid"
+ if TabGrid.exists(5) then
+ sTemp = LinesPerPage.GetText
+ if sTemp <> sLinesPerPage then
+ Warnlog "The lines per page should be: '" & sLinesPerPage & "'; but get: '" & sTemp & "'"
endif
- Kontext "TabGrid"
- if TabGrid.exists(5) then
- sTemp = LinesPerPage.GetText
- if sTemp <> sLinesPerPage then
- Warnlog "The lines per page should be: '" + sLinesPerPage + "'; but get: '" + sTemp + "'"
- endif
- sTemp = CharsPerLine.GetText
- if sTemp <> sCharsPerLine then
- Warnlog "The chars per line should be: '" + sCharsPerLine + "'; but get: '" +sTemp + "'"
- endif
- TabGrid.Cancel
- else
- warnlog "TabGrid is not available."
+ sTemp = CharsPerLine.GetText
+ if sTemp <> sCharsPerLine then
+ Warnlog "The chars per line should be: '" & sCharsPerLine & "'; but get: '" &sTemp & "'"
endif
+ TabGrid.Cancel
+ else
+ warnlog "TabGrid is not available."
+ endif
Kontext
ViewNavigator
@@ -349,16 +419,16 @@ testcase tFontSizeChanges_1
else
warnlog "Navigator not available"
endif
- fCloseNavigator
+ hCloseNavigator
Kontext "DocumentWriter"
sleep 3
Call DocumentWriter.TypeKeys "<Shift Right>"
- sleep 3
- Editcopy
+
+ hUseAsyncSlot( "EditCopy" )
sTemp = GetClipboardText
- if sTemp <> sCorrectResult then
- Warnlog "Don't get the expected result , hope to be: '" + sCorrectResult + "'; but get: '" + sTemp + "'"
+ if sTemp <> sCorrectResult then
+ Warnlog "Don't get the expected result , hope to be: '" & sCorrectResult & "'; but get: '" & sTemp & "'"
endif
Call hCloseDocument
@@ -367,26 +437,28 @@ endcase
'-------------------------------------------------------------------------
testcase tRubyText_1
- Dim testFile , sRubyText as String
+ '/// If Ruby Text is applied and longer than its Base Text it will stretch over more grid cells than the base text itself.
+ Dim testFile , sRubyText as String
- testFile = "rubytest.sxw"
- sRubyText = "Ruby Test Text ....................."
+ testFile = "rubytest.sxw"
+ sRubyText = "Ruby Test Text ....................."
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ '/// open a test file , and insert long ruby test text
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Shift Right>"
- Sleep 1
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Shift Right>"
+ Sleep 1
FormatRuby
Kontext "RubyDialog"
- Sleep 3
- RubyText1.setText sRubyText
- Sleep 2
- RubyDialog.OK
- Sleep 2
+ Sleep 3
+ RubyText1.setText sRubyText
+ Sleep 2
+ RubyDialog.OK
+ Sleep 2
DialogClose.Click
Sleep 1
@@ -396,42 +468,46 @@ testcase tRubyText_1
Call DocumentWriter.TypeKeys "<End>"
Sleep 2
Call DocumentWriter.TypeKeys "<Shift Left>"
- Editcopy
+ hUseAsyncSlot( "EditCopy" )
if NOT(GetClipboardText = "5" OR GetClipboardText = "6") then
- Warnlog "Don't get the correct result after inserting ruby text! Get " + GetClipboardText
- end if
+ Warnlog "Don't get the correct result after inserting ruby text! Get " & GetClipboardText
+ endif
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
testcase tIndentsTest_1
- Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+ '/// Indents should work and always indenting as close as possible to their measurements by snapping to the appropriate grid cell. Tabs therefore will be ignored.
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
- testFile = "IndentsTest.sxw"
- sCorrectPage1 = "1"
- sCorrectPage2 = "2"
+ testFile = "IndentsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
- Call hNewDocument
+ Call hNewDocument
- Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
sMakeReadOnlyDocumentEditable
- Kontext "DocumentWriter"
- Call DocumentWriter.TypeKeys "<Down>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<Tab>"
- Sleep 1
- Call DocumentWriter.TypeKeys "<End>"
- Sleep 1
+ Kontext "DocumentWriter"
+ Call DocumentWriter.TypeKeys "<Down>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<Tab>"
+ Sleep 1
+ Call DocumentWriter.TypeKeys "<End>"
+ Sleep 1
+ '/// Active navigator dialogue , check if the page number is 1
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
- fCloseNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "First test :Something wrong in indents test!"
+ hCloseNavigator
+ '/// press TAB in second line again
Kontext "DocumentWriter"
Call DocumentWriter.TypeKeys "<Home>"
Sleep 1
@@ -440,13 +516,67 @@ testcase tIndentsTest_1
Call DocumentWriter.TypeKeys "<End>"
Sleep 1
+ '/// Active navigator dialogue , check if the page number is 2
Kontext
ViewNavigator
- Kontext "NavigatorWriter"
- if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
- fCloseNavigator
+ Kontext "NavigatorWriter"
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Second test :Something wrong in indents test!"
+ hCloseNavigator
- Call hCloseDocument
+ Call hCloseDocument
endcase
'-------------------------------------------------------------------------
+
+testcase tObjectsTest_1
+ '/// If objects are anchored to text they will "wander" with its surrounding text.
+ '/// If they are anchored as character they will snap to the appropriate grid cell (since they are a character).
+ Dim testFile , sCorrectPage1 , sCorrectPage2 as String
+
+ testFile = "objectsTest.sxw"
+ sCorrectPage1 = "1"
+ sCorrectPage2 = "2"
+
+ Call hNewDocument
+
+ '/// open a test file , and press TAB in second line
+ Call hFileOpen ( gTesttoolPath + SOURCE_PATH + testFile )
+
+ '/// If object is anchored as Character , check if it will snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Sleep 1
+ Auswahlliste.TypeKeys "<Return>"
+ Sleep 1
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorAsCharacter
+ WaitSlot()
+
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage2 then Warnlog "Something wrong when object is anchored as Character!"
+ hCloseNavigator
+
+ '/// If object is anchored to Character , check if it will NOT snap to the appropriate grid cell
+ fStartupNavigator( "OLEObject" , 1 )
+ Auswahlliste.TypeKeys "<Return>"
+ hCloseNavigator
+
+ Kontext
+ FormatAnchorToCharacter
+
+ ViewNavigator
+ Kontext "NavigatorWriter"
+ Seitennummer.SetText sCorrectPage2
+ Sleep 5
+ if Seitennummer.GetText <> sCorrectPage1 then Warnlog "Something wrong when object is anchored to Character!"
+ hCloseNavigator
+ Kontext
+
+ Call hCloseDocument
+endcase
+