1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 '* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 '* Copyright 2008 by Sun Microsystems, Inc.
7 '* OpenOffice.org - a multi-platform office productivity suite
9 '* $RCSfile: CJK_FeatureSwitchTest_1.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:13 $
15 '* This file is part of OpenOffice.org.
17 '* OpenOffice.org is free software: you can redistribute it and/or modify
18 '* it under the terms of the GNU Lesser General Public License version 3
19 '* only, as published by the Free Software Foundation.
21 '* OpenOffice.org is distributed in the hope that it will be useful,
22 '* but WITHOUT ANY WARRANTY; without even the implied warranty of
23 '* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 '* GNU Lesser General Public License version 3 for more details
25 '* (a copy is included in the LICENSE file that accompanied this code).
27 '* You should have received a copy of the GNU Lesser General Public License
28 '* version 3 along with OpenOffice.org. If not, see
29 '* <http://www.openoffice.org/license.html>
30 '* for a copy of the LGPLv3 License.
32 '/************************************************************************
34 '* owner : hercule.li@sun.com
36 '* short description : CJK Feature Switch test
38 '\***********************************************************************
40 testcase tSwitchLocation
41 '/// Check if the switch "Asian Language support" exist -- tools/options/language settings/language
44 Call hToolsOptions("LANGUAGESETTINGS" , "LANGUAGES")
47 if Aktivieren.IsChecked = TRUE then
48 printLog "CJK language is checked"
50 printLog "CJK language isn't checked"
53 warnlog "Something wrong in checkbox 'Asian Language Support'"
56 Kontext "ExtrasOptionenDlg"
60 '-------------------------------------------------------------------------
62 testcase tWriterUIChangesTest1
63 '/// Check if checkbox "Snap to text grid" is enable or not -- Format/Paragraph tabpage "Alignment"
66 '/// turn on "Asian Language support" , check if checkbox "Snap to text grid" is enable
67 Call CheckAsianLanguageSupport("On")
71 Active.SetPage TabAusrichtungAbsatz
72 Kontext "TabAusrichtungAbsatz"
75 if TextrasterFangen.IsChecked = TRUE then
76 printLog "snap to text grid is checked"
78 printLog "snap to text grid isn't checked"
81 warnlog "Something wrong in checkbox 'snap to text grid'"
84 TabAusrichtungAbsatz.Cancel
86 '/// turn off "Asian Language support" , check if checkbox "Snap to text grid" isn't enable
87 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
88 Call CheckAsianLanguageSupport("Off")
92 Active.SetPage TabAusrichtungAbsatz
93 Kontext "TabAusrichtungAbsatz"
96 if TextrasterFangen.IsChecked = TRUE Or TextrasterFangen.IsChecked <> TRUE then
97 warnlog "Something wrong in checkbox 'snap to text grid'"
102 TabAusrichtungAbsatz.Cancel
108 '-------------------------------------------------------------------------
110 testcase tWriterUIChangesTest2
111 '/// Check if tabpage "Asian Typography" appear or not -- Format/Paragraph
114 '/// turn on "Asian Language support" , check if tabpage "Asian Typography" appears
115 Call CheckAsianLanguageSupport("On")
121 Active.SetPage TabAsianTypography
122 Kontext "TabAsianTypography"
123 TabAsianTypography.Cancel
125 Active.SetPage TabAusrichtungAbsatz
126 Kontext "TabAusrichtungAbsatz"
127 TabAusrichtungAbsatz.Cancel
128 warnlog "Something wring in tabpage - Asian Typography!"
131 '/// turn off "Asian Language support" , check if tabpage "Asian Typography" disappear
132 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
133 Call CheckAsianLanguageSupport("Off")
139 Active.SetPage TabAsianTypography
140 Kontext "TabAsianTypography"
141 TabAsianTypography.Cancel
142 warnlog "tabpage - Asian Typography should NOT appear!"
144 Active.SetPage TabAusrichtungAbsatz
145 Kontext "TabAusrichtungAbsatz"
146 TabAusrichtungAbsatz.Cancel
153 '-------------------------------------------------------------------------
155 testcase tWriterUIChangesTest3
156 '/// Check if list box "Asian text font" appear or not -- Format/Character
159 '/// turn on "Asian Language support" , Check if list box "Asian text font" appear
160 Call CheckAsianLanguageSupport("On")
165 active.SetPage TabFont
170 warnlog "Something wrong in list box Asian text font when Asian Language support is on"
174 '/// turn off "Asian Language support" , Check if list box "Asian text font" disappear
175 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
176 Call CheckAsianLanguageSupport("Off")
181 active.SetPage TabFont
185 warnlog "Something wrong in list box Asian text font when Asian Language support is off"
194 '-------------------------------------------------------------------------
196 testcase tWriterUIChangesTest4
197 '/// Check if list box "Emphasis mark" appear or not -- Format/Character
200 '/// turn on "Asian Language support" , Check if list box "Emphasis mark" appear
201 Call CheckAsianLanguageSupport("On")
206 active.SetPage TabFontEffects
207 kontext "TabFontEffects"
211 warnlog "Something wrong in list box Emphasis mark when Asian Language support is on"
213 TabFontEffects.Cancel
215 '/// turn off "Asian Language support" , Check if list box "Emphasis mark" disappear
216 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
217 Call CheckAsianLanguageSupport("Off")
222 active.SetPage TabFontEffects
223 kontext "TabFontEffects"
226 warnlog "Something wrong in list box Emphasis mark when Asian Language support is off"
229 TabFontEffects.Cancel
235 '-------------------------------------------------------------------------
237 testcase tWriterUIChangesTest5
238 '/// Check if tabpage "Searching in Japanese" appear or not -- tools/options/language settings/
241 '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" appear
242 Call CheckAsianLanguageSupport("On")
245 if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE") <> TRUE then
246 warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is on"
249 Kontext "ExtrasOptionenDlg"
250 ExtrasOptionenDlg.Cancel
252 '/// turn on "Asian Language support" , Check if tabpage "Searching in Japanese" disappear
253 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
254 Call CheckAsianLanguageSupport("Off")
257 if hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE" , TRUE) = FALSE then
258 printLog Chr(13) + "Yes, 'Searching Japanese'-page has been disabled after switching Asian Language Support 'off'."
260 warnlog "Something wrong in tabpage Searching in Japanese when Asian Language support is off"
263 Kontext "ExtrasOptionenDlg"
264 ExtrasOptionenDlg.Cancel
270 '-------------------------------------------------------------------------
272 testcase tWriterUIChangesTest6
273 '/// Check if tabpage "Asian Layout" appear or not -- tools/options/language settings/
276 '/// turn on "Asian Language support" , Check if tabpage "Asian Layout" appear
277 Call CheckAsianLanguageSupport("On")
280 if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT") <> TRUE then
281 warnlog "Something wrong in tabpage Asian Layout when Asian Language support is on"
284 Kontext "ExtrasOptionenDlg"
285 ExtrasOptionenDlg.Cancel
287 '/// turn off "Asian Language support" , Check if tabpage "Asian Layout" disappear
288 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
289 Call CheckAsianLanguageSupport("Off")
292 if hToolsOptions("LANGUAGESETTINGS","ASIANLAYOUT", TRUE) = FALSE then
293 printLog Chr(13) + "Yes, 'Asian Layout'-page has been disabled after switching 'Asian Language Support' off."
295 warnlog "Something wrong in tabpage Asian Layout when Asian Language support is off"
298 Kontext "ExtrasOptionenDlg"
299 ExtrasOptionenDlg.Cancel
305 '-------------------------------------------------------------------------
307 testcase tWriterUIChangesTest7
308 '/// Check if menu format/Ruby is active or not
311 '/// turn on "Asian Language support" , Check if menu format/Ruby is actived
312 Call CheckAsianLanguageSupport("On")
320 warnlog "Something wrong in menu format/Ruby when Asian Language support is on"
323 '/// turn off "Asian Language support" , Check if menu format/Ruby is inactived
324 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
325 Call CheckAsianLanguageSupport("Off")
332 QAErrorlog "#i40913# Something wrong in menu format/Ruby when Asian Language support is off"
340 '-------------------------------------------------------------------------
342 testcase tWriterUIChangesTest8
343 '/// Check if the following submenus in format/change case is active or not
351 '/// turn on "Asian Language support" , Check if submenus in format/change case is actived
352 Call CheckAsianLanguageSupport("On")
355 FormatChangeCaseHalfWidth
357 warnlog "Something wrong in submenu format/change case -> Half width when Asian Language support is on"
361 FormatChangeCaseFullWidth
363 warnlog "Something wrong in submenu format/change case -> Full width when Asian Language support is on"
367 FormatChangeCaseHiragana
369 warnlog "Something wrong in submenu format/change case -> Hiragana when Asian Language support is on"
373 FormatChangeCaseKatagana
375 warnlog "Something wrong in submenu format/change case -> Katagana when Asian Language support is on"
378 '/// turn off "Asian Language support" , Check if submenus in format/change case is inactived
379 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
380 Call CheckAsianLanguageSupport("Off")
383 FormatChangeCaseHalfWidth
384 QAErrorlog "#i43434# Something wrong in submenu format/change case -> Half width when Asian Language support is off"
389 FormatChangeCaseFullWidth
390 QAErrorlog "#i43434# Something wrong in submenu format/change case -> Full width when Asian Language support is off"
395 FormatChangeCaseHiragana
396 QAErrorlog "#i43434# Something wrong in submenu format/change case -> Hiragana when Asian Language support is off"
401 FormatChangeCaseKatagana
402 QAErrorlog "#i43434# Something wrong in submenu format/change case -> Katagana when Asian Language support is off"
410 '-------------------------------------------------------------------------
412 testcase tWriterUIChangesTest9
413 '/// Check if list box text direction appear or not
416 '/// turn on "Asian Language support" , Check if list box text direction appear
417 Call CheckAsianLanguageSupport("On")
421 Active.SetPage TabSeite
427 warnlog "Something wrong in list box text direction when Asian Language support is on"
431 '/// turn off "Asian Language support" , Check if list box text direction disappear
432 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
433 Call CheckAsianLanguageSupport("Off")
437 Active.SetPage TabSeite
442 warnlog "Something wrong in list box text direction when Asian Language support is off"
451 '-------------------------------------------------------------------------
453 testcase tWriterUIChangesTest10
455 '/// Check if vertical text box and callout appear or not
458 '/// turn on "Asian Language support" , Check if vertical text box and callout appear
459 Call CheckAsianLanguageSupport("On")
462 Call hToolbarSelect("DRAWING", true)
466 warnlog "Something wrong in vertical text box when Asian Language support is on"
469 VerticalCallout.Click
471 warnlog "Something wrong in vertical text callout when Asian Language support is on"
474 '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
475 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
476 Call CheckAsianLanguageSupport("Off")
480 warnlog "Something wrong in vertical text box when Asian Language support is off"
484 VerticalCallout.Click
485 warnlog "Something wrong in vertical text callout when Asian Language support is off"
494 '-------------------------------------------------------------------------
496 testcase tWriterUIChangesTest11
498 Dim iHopeNumber1 , iHopeNumber2 as Integer
500 dim iCount as integer
505 '/// Check if the number in listbox numbering is right or not.
506 '/// [if the number of the listbox numbering is changed, this case should be modified according]
510 '/// turn on "Asian Language support" , Check if the number in listbox numbering is right
511 Call CheckAsianLanguageSupport("On")
513 FormatNumberingBullets
515 Active.SetPage TabOptionenNumerierung
516 Kontext "TabOptionenNumerierung"
518 iCount = Numerierung.GetItemCount
519 if iCount = iHopeNumber1 then
520 Numerierung.Select 15
521 TabOptionenNumerierung.OK
523 printLog Chr(13) + "Pls. go to the printer to find if you can get a paper"
524 printLog Chr(13) + "which is printed like '-'.Otherwise , something wrong!"
525 '/// --Pls. go to the printer to find if you can get a paper which is printed like '-'. Otherwise , something is wrong!
529 if Active.Exists then
530 if Active.GetRT = 304 then
532 QAErrorLog "No Default-Printer!"
545 printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
548 TabOptionenNumerierung.Cancel
549 warnlog "the number of list box numbering is wrong when Asian Language support is on; expected: " + iHopeNumber1 + "; is: " + iCount
552 'print warning if no printer is available
554 if active.exists(5) then
555 qaErrorlog "print warning: '" + active.getText + "'"
559 '/// turn off "Asian Language support" , Check if the number in listbox numbering is right
560 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
561 Call CheckAsianLanguageSupport("Off")
563 FormatNumberingBullets
565 Active.SetPage TabOptionenNumerierung
566 Kontext "TabOptionenNumerierung"
568 iCount = Numerierung.GetItemCount
569 if iCount <> iHopeNumber2 then
571 printlog "("+i+"/"+iCount+"): "+Numerierung.getItemText(i)
574 warnlog "the number of list box numbering is wrong when Asian Language support is off; expected: " + iHopeNumber2 + "; is: " + iCount
576 TabOptionenNumerierung.Cancel
582 '-------------------------------------------------------------------------
584 testcase tProlongedVowelsTest1
585 '/// Check if the default setting of "Prolonged vowels (ka-/kaa) will be ACTIVATED.
589 '/// turn on "Asian Language support" , Check if the default setting of "Prolonged vowels (ka-/kaa) is ACTIVATED.
590 Call CheckAsianLanguageSupport("On")
593 Call hToolsOptions("LANGUAGESETTINGS","SEARCHINGINJAPANESE")
595 if ProlongedSoundmarks.IsChecked <> TRUE then
596 warnlog "The default setting of 'Prolonged vowels (ka-/kaa)' isn't ACTIVATED."
599 Kontext "ExtrasOptionenDlg"
600 ExtrasOptionenDlg.Cancel
606 '-------------------------------------------------------------------------
608 testcase tCalcUIChangesTest_10
610 '/// Check if vertical text box and callout appear or not
614 '/// turn on "Asian Language support" , Check if vertical text box and callout appear
615 Call CheckAsianLanguageSupport("On")
617 Call hToolbarSelect("DRAWING", true)
621 warnlog "Something wrong in vertical text box when Asian Language support is on"
624 VerticalCallout.Click
626 warnlog "Something wrong in vertical text callout when Asian Language support is on"
629 '/// turn off "Asian Language support" , Check if vertical text box and callout disappear
630 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
631 Call CheckAsianLanguageSupport("Off")
635 warnlog "Something wrong in vertical text box when Asian Language support is off"
639 VerticalCallout.Click
640 warnlog "Something wrong in vertical text callout when Asian Language support is off"
649 '-------------------------------------------------------------------------
651 testcase tImpressUIChangesTest_10
653 '/// Check if vertical text box and callout and fit vertical text to frame appear or not
656 '/// turn on "Asian Language support" , Check if vertical text box appear
657 Call CheckAsianLanguageSupport("On")
664 warnlog "Something wrong in vertical text box when Asian Language support is on"
667 '/// turn off "Asian Language support" , Check if vertical text box disappear
668 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
669 Call CheckAsianLanguageSupport("Off")
674 warnlog "Something wrong in vertical text box when Asian Language support is off"
683 '-------------------------------------------------------------------------
685 testcase tDrawUIChangesTest_10
687 '/// Check if vertical text box and callout and fit vertical text to frame appear or not
690 '/// turn on "Asian Language support" , Check if vertical text box appear
691 Call CheckAsianLanguageSupport("On")
697 warnlog "Something wrong in vertical text box when Asian Language support is on"
700 '/// turn off "Asian Language support" , Check if vertical text box disappear
701 if iSystemSprache <> 81 AND iSystemSprache <> 82 AND iSystemSprache <> 86 AND iSystemSprache <> 88 then
702 Call CheckAsianLanguageSupport("Off")
706 warnlog "Something wrong in vertical text box when Asian Language support is off"
715 '-------------------------------------------------------------------------