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: options_lan1.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:18:15 $
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 : thorsten.bosbach@sun.com
36 '* short description : general option test (test for language-group)
38 '\******************************************************************************
43 bOld = ActiveDeactivateAsianSupport ( FALSE )
45 Call tLanguageSettingsLanguages
46 Call tLanguageSettingsWritingAids
48 printlog "++ activate the asian support in StarOffice ++"
49 ActiveDeactivateAsianSupport ( TRUE )
50 Call tLanguageSettingsJapaneseFind
51 Call tLanguageSettingsAsianLayout
53 printlog "++ reset asian support in StarOffice to default ++"
55 ActiveDeactivateAsianSupport ( TRUE )
57 ActiveDeactivateAsianSupport ( FALSE )
62 '*******************************************************************************
64 testcase tLanguageSettingsLanguages
66 Dim lsSave ( 5 ) as String, lsSave2 (3) as String
67 Dim bChanged as Boolean, bSave as Boolean, bSave2 as Boolean
71 '///check if all settings are saved in configuration ( Language Settings / Languages )
73 '///open a new document
74 '///+open options 'Language settings' / 'languages'
78 hToolsOptions ( "LanguageSettings", "Languages" )
80 '///+check dependences in this dialog
81 '///+- asian support <-> listbox for default language for asian
82 printlog "- check dependences in this dialog"
83 printlog " - asian support"
84 if Aktivieren.IsChecked() = FALSE then
85 if Asiatisch.IsEnabled() = TRUE then
86 Warnlog "Asian support is not active, the listbox is in wrong state:"
87 printlog "...the language for asian is active => Perhaps #108220#"
89 if Aktivieren.isEnabled then
92 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
93 printlog Aktivieren.isEnabled
95 if Asiatisch.IsEnabled() <> TRUE then
96 Warnlog "Asian support is active, the listbox is in wrong state:"
97 printlog "...language for asian is not active => BUG!"
99 if Aktivieren.isEnabled then
102 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
103 printlog Aktivieren.isEnabled
106 if Asiatisch.IsEnabled() <> TRUE then
107 Warnlog "Asian support is not active, the listbox is in wrong state:"
108 printlog "...language for asian is not active => BUG!"
110 if Aktivieren.isEnabled then
113 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
114 printlog Aktivieren.isEnabled
116 if Asiatisch.IsEnabled() = TRUE then
117 Warnlog "Asian support is active, the listbox is in wrong state:"
118 printlog "...language for asian is active => BUG!"
120 if Aktivieren.isEnabled then
123 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
124 printlog Aktivieren.isEnabled
128 '///+- CTL support <-> listbox for default language for CTL
129 printlog " - CTL support"
130 if ComplexScriptEnabled.IsChecked() = FALSE then
131 if LanguageComplexScript.IsEnabled() = TRUE then
132 Warnlog "CTL support is not active, the listbox is in wrong state:"
133 printlog "...language for CTL is active => BUG!"
135 ComplexScriptEnabled.Check()
136 if LanguageComplexScript.IsEnabled() <> TRUE then
137 Warnlog "CTL support is active, the listbox is in wrong state:"
138 printlog "...language for CTL is not active => BUG!"
140 ComplexScriptEnabled.UnCheck()
142 if LanguageComplexScript.IsEnabled() <> TRUE then
143 Warnlog "CTL support is active, the listbox is in wrong state:"
144 printlog "...language for CTL is not active => BUG!"
146 ComplexScriptEnabled.UnCheck()
147 if LanguageComplexScript.IsEnabled() = TRUE then
148 Warnlog "CTL support is not active, the listbox is in wrong state:"
149 printlog "...the language for CTL is active => BUG!"
151 ComplexScriptEnabled.Check()
155 printlog "- save raw data"
156 lsSave (1) = Gebietsschema.GetSelText()
157 lsSave (2) = StandardWaehrung.GetSelText()
158 lsSave (3) = Westlich.GetSelText()
159 bSave = Aktivieren.IsChecked()
160 if Aktivieren.isEnabled then
163 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
164 printlog Aktivieren.isEnabled
166 lsSave (4) = Asiatisch.GetSelText()
168 if lsSave (4) = "" then
169 Warnlog "Empty entry is selected for 'Asian'! => Bug 102046"
172 bSave2 = ComplexScriptEnabled.IsChecked()
173 ComplexScriptEnabled.Check()
174 lsSave (5) = LanguageComplexScript.GetSelText()
176 if lsSave (5) = "" then
177 Warnlog "Empty entry is selected for 'Complex script'! => Bug 102046"
180 '///+change all settings
181 printlog "- change settings"
183 case 34 : Gebietsschema.Select( 40 )
184 case 39 : Gebietsschema.Select( 17 )
185 case 81 : Gebietsschema.Select( 22 )
186 case 88 : Gebietsschema.Select( 19 )
187 case else : Gebietsschema.Select( 15 )
189 StandardWaehrung.Select( 20 )
190 Westlich.Select( 10 )
191 lsSave2(1) = Westlich.GetSelText()
193 if Aktivieren.isEnabled then
196 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
197 printlog Aktivieren.isEnabled
199 Asiatisch.Select( 5 )
200 lsSave2(2) = Asiatisch.GetSelText()
201 AktuellesDokument.Uncheck()
203 ComplexScriptEnabled.Check
204 LanguageComplexScript.Select( 7 )
205 lsSave2 (3) = LanguageComplexScript.GetSelText()
207 '///+close options dialog with OK, close all documents
208 Kontext "ExtrasOptionenDlg"
209 ExtrasOptionenDlg.OK()
214 '///+wait until StarOffice is out of memory and restart it
215 printlog "- exit/restart StarOffice"
218 '///+open options 'Language settings' / 'languages'
219 '///+check all changes
220 printlog "- check changes"
222 hToolsOptions ( "LanguageSettings", "Languages" )
225 case 34 : if Gebietsschema.GetSelIndex <> 40 then
226 Warnlog "locale settings => changes not saved!"
228 case 39 : if Gebietsschema.GetSelIndex <> 17 then
229 Warnlog "locale settings => changes not saved!"
231 case 81 : if Gebietsschema.GetSelIndex <> 22 then
232 Warnlog "locale settings => changes not saved!"
234 case 88 : if Gebietsschema.GetSelIndex <> 19 then
235 Warnlog "locale settings => changes not saved!"
237 case else : if Gebietsschema.GetSelIndex <> 15 then
238 Warnlog "locale settings => changes not saved!"
242 if StandardWaehrung.GetSelIndex <> 20 then
243 Warnlog "default currency => changes not saved!"
246 if Westlich.GetSelText <> lsSave2(1) then
247 Warnlog "western => changes not saved! "
250 if Aktivieren.IsChecked <> TRUE then
251 Warnlog "Enabled asian support => changes not saved!"
254 if Asiatisch.GetSelText <> lsSave2(2) then
255 Warnlog "asian => changes not saved! "
258 if ComplexScriptEnabled.IsChecked <> TRUE then
259 Warnlog "CTL support => changes not saved!"
262 if LanguageComplexScript.GetSelText <> lsSave2 (3) then
263 Warnlog "CTL language => changes not saved! "
266 '///+set all to default and close options dialog with OK
267 printlog "- set to default"
268 Gebietsschema.Select lsSave(1)
269 StandardWaehrung.Select lsSave (2)
270 Westlich.Select lsSave (3)
271 AktuellesDokument.Uncheck()
272 if Aktivieren.isEnabled then
275 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
276 printlog Aktivieren.isEnabled
279 if lsSave (4) <> "" then
280 Asiatisch.Select lsSave (4)
285 if Aktivieren.isEnabled then
292 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
293 printlog Aktivieren.isEnabled
295 ComplexScriptEnabled.Check()
297 if lsSave (5) <> "" then
298 LanguageComplexScript.Select( lsSave(5) )
300 LanguageComplexScript.Select( 1 )
303 if bSave2 = TRUE then
304 ComplexScriptEnabled.Check()
306 ComplexScriptEnabled.Uncheck()
309 Kontext "ExtrasOptionenDlg"
310 ExtrasOptionenDlg.OK()
313 '///+open options 'Language settings' / 'languages'
314 '///+check the default settings
315 printlog "- check the data"
317 hToolsOptions ( "LanguageSettings", "Languages" )
319 if Gebietsschema.GetSelText() <> lsSave(1) then
320 Warnlog "locale settings => changes not saved! => BugID : 87977"
323 if StandardWaehrung.GetSelText() <> lsSave(2) then
324 Warnlog "default currency => changes not saved!"
327 if Westlich.GetSelText() <> lsSave (3) then
328 Warnlog "western => changes not saved!"
331 if Aktivieren.IsChecked() <> bSave then
332 Warnlog "Enabled asian support => changes not saved!"
335 if Aktivieren.isEnabled then
338 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
339 printlog Aktivieren.isEnabled
341 if lsSave (4) <> "" then
342 if Asiatisch.GetSelText() <> lsSave (4) then
343 Warnlog "asian => changes not saved!"
347 if ComplexScriptEnabled.IsChecked() <> bSave2 then
348 Warnlog "CTL support => changes not saved!"
351 ComplexScriptEnabled.Check()
353 if lsSave (5) <> "" then
354 if LanguageComplexScript.GetSelText() <> lsSave (5) then
355 Warnlog "CTL language => changes not saved! "
358 if Aktivieren.isEnabled then
365 qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
366 printlog Aktivieren.isEnabled
368 if bSave2 = TRUE then
369 ComplexScriptEnabled.Check()
371 ComplexScriptEnabled.Uncheck()
374 '///+close the options dialog
375 Kontext "ExtrasOptionenDlg"
376 ExtrasOptionenDlg.OK()
381 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
382 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
383 testcase tLanguageSettingsWritingAids
385 Dim lbSave1 ( 5 ) as Boolean
386 Dim lbSave2 ( 5 ) as Boolean
387 Dim lbSave3 ( 15 ) as Boolean
388 dim iCounter as Integer
389 Dim i as Integer, iCounter1 as Integer, iCounter2 as Integer, iCounter3 as Integer
391 '///check if all settings are saved in configuration ( Language Settings / writing aids )
393 '///open a new document
394 '///+open options 'Language settings' / 'writing aids'
398 hToolsOptions ( "LanguageSettings", "WritingAids" )
400 '///+save raw data and inverted all settings
401 printlog " - save raw data / and inverted settings"
402 iCounter1 = Sprachmodule.GetItemCount
403 Sprachmodule.TypeKeys "<PageUp>", 6
406 lbSave1 (i) = Sprachmodule.IsChecked
407 if lbSave1 (i) = TRUE then Sprachmodule.Uncheck else Sprachmodule.Check
408 Sprachmodule.TypeKeys "<Down>"
411 iCounter2 = Benutzerwoerterbuch.GetItemCount
412 Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
414 for i=1 to iCounter2 - 1
415 lbSave2 (i) = Benutzerwoerterbuch.IsChecked
416 if lbSave2 (i) = TRUE then Benutzerwoerterbuch.Uncheck else Benutzerwoerterbuch.Check
417 Benutzerwoerterbuch.TypeKeys "<Down>"
420 '///+- last entry of 'User-defined dictionaries' - internal IgnoreAll-List - cannot be changed
421 if Benutzerwoerterbuch.IsChecked <> TRUE then
422 Warnlog "Last entry in 'User-defined dictionaries' should be checked ( internal Ignore-All List ), but it isn't => BUG?!"
425 iCounter3 = Optionen.GetItemCount
426 Optionen.TypeKeys "<PageUp>", 6
428 if i<>9 AND i<>10 AND i<>11 then
429 lbSave3 (i) = Optionen.IsChecked
430 if lbSave3 (i) = TRUE then Optionen.Uncheck else Optionen.Check
432 Optionen.TypeKeys "<Down>"
435 '///+close options dialog with OK, close all documents and exit StarOffice
436 Kontext "ExtrasOptionenDlg"
441 '///+wait until StarOffice is out of memory and restart it
442 printlog " - exit/restart StarOffice"
445 '///+open options 'Language settings' / 'writing aids'
446 '///+check all changes
447 printlog " - check changes"
452 hToolsOptions ( "LanguageSettings", "WritingAids" )
453 printlog " 'available language modules'"
454 Sprachmodule.TypeKeys "<PageUp>", 6
457 if Sprachmodule.Ischecked = lbSave1 (i) then
458 Warnlog "entry no. " + i + " => changes not saved! perhaps #i15841!"
460 Sprachmodule.TypeKeys "<Down>"
463 printlog " 'user-definded dictonaries'"
464 Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
466 for i=1 to iCounter2 - 1
467 if Benutzerwoerterbuch.Ischecked = lbSave2 (i) then Warnlog "entry no. " + i + " => changes not saved!"
468 Benutzerwoerterbuch.TypeKeys "<Down>"
471 if Benutzerwoerterbuch.IsChecked <> TRUE then
472 Warnlog "Last entry in 'User-defined dictionaries' should be checked ( internal Ignore-All List ), but it isn't => BUG?!"
475 printlog " 'options'"
476 Optionen.TypeKeys "<PageUp>", 6
478 '///+- options list : entry 9, 10 and 11 are depend only at a document => cannot check globally
479 if i<>9 AND i<>10 AND i<>11 then
480 if Optionen.IsChecked = lbSave3 (i) then Warnlog "entry no. " + i + " => changes not saved!"
482 Optionen.TypeKeys "<Down>"
485 '///+make different changes in options list
486 printlog " - make second changes"
487 Optionen.TypeKeys "<PageUp>", 6
490 if i=1 then Optionen.Uncheck
491 if i=3 then Optionen.Check
492 if i=5 then Optionen.Uncheck
493 if i=6 then Optionen.Check
494 if i=7 then Optionen.Uncheck
495 if i=12 then Optionen.Check
496 Optionen.TypeKeys "<Down>"
499 '///+close options dialog with OK
500 Kontext "ExtrasOptionenDlg"
506 '///+open options 'Language settings' / 'writing aids'
507 '///+check second changes
508 printlog " - check second changes"
510 hToolsOptions ( "LanguageSettings", "WritingAids" )
511 Optionen.TypeKeys "<PageUp>", 6
515 case 1 : if Optionen.IsChecked <> FALSE then
516 Warnlog "entry no. 1 => changes not saved!"
518 case 3 : if Optionen.IsChecked <> TRUE then
519 Warnlog "entry no. 3 => changes not saved!"
521 case 5 : if Optionen.IsChecked <> FALSE then
522 Warnlog "entry no. 5 => changes not saved!"
524 case 6 : if Optionen.IsChecked <> TRUE then
525 Warnlog "entry no. 6 => changes not saved!"
527 case 7 : if Optionen.IsChecked <> FALSE then
528 printlog "entry no. 7 => not saved! => it is only for documents"
530 case 12 : if Optionen.IsChecked <> TRUE then
531 Warnlog "entry no. 12 => changes not saved!"
534 Optionen.TypeKeys "<Down>"
537 '///+reset all to default settings
538 printlog " - reset settings"
539 Sprachmodule.TypeKeys "<PageUp>", 6
542 if lbSave1 (i) = TRUE then Sprachmodule.Check else Sprachmodule.UnCheck
543 Sprachmodule.TypeKeys "<Down>"
546 Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
548 for i=1 to iCounter2 - 1
549 if lbSave2 (i) = TRUE then Benutzerwoerterbuch.Check else Benutzerwoerterbuch.UnCheck
550 Benutzerwoerterbuch.TypeKeys "<Down>"
553 Optionen.TypeKeys "<PageUp>", 6
556 if i<>9 AND i<>10 AND i<>11 then
557 if lbSave3 (i) = TRUE then Optionen.Check else Optionen.UnCheck
559 Optionen.TypeKeys "<Down>"
562 '///+close options dialog with OK
563 Kontext "ExtrasOptionenDlg"
567 '///+open options 'Language settings' / 'writing aids'
568 '///+check the changes
569 printlog " - check raw data"
571 hToolsOptions ( "LanguageSettings", "WritingAids" )
573 printlog " 'available language modules'"
574 Sprachmodule.TypeKeys "<PageUp>", 6
577 if Sprachmodule.Ischecked <> lbSave1 (i) then Warnlog "entry no. " + i + " => changes not saved!"
578 Sprachmodule.TypeKeys "<Down>"
581 printlog " 'user-definded dictonaries'"
582 Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
583 for i=1 to iCounter2 - 1
584 if Benutzerwoerterbuch.Ischecked <> lbSave2 (i) then Warnlog "entry no. " + i + " => changes not saved!"
585 Benutzerwoerterbuch.TypeKeys "<Down>"
588 printlog " 'options'"
589 Optionen.TypeKeys "<PageUp>", 6
591 '///+- options list : entry 9, 10 and 11 are depend only at a document => cannot check globally
592 if i<>9 AND i<>10 AND i<>11 then
593 if Optionen.IsChecked <> lbSave3 (i) then Warnlog "entry no. " + i + " => changes not saved!"
595 Optionen.TypeKeys "<Down>"
598 '///+close options dialog
599 Kontext "ExtrasOptionenDlg"
604 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
605 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
606 testcase tLanguageSettingsJapaneseFind
607 Dim bSave ( 20 ) as Boolean
609 '///check if all settings are saved in configuration ( Language Settings / Japanese find ) => asian support must be activated
610 '///open a new document
611 '///+open options 'Language settings' / 'japanese find'
615 hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
617 '///+save raw data and inverted all settings
618 printlog " - save data"
619 bSave (1 ) = MatchCase.IsChecked
620 bSave (2 ) = MatchFullHalf.IsChecked
621 bSave (3 ) = MatchHiraganaKatakana.IsChecked
622 bSave (4 ) = MatchContractions.IsChecked
623 bSave (5 ) = MatchMinusDashChoOn.IsChecked
624 bSave (6 ) = MatchRepeatcharacterMarks.IsChecked
625 bSave (7 ) = MatchVariantFormKanji.IsChecked
626 bSave (8 ) = MatchOldKanaForms.IsChecked
627 bSave (9 ) = MatchDiZiDuZu.IsChecked
628 bSave (10) = MatchBaVaHaFa.IsChecked
629 bSave (11) = MatchTsiThiChiDhiZi.IsChecked
630 bSave (12) = MatchHyuFyuByuVyu.IsChecked
631 bSave (13) = MatchDeSheZeJe.IsChecked
632 bSave (14) = MatchIaIya.IsChecked
633 bSave (15) = MatchKiKu.IsChecked
634 bSave (16) = PunctuationCharacters.IsChecked
635 bSave (17) = WhitespaceCharacters.IsChecked
636 bSave (18) = ProlongedSoundmarks.IsChecked
637 bSave (19) = MiddleDots.IsChecked
639 printlog " - invert data"
640 if bSave (1 ) = TRUE then MatchCase.Uncheck else MatchCase.Check
641 if bSave (2 ) = TRUE then MatchFullHalf.Uncheck else MatchFullHalf.Check
642 if bSave (3 ) = TRUE then MatchHiraganaKatakana.Uncheck else MatchHiraganaKatakana.Check
643 if bSave (4 ) = TRUE then MatchContractions.Uncheck else MatchContractions.Check
644 if bSave (5 ) = TRUE then MatchMinusDashChoOn.Uncheck else MatchMinusDashChoOn.Check
645 if bSave (6 ) = TRUE then MatchRepeatcharacterMarks.Uncheck else MatchRepeatcharacterMarks.Check
646 if bSave (7 ) = TRUE then MatchVariantFormKanji.Uncheck else MatchVariantFormKanji.Check
647 if bSave (8 ) = TRUE then MatchOldKanaForms.Uncheck else MatchOldKanaForms.Check
648 if bSave (9 ) = TRUE then MatchDiZiDuZu.Uncheck else MatchDiZiDuZu.Check
649 if bSave (10) = TRUE then MatchBaVaHaFa.Uncheck else MatchBaVaHaFa.Check
650 if bSave (11) = TRUE then MatchTsiThiChiDhiZi.Uncheck else MatchTsiThiChiDhiZi.Check
651 if bSave (12) = TRUE then MatchHyuFyuByuVyu.Uncheck else MatchHyuFyuByuVyu.Check
652 if bSave (13) = TRUE then MatchDeSheZeJe.Uncheck else MatchDeSheZeJe.Check
653 if bSave (14) = TRUE then MatchIaIya.Uncheck else MatchIaIya.Check
654 if bSave (15) = TRUE then MatchKiKu.Uncheck else MatchKiKu.Check
655 if bSave (16) = TRUE then PunctuationCharacters.Uncheck else PunctuationCharacters.Check
656 if bSave (17) = TRUE then WhitespaceCharacters.Uncheck else WhitespaceCharacters.Check
657 if bSave (18) = TRUE then ProlongedSoundmarks.Uncheck else ProlongedSoundmarks.Check
658 if bSave (19) = TRUE then MiddleDots.Uncheck else MiddleDots.Check
660 '///+close options dialog with OK, close all documents and exit StarOffice
661 Kontext "ExtrasOptionenDlg"
666 '///+wait until StarOffice is out of memory and restart it
667 printlog " - exit/restart StarOffice"
670 '///+open options 'Language settings' / 'japanese find'
671 '///+check all changes
672 printlog " - check changes"
674 hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
676 if MatchCase.IsChecked = bSave (1 ) then Warnlog "Match Case => changes not saved!"
677 if MatchFullHalf.IsChecked = bSave (2 ) then Warnlog "Match Full Half => changes not saved!"
678 if MatchHiraganaKatakana.IsChecked = bSave (3 ) then Warnlog "Match Hiragana Katakana => changes not saved!"
679 if MatchContractions.IsChecked = bSave (4 ) then Warnlog "Match Contractions => changes not saved!"
680 if MatchMinusDashChoOn.IsChecked = bSave (5 ) then Warnlog "Match Minus Dash Cho On => changes not saved!"
681 if MatchRepeatcharacterMarks.IsChecked = bSave (6 ) then Warnlog "Match Repeatcharacter Marks => changes not saved!"
682 if MatchVariantFormKanji.IsChecked = bSave (7 ) then Warnlog "Match Variant Form Kanji => changes not saved!"
683 if MatchOldKanaForms.IsChecked = bSave (8 ) then Warnlog "Match Old Kana Forms => changes not saved!"
684 if MatchDiZiDuZu.IsChecked = bSave (9 ) then Warnlog "Match Di Zi Du Zu => changes not saved!"
685 if MatchBaVaHaFa.IsChecked = bSave (10) then Warnlog "Match Ba Va Ha Fa => changes not saved!"
686 if MatchTsiThiChiDhiZi.IsChecked = bSave (11) then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
687 if MatchHyuFyuByuVyu.IsChecked = bSave (12) then Warnlog "Match Hyu Iyu Byu Vyu => changes not saved!"
688 if MatchDeSheZeJe.IsChecked = bSave (13) then Warnlog "Match De She Ze Je => changes not saved!"
689 if MatchIaIya.IsChecked = bSave (14) then Warnlog "Match Ia Iya => changes not saved!"
690 if MatchKiKu.IsChecked = bSave (15) then Warnlog "Match Ki Ku => changes not saved!"
691 if PunctuationCharacters.IsChecked = bSave (16) then Warnlog "Punctuation Characters => changes not saved!"
692 if WhitespaceCharacters.IsChecked = bSave (17) then Warnlog "Whitespace Characters => changes not saved!"
693 if ProlongedSoundmarks.IsChecked = bSave (18) then Warnlog "Prolonged Soundmarks => changes not saved!"
694 if MiddleDots.IsChecked = bSave (19) then Warnlog "Middle Dots => changes not saved!"
696 '///+make different changes
697 printlog " - second changes"
699 MatchFullHalf.Uncheck
700 MatchHiraganaKatakana.Check
701 MatchContractions.Check
702 MatchMinusDashChoOn.Uncheck
703 MatchRepeatcharacterMarks.Uncheck
704 MatchVariantFormKanji.Check
705 MatchOldKanaForms.Check
706 MatchDiZiDuZu.Uncheck
708 MatchTsiThiChiDhiZi.Uncheck
709 MatchHyuFyuByuVyu.Check
710 MatchDeSheZeJe.Uncheck
713 PunctuationCharacters.Uncheck
714 WhitespaceCharacters.Uncheck
715 ProlongedSoundmarks.Uncheck
718 '///+close options dialog with OK
719 Kontext "ExtrasOptionenDlg"
723 '///+open options 'Language settings' / 'japanese find'
724 '///+check the second changes
725 printlog " - check changes"
727 hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
729 if MatchCase.IsChecked <> TRUE then Warnlog "Match Case => changes not saved!"
730 if MatchFullHalf.IsChecked <> FALSE then Warnlog "Match Full Half => changes not saved!"
731 if MatchHiraganaKatakana.IsChecked <> TRUE then Warnlog "Match Hiragana Katakana => changes not saved!"
732 if MatchContractions.IsChecked <> TRUE then Warnlog "Match Contractions => changes not saved!"
733 if MatchMinusDashChoOn.IsChecked <> FALSE then Warnlog "Match Minus Dash Cho On => changes not saved!"
734 if MatchRepeatcharacterMarks.IsChecked <> FALSE then Warnlog "Match Repeatcharacter Marks => changes not saved!"
735 if MatchVariantFormKanji.IsChecked <> TRUE then Warnlog "Match Variant Form Kanji => changes not saved!"
736 if MatchOldKanaForms.IsChecked <> TRUE then Warnlog "Match Old Kana Forms => changes not saved!"
737 if MatchDiZiDuZu.IsChecked <> FALSE then Warnlog "Match Di Zi Du Zu => changes not saved!"
738 if MatchBaVaHaFa.IsChecked <> TRUE then Warnlog "Match Ba Va Ha Fa => changes not saved!"
739 if MatchTsiThiChiDhiZi.IsChecked <> FALSE then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
740 if MatchHyuFyuByuVyu.IsChecked <> TRUE then Warnlog "Match Hyu Iyu Byu Vyu => changes not saved!"
741 if MatchDeSheZeJe.IsChecked <> FALSE then Warnlog "Match De She Ze Je => changes not saved!"
742 if MatchIaIya.IsChecked <> TRUE then Warnlog "Match Ia Iya => changes not saved!"
743 if MatchKiKu.IsChecked <> FALSE then Warnlog "Match Ki Ku => changes not saved!"
744 if PunctuationCharacters.IsChecked <> FALSE then Warnlog "Punctuation Characters => changes not saved!"
745 if WhitespaceCharacters.IsChecked <> FALSE then Warnlog "Whitespace Characters => changes not saved!"
746 if ProlongedSoundmarks.IsChecked <> FALSE then Warnlog "Prolonged Soundmarks => changes not saved!"
747 if MiddleDots.IsChecked <> TRUE then Warnlog "Middle Dots => changes not saved!"
749 '///+reset all settings to default
750 printlog " - reset to saved data"
751 if bSave (1 ) = TRUE then MatchCase.Check else MatchCase.UnCheck
752 if bSave (2 ) = TRUE then MatchFullHalf.Check else MatchFullHalf.UnCheck
753 if bSave (3 ) = TRUE then MatchHiraganaKatakana.Check else MatchHiraganaKatakana.UnCheck
754 if bSave (4 ) = TRUE then MatchContractions.Check else MatchContractions.UnCheck
755 if bSave (5 ) = TRUE then MatchMinusDashChoOn.Check else MatchMinusDashChoOn.UnCheck
756 if bSave (6 ) = TRUE then MatchRepeatcharacterMarks.Check else MatchRepeatcharacterMarks.UnCheck
757 if bSave (7 ) = TRUE then MatchVariantFormKanji.Check else MatchVariantFormKanji.UnCheck
758 if bSave (8 ) = TRUE then MatchOldKanaForms.Check else MatchOldKanaForms.UnCheck
759 if bSave (9 ) = TRUE then MatchDiZiDuZu.Check else MatchDiZiDuZu.UnCheck
760 if bSave (10) = TRUE then MatchBaVaHaFa.Check else MatchBaVaHaFa.UnCheck
761 if bSave (11) = TRUE then MatchTsiThiChiDhiZi.Check else MatchTsiThiChiDhiZi.UnCheck
762 if bSave (12) = TRUE then MatchHyuFyuByuVyu.Check else MatchHyuFyuByuVyu.UnCheck
763 if bSave (13) = TRUE then MatchDeSheZeJe.Check else MatchDeSheZeJe.UnCheck
764 if bSave (14) = TRUE then MatchIaIya.Check else MatchIaIya.UnCheck
765 if bSave (15) = TRUE then MatchKiKu.Check else MatchKiKu.UnCheck
766 if bSave (16) = TRUE then PunctuationCharacters.Check else PunctuationCharacters.UnCheck
767 if bSave (17) = TRUE then WhitespaceCharacters.Check else WhitespaceCharacters.UnCheck
768 if bSave (18) = TRUE then ProlongedSoundmarks.Check else ProlongedSoundmarks.UnCheck
769 if bSave (19) = TRUE then MiddleDots.Check else MiddleDots.UnCheck
771 '///+close options dialoge with OK
772 Kontext "ExtrasOptionenDlg"
776 '///+open options 'Language settings' / 'japanese find'
777 '///+check the raw data
778 printlog " - check saved data"
780 hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
782 if MatchCase.IsChecked <> bSave (1 ) then Warnlog "Match Case => changes not saved!"
783 if MatchFullHalf.IsChecked <> bSave (2 ) then Warnlog "Match Full Half => changes not saved!"
784 if MatchHiraganaKatakana.IsChecked <> bSave (3 ) then Warnlog "Match Hiragana Katakana => changes not saved!"
785 if MatchContractions.IsChecked <> bSave (4 ) then Warnlog "Match Contractions => changes not saved!"
786 if MatchMinusDashChoOn.IsChecked <> bSave (5 ) then Warnlog "Match Minus Dash Cho On => changes not saved!"
787 if MatchRepeatcharacterMarks.IsChecked <> bSave (6 ) then Warnlog "Match Repeatcharacter Marks => changes not saved!"
788 if MatchVariantFormKanji.IsChecked <> bSave (7 ) then Warnlog "Match Variant Form Kanji => changes not saved!"
789 if MatchOldKanaForms.IsChecked <> bSave (8 ) then Warnlog "Match Old Kana Forms => changes not saved!"
790 if MatchDiZiDuZu.IsChecked <> bSave (9 ) then Warnlog "Match Di Zi Du Zu => changes not saved!"
791 if MatchBaVaHaFa.IsChecked <> bSave (10) then Warnlog "Match Ba Va Ha Fa => changes not saved!"
792 if MatchTsiThiChiDhiZi.IsChecked <> bSave (11) then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
793 if MatchHyuFyuByuVyu.IsChecked <> bSave (12) then Warnlog "Match Hyu Fyu Byu Vyu => changes not saved!"
794 if MatchDeSheZeJe.IsChecked <> bSave (13) then Warnlog "Match De She Ze Je => changes not saved!"
795 if MatchIaIya.IsChecked <> bSave (14) then Warnlog "Match Ia Iya => changes not saved!"
796 if MatchKiKu.IsChecked <> bSave (15) then Warnlog "Match Ki Ku => changes not saved!"
797 if PunctuationCharacters.IsChecked <> bSave (16) then Warnlog "Punctuation Characters => changes not saved!"
798 if WhitespaceCharacters.IsChecked <> bSave (17) then Warnlog "Whitespace Characters => changes not saved!"
799 if ProlongedSoundmarks.IsChecked <> bSave (18) then Warnlog "Prolonged Soundmarks => changes not saved!"
800 if MiddleDots.IsChecked <> bSave (19) then Warnlog "Middle Dots => changes not saved!"
802 '///+close options dialoge
803 Kontext "ExtrasOptionenDlg"
809 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
810 ' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
811 testcase tLanguageSettingsAsianLayout
812 Dim bSave ( 20 ) as Boolean
813 Dim sSave ( 20 ) as String
814 Dim i as Integer, iLan as Integer
816 '///check if all settings are saved in configuration ( Language Settings / Asian Layout ) => asian support must be activated
818 '///open a new document
819 '///+open options 'Language settings' / 'asian layout'
822 hToolsOptions ( "LanguageSettings", "AsianLayout" )
825 printlog " - save raw data"
826 bSave ( 1 ) = WesternCharactersOnly.IsChecked
827 bSave ( 2 ) = WesternTextAndPunctuation.IsChecked
828 bSave ( 3 ) = NoCompression.IsChecked
829 bSave ( 4 ) = CompressPunctuationOnly.IsChecked
830 bSave ( 5 ) = CompressPunctuationAndJapaneseKana.IsChecked
832 iLan = Language.GetItemCount
834 Warnlog "There are more than 4 languages in the list. The test break here, because it can't work with more than 4 entries. Bug?!?"
835 Kontext "ExtrasOptionenDlg"
843 sSave ( i ) = Language.GetSelText
844 bSave ( 5+i ) = Standard.IsChecked
846 sSave ( 5+i ) = NoStartOfLine.GetText
847 sSave ( 10+i ) = NoEndOfLine.GetText
848 if bSave ( 5+1 ) = TRUE then
855 '///+change all settings
856 printlog " - change data"
857 WesternTextAndPunctuation.Check
858 CompressPunctuationOnly.Check
859 for i=1 to Language.GetItemCount
863 case 1 : NoStartOfLine.SetText "avc" : NoEndOfLine.SetText "vca"
864 case 2 : NoStartOfLine.SetText ">" : NoEndOfLine.SetText "<"
865 case 3 : NoStartOfLine.SetText "!d?$" : NoEndOfLine.SetText "!d?$"
866 case 4 : NoStartOfLine.SetText "aS$%6" : NoEndOfLine.SetText "aS$$6"
870 '///+close options dialog with OK, close all documents and exit StarOffice
871 Kontext "ExtrasOptionenDlg"
876 '///+wait until StarOffice is out of memory and restart it
877 printlog " - exit/restart StarOffice"
880 '///+open options 'Language settings' / 'asian layout'
881 '///+check the changes
882 printlog " - check changes"
884 hToolsOptions ( "LanguageSettings", "AsianLayout" )
886 if WesternTextAndPunctuation.IsChecked <> TRUE then Warnlog "Western Text And Punctuation => changes not saved!"
887 if CompressPunctuationOnly.IsChecked <> TRUE then Warnlog "Compress Punctuation Only => changes not saved!"
890 if Language.GetSelText <> sSave (i) then Warnlog "The language-entries are changed!"
891 if Standard.IsChecked then
892 Warnlog sSave(i) + " : Standard is not unchecked"
896 case 1 : if NoStartOfLine.GetText <> "avc" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
897 if NoEndOfLine.GetText <> "vca" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
898 case 2 : if NoStartOfLine.GetText <> ">" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
899 if NoEndOfLine.GetText <> "<" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
900 case 3 : if NoStartOfLine.GetText <> "!d?$" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
901 if NoEndOfLine.GetText <> "!d?$" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
902 case 4 : if NoStartOfLine.GetText <> "aS$%6" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
903 if NoEndOfLine.GetText <> "aS$$6" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
907 '///+make different changes
908 printlog " - second changes"
909 WesternCharactersOnly.Check
910 CompressPunctuationAndJapaneseKana.Check
912 '///+close options dialog with OK
913 Kontext "ExtrasOptionenDlg"
917 '///+open options 'Language settings' / 'asian layout'
918 '///+check the changes
919 printlog " - check changes"
921 hToolsOptions ( "LanguageSettings", "AsianLayout" )
923 if WesternCharactersOnly.IsChecked <> TRUE then Warnlog "Western Characters Only => changes not saved!"
924 if CompressPunctuationAndJapaneseKana.IsChecked <> TRUE then Warnlog "Compress Punctuation And Japanese Kana => changes not saved!"
926 '///+reset all changes to default data
927 printlog " - reset to saved data"
928 if bSave ( 1 ) = TRUE then WesternCharactersOnly.Check
929 if bSave ( 2 ) = TRUE then WesternTextAndPunctuation.Check
930 if bSave ( 3 ) = TRUE then NoCompression.Check
931 if bSave ( 4 ) = TRUE then CompressPunctuationOnly.Check
932 if bSave ( 5 ) = TRUE then CompressPunctuationAndJapaneseKana.Check
935 Language.Select sSave(i)
937 NoStartOfLine.SetText sSave ( 5+i )
938 NoEndOfLine.SetText sSave ( 10+i )
939 if bSave ( 5+i ) = TRUE then Standard.Check else Standard.Uncheck
942 '///+close options dialog with OK
943 Kontext "ExtrasOptionenDlg"
947 '///+open options 'Language settings' / 'asian layout'
949 printlog " - check reset"
951 hToolsOptions ( "LanguageSettings", "AsianLayout" )
953 if WesternCharactersOnly.IsChecked <> bSave ( 1 ) then Warnlog "Western Characters Only => changes not saved!"
954 if WesternTextAndPunctuation.IsChecked <> bSave ( 2 ) then Warnlog "Western Text And Punctuation => changes not saved!"
955 if NoCompression.IsChecked <> bSave ( 3 ) then Warnlog "No Compression => changes not saved!"
956 if CompressPunctuationOnly.IsChecked <> bSave ( 4 ) then Warnlog "Compress Punctuation Only => changes not saved!"
957 if CompressPunctuationAndJapaneseKana.IsChecked <> bSave ( 5 ) then Warnlog "Compress Punctuation And Japanese Kana => changes not saved!"
959 Language.Select sSave(i)
960 if Standard.IsChecked <> bSave ( 5+i ) then Warnlog sSave(i) + " : Standard -> changes not saved"
962 if NoStartOfLine.GetText <> sSave ( 5+i ) then Warnlog sSave(i) + " : NoStartOfLine -> changes not saved"
963 if NoEndOfLine.GetText <> sSave ( 10+i ) then Warnlog sSave(i) + " : NoEndOfLine -> changes not saved"
964 if bSave ( 5+i ) = TRUE then Standard.Check else Standard.Uncheck
967 '///+close options dialog
968 Kontext "ExtrasOptionenDlg"