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 2000, 2010 Oracle and/or its affiliates.
7 ' OpenOffice.org - a multi-platform office productivity suite
9 ' This file is part of OpenOffice.org.
11 ' OpenOffice.org is free software: you can redistribute it and/or modify
12 ' it under the terms of the GNU Lesser General Public License version 3
13 ' only, as published by the Free Software Foundation.
15 ' OpenOffice.org is distributed in the hope that it will be useful,
16 ' but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ' GNU Lesser General Public License version 3 for more details
19 ' (a copy is included in the LICENSE file that accompanied this code).
21 ' You should have received a copy of the GNU Lesser General Public License
22 ' version 3 along with OpenOffice.org. If not, see
23 ' <http://www.openoffice.org/license.html>
24 ' for a copy of the LGPLv3 License.
26 '/************************************************************************
28 '* owner : thorsten.bosbach@oracle.com
30 '* short description : functionality test for language/settings
32 '\*****************************************************************
34 testcase func_LanguageSettings_Language
38 hToolsOptions ( "LanguageSettings", "Languages" )
39 bSave = Aktivieren.IsChecked
40 Printlog "asian support = TRUE"
41 if Aktivieren.isEnabled then
44 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
45 printlog Aktivieren.isEnabled
48 Kontext "ExtrasOptionenDlg"
52 hTestAsianForWriter ( TRUE )
53 hTestAsianForCalc ( TRUE )
54 hTestAsianForImpress ( TRUE )
55 hTestAsianForDraw ( TRUE )
58 hToolsOptions ( "LanguageSettings", "Languages" )
59 Printlog Chr(13) + "asian support = FALSE"
62 Kontext "ExtrasOptionenDlg"
66 hTestAsianForWriter ( FALSE )
67 hTestAsianForCalc ( FALSE )
68 hTestAsianForImpress ( FALSE )
69 hTestAsianForDraw ( FALSE )
72 hToolsOptions ( "LanguageSettings", "Languages" )
73 Printlog Chr(13) + "asian support = TRUE"
74 if Aktivieren.isEnabled then
77 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
78 printlog Aktivieren.isEnabled
81 Kontext "ExtrasOptionenDlg"
85 hTestAsianForWriter ( TRUE )
86 hTestAsianForCalc ( TRUE )
87 hTestAsianForImpress ( TRUE )
88 hTestAsianForDraw ( TRUE )
91 hToolsOptions ( "LanguageSettings", "Languages" )
92 if bSave = TRUE then Aktivieren.Check else Aktivieren.UnCheck
93 Kontext "ExtrasOptionenDlg"
98 ' *********************************************
101 sub hTestAsianForWriter ( bAsianTrue as Boolean )
102 Dim iTabCounter as Integer
104 gApplication = "WRITER"
106 Printlog "- test in writer"
110 if bAsianTrue = TRUE then
112 iTabCounter = active.GetPageCount
113 if iTabCounter <> 6 then Warnlog "There are not 6 pages on the dialog, there are " + iTabCounter + "!"
116 iTabCounter = active.GetPageCount
117 if iTabCounter <> 5 then Warnlog "There are not 5 pages on the dialog, there are " + iTabCounter + "!"
120 printlog " - check tab-dialog for FormatCharacter"
122 active.SetPage TabFont
124 if bAsianTrue = TRUE then
125 if FontWest.Exists then
126 if FontWest.IsVisible = FALSE then Warnlog "'Western Font' is not visible!"
128 Warnlog "'Western Font' does not exists!"
130 if StyleWest.Exists then
131 if StyleWest.IsVisible = FALSE then Warnlog "'Western Style' is not visible!"
133 Warnlog "'Western Style' does not exists!"
135 if SizeWest.Exists then
136 if SizeWest.IsVisible = FALSE then Warnlog "'Western Size' is not visible!"
138 Warnlog "'Western Size' does not exists!"
140 if LanguageWest.Exists then
141 if LanguageWest.IsVisible = FALSE then Warnlog "'Western Language' is not visible!"
143 Warnlog "'Western Language' does not exists=> Bug!"
145 if FontEast.Exists then
146 if FontEast.IsVisible = FALSE then Warnlog "'Eastern Font' is not visible!"
148 Warnlog "'Eastern Font' does not exists!"
150 if StyleEast.Exists then
151 if StyleEast.IsVisible = FALSE then Warnlog "'Eastern Style' is not visible!"
153 Warnlog "'Eastern Style' does not exists!"
155 if SizeEast.Exists then
156 if SizeEast.IsVisible = FALSE then Warnlog "'Eastern Size' is not visible!"
158 Warnlog "'Eastern Size' does not exists!"
160 if LanguageEast.Exists then
161 if LanguageEast.IsVisible = FALSE then Warnlog "'Eastern Language' is not visible!"
163 Warnlog "'Eastern Language' does not exists!"
166 if FontEast.Exists then
167 if FontEast.IsVisible then Warnlog "'Eastern Font' is visible!"
169 if StyleEast.Exists then
170 if StyleEast.IsVisible then Warnlog "'Eastern Style' is visible!"
172 if SizeEast.Exists then
173 if SizeEast.IsVisible then Warnlog "'Eastern Size' is visible!"
175 if LanguageEast.Exists then
176 if LanguageEast.IsVisible then Warnlog "'Eastern Language' is visible!"
178 if FontWest.Exists then
179 if FontWest.IsVisible then Warnlog "'Eastern Font' is visible!"
181 if StyleWest.Exists then
182 if StyleWest.IsVisible then Warnlog "'Eastern Style' is visible!"
184 if SizeWest.Exists then
185 if SizeWest.IsVisible then Warnlog "'Eastern Size' is visible!"
187 if LanguageWest.Exists then
188 if LanguageWest.IsVisible then Warnlog "'Eastern Language' is visible!"
193 active.SetPage TabFontEffects
194 Kontext "TabFontEffects"
195 if bAsianTrue = TRUE then
196 if Emphasis.Exists then
197 if Emphasis.IsVisible = FALSE then
198 Warnlog "'Emphasis mark' is not visible!"
203 Warnlog "'Emphasis mark' does not exists!"
205 if Position.Exists then
206 if Position.IsVisible = FALSE then Warnlog "'Position' is not visible!"
208 Warnlog "'Position' does not exists!"
211 if Emphasis.Exists then
212 if Emphasis.IsVisible then Warnlog "'Emphasis mark' is visible!"
214 if Position.Exists then
215 if Position.IsVisible then Warnlog "'Position' is visible!"
220 Active.SetPage TabFontPosition
222 if bAsianTrue = TRUE then
225 Active.SetPage TabAsianLayout
227 Warnlog "The tabpage 'Asian Layout' does not exists!"
232 Active.SetPage TabAsianLayout
233 Warnlog "The tabpage 'Asian Layout' exists!"
239 active.SetPage TabHyperlinkZeichen
242 active.SetPage TabHintergrund
243 kontext "TabHintergrund"
246 printlog " - check ruby-dialog"
247 if bAsianTrue = TRUE then
253 Warnlog "Ruby-Dialog can't be opened!"
260 Warnlog "Ruby-Dialog can be opened!"
265 printlog " - check menu items for format/change case"
266 if bAsianTrue = TRUE then
268 FormatChangeCaseHalfWidth
271 Warnlog "Format/Case/Half width is not active!"
275 FormatChangeCaseFullWidth
278 Warnlog "Format/Case/Full width is not active!"
282 FormatChangeCaseHiragana
285 Warnlog "Format/Case/Hiragana is not active!"
289 FormatChangeCaseKatagana
292 Warnlog "Format/Case/Katagana is not active!"
296 FormatChangeCaseHalfWidth
298 Warnlog "Format/Case/Half width is active!"
303 FormatChangeCaseFullWidth
305 Warnlog "Format/Case/Full width is active!"
310 FormatChangeCaseHiragana
312 Warnlog "Format/Case/Hiragana is active!"
317 FormatChangeCaseKatagana
319 Warnlog "Format/Case/Katagana is active!"
324 printlog " - check find&replace-dialog"
326 Kontext "SuchenUndErsetzenWriter"
327 if bAsianTrue = TRUE then
328 if HalbNormalbreiteFormen.Exists then
329 if HalbNormalbreiteFormen.IsVisible = FALSE then Warnlog "'Match half-/full-width forms' is not visible!"
331 Warnlog "'Match half-/full-width forms' does not exists!"
333 if AehnlicheSchreibweise.Exists then
334 if AehnlicheSchreibweise.IsVisible = FALSE then
335 Warnlog "'Sounds like (Japanese)' is not visible!"
337 AehnlicheSchreibweise.Check
340 Warnlog "'Sounds like (Japanese)' does not exists!"
342 if AehnlicheSchreibweiseOptionen.Exists then
343 if AehnlicheSchreibweiseOptionen.IsVisible = FALSE then Warnlog "'Options for 'Sounds like' is not visible!"
345 Warnlog "'Options for 'Sounds like' does not exists!"
348 if HalbNormalbreiteFormen.Exists then
349 if HalbNormalbreiteFormen.IsVisible then Warnlog "'Match half-/full-width forms' is visible!"
351 if AehnlicheSchreibweise.Exists then
352 if AehnlicheSchreibweise.IsVisible then Warnlog "'Sounds like (Japanese)' is visible!"
354 if AehnlicheSchreibweiseOptionen.Exists then
355 if AehnlicheSchreibweiseOptionen.IsVisible then Warnlog "'Options for 'Sounds like' is visible!"
358 SuchenUndErsetzenWriter.Close
364 ' *********************************************
367 sub hTestAsianForCalc ( bAsianTrue as Boolean )
368 Dim iTabCounter as Integer
370 Printlog "- test in calc"
371 gApplication = "CALC"
376 if bAsianTrue = TRUE then
378 iTabCounter = active.GetPageCount
379 if iTabCounter <> 8 then Warnlog "There are not 8 pages on the dialog, there are " + iTabCounter + "!"
382 iTabCounter = active.GetPageCount
383 if iTabCounter <> 7 then Warnlog "There are not 7 pages on the dialog, there are " + iTabCounter + "!"
386 printlog " - check tab-dialog for Format/Cell"
388 active.SetPage TabZahlen
391 active.SetPage TabFont
393 if bAsianTrue = TRUE then
394 if FontWest.Exists then
395 if FontWest.IsVisible = FALSE then Warnlog "'Western Font' is not visible!"
397 Warnlog "'Western Font' does not exists!"
399 if StyleWest.Exists then
400 if StyleWest.IsVisible = FALSE then Warnlog "'Western Style' is not visible!"
402 Warnlog "'Western Style' does not exists!"
404 if SizeWest.Exists then
405 if SizeWest.IsVisible = FALSE then Warnlog "'Western Size' is not visible!"
407 Warnlog "'Western Size' does not exists!"
409 if LanguageWest.Exists then
410 if LanguageWest.IsVisible = FALSE then Warnlog "'Western Language' is not visible!"
412 Warnlog "'Western Language' does not exists=> Bug!"
414 if FontEast.Exists then
415 if FontEast.IsVisible = FALSE then Warnlog "'Eastern Font' is not visible!"
417 Warnlog "'Eastern Font' does not exists!"
419 if StyleEast.Exists then
420 if StyleEast.IsVisible = FALSE then Warnlog "'Eastern Style' is not visible!"
422 Warnlog "'Eastern Style' does not exists!"
424 if SizeEast.Exists then
425 if SizeEast.IsVisible = FALSE then Warnlog "'Eastern Size' is not visible!"
427 Warnlog "'Eastern Size' does not exists!"
429 if LanguageEast.Exists then
430 if LanguageEast.IsVisible = FALSE then Warnlog "'Eastern Language' is not visible!"
432 Warnlog "'Eastern Language' does not exists!"
435 if FontEast.Exists then
436 if FontEast.IsVisible then Warnlog "'Eastern Font' is visible!"
438 if StyleEast.Exists then
439 if StyleEast.IsVisible then Warnlog "'Eastern Style' is visible!"
441 if SizeEast.Exists then
442 if SizeEast.IsVisible then Warnlog "'Eastern Size' is visible!"
444 if LanguageEast.Exists then
445 if LanguageEast.IsVisible then Warnlog "'Eastern Language' is visible!"
447 if FontWest.Exists then
448 if FontWest.IsVisible then Warnlog "'Eastern Font' is visible!"
450 if StyleWest.Exists then
451 if StyleWest.IsVisible then Warnlog "'Eastern Style' is visible!"
453 if SizeWest.Exists then
454 if SizeWest.IsVisible then Warnlog "'Eastern Size' is visible!"
456 if LanguageWest.Exists then
457 if LanguageWest.IsVisible then Warnlog "'Eastern Language' is visible!"
462 active.SetPage TabFontEffects
463 Kontext "TabFontEffects"
464 if bAsianTrue = TRUE then
465 if Emphasis.Exists then
466 if Emphasis.IsVisible = FALSE then
467 Warnlog "'Emphasis mark' is not visible!"
472 Warnlog "'Emphasis mark' does not exists!"
474 if Position.Exists then
475 if Position.IsVisible = FALSE then Warnlog "'Position' is not visible!"
477 Warnlog "'Position' does not exists!"
480 if Emphasis.Exists then
481 if Emphasis.IsVisible then Warnlog "'Emphasis mark' is visible!"
483 if Position.Exists then
484 if Position.IsVisible then Warnlog "'Position' is visible!"
488 if bAsianTrue = TRUE then
491 Active.SetPage TabAsianTypography
493 Warnlog "The tabpage 'Asian Typography' does not exists!"
498 Active.SetPage TabAsianTypography
499 Warnlog "The tabpage 'Asian Typography' exists!"
505 active.SetPage TabAusrichtung
508 active.SetPage TabUmrandung
511 active.SetPage TabHintergrund
514 active.SetPage TabZellschutz
515 Kontext "TabZellschutz"
518 printlog " - check find&replace-dialog"
520 Kontext "SuchenUndErsetzenCalc"
521 if bAsianTrue = TRUE then
522 if HalbNormalbreiteFormen.Exists then
523 if HalbNormalbreiteFormen.IsVisible = FALSE then Warnlog "'Match half-/full-width forms' is not visible!"
525 Warnlog "'Match half-/full-width forms' does not exists!"
527 if AehnlicheSchreibweise.Exists then
528 if AehnlicheSchreibweise.IsVisible = FALSE then
529 Warnlog "'Sounds like (Japanese)' is not visible!"
531 AehnlicheSchreibweise.Check
534 Warnlog "'Sounds like (Japanese)' does not exists!"
536 if AehnlicheSchreibweiseOptionen.Exists then
537 if AehnlicheSchreibweiseOptionen.IsVisible = FALSE then Warnlog "'Options for 'Sounds like' is not visible!"
539 Warnlog "'Options for 'Sounds like' does not exists!"
542 if HalbNormalbreiteFormen.Exists then
543 if HalbNormalbreiteFormen.IsVisible then Warnlog "'Match half-/full-width forms' is visible!"
545 if AehnlicheSchreibweise.Exists then
546 if AehnlicheSchreibweise.IsVisible then Warnlog "'Sounds like (Japanese)' is visible!"
548 if AehnlicheSchreibweiseOptionen.Exists then
549 if AehnlicheSchreibweiseOptionen.IsVisible then Warnlog "'Options for 'Sounds like' is visible!"
552 SuchenUndErsetzenCalc.Close
558 ' *********************************************
561 sub hTestAsianForImpress ( bAsianTrue as Boolean )
562 Dim iTabCounter as Integer
564 Printlog "- test in impress"
565 gApplication = "IMPRESS"
568 printlog " - check 'asian typography' at Format/Paragraph"
571 active.SetPage TabEinzuegeUndAbstaende
573 if bAsianTrue = TRUE then
576 Active.SetPage TabAsianTypography
578 Warnlog "The tabpage 'Asian Typography' does not exists!"
583 Active.SetPage TabAsianTypography
584 Warnlog "The tabpage 'Asian Typography' exists!"
590 active.SetPage TabAusrichtungAbsatz
593 active.SetPage TabTabulator
594 kontext "TabTabulator"
600 ' *********************************************
603 sub hTestAsianForDraw ( bAsianTrue as Boolean )
604 Dim iTabCounter as Integer
606 Printlog "- test in draw"
607 gApplication = "DRAW"
610 printlog " - check 'asian typography' at Format/Paragraph"
613 active.SetPage TabEinzuegeUndAbstaende
615 if bAsianTrue = TRUE then
618 Active.SetPage TabAsianTypography
620 Warnlog "The tabpage 'Asian Typography' does not exists!"
625 Active.SetPage TabAsianTypography
626 Warnlog "The tabpage 'Asian Typography' exists!"
632 active.SetPage TabAusrichtungAbsatz
635 active.SetPage TabTabulator
636 kontext "TabTabulator"