1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
|
'encoding UTF-8 Do not remove or change this line!
'**************************************************************************
' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
'
' Copyright 2000, 2010 Oracle and/or its affiliates.
'
' OpenOffice.org - a multi-platform office productivity suite
'
' 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 (test for language-group)
'*
'\******************************************************************************
sub opt_lan1
Dim bOld as Boolean
bOld = ActiveDeactivateAsianSupport ( FALSE )
Call tLanguageSettingsLanguages
Call tLanguageSettingsWritingAids
printlog "++ activate the asian support in StarOffice ++"
ActiveDeactivateAsianSupport ( TRUE )
Call tLanguageSettingsJapaneseFind
Call tLanguageSettingsAsianLayout
printlog "++ reset asian support in StarOffice to default ++"
if bOld = TRUE then
ActiveDeactivateAsianSupport ( TRUE )
else
ActiveDeactivateAsianSupport ( FALSE )
end if
end sub
'*******************************************************************************
testcase tLanguageSettingsLanguages
Dim lsSave ( 5 ) as String, lsSave2 (3) as String
Dim bChanged as Boolean, bSave as Boolean, bSave2 as Boolean
bChanged = FALSE
hNewDocument
ToolsOptions
hToolsOptions ( "LanguageSettings", "Languages" )
printlog "- check dependences in this dialog"
printlog " - asian support"
if Aktivieren.IsChecked() = FALSE then
if Asiatisch.IsEnabled() = TRUE then
Warnlog "Asian support is not active, the listbox is in wrong state:"
printlog "...the language for asian is active => Perhaps #108220#"
end if
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
if Asiatisch.IsEnabled() <> TRUE then
Warnlog "Asian support is active, the listbox is in wrong state:"
printlog "...language for asian is not active => BUG!"
end if
if Aktivieren.isEnabled then
Aktivieren.unCheck
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
else
if Asiatisch.IsEnabled() <> TRUE then
Warnlog "Asian support is not active, the listbox is in wrong state:"
printlog "...language for asian is not active => BUG!"
end if
if Aktivieren.isEnabled then
Aktivieren.unCheck
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
if Asiatisch.IsEnabled() = TRUE then
Warnlog "Asian support is active, the listbox is in wrong state:"
printlog "...language for asian is active => BUG!"
end if
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
end if
printlog " - CTL support"
if ComplexScriptEnabled.IsChecked() = FALSE then
if LanguageComplexScript.IsEnabled() = TRUE then
Warnlog "CTL support is not active, the listbox is in wrong state:"
printlog "...language for CTL is active => BUG!"
end if
ComplexScriptEnabled.Check()
if LanguageComplexScript.IsEnabled() <> TRUE then
Warnlog "CTL support is active, the listbox is in wrong state:"
printlog "...language for CTL is not active => BUG!"
end if
ComplexScriptEnabled.UnCheck()
else
if LanguageComplexScript.IsEnabled() <> TRUE then
Warnlog "CTL support is active, the listbox is in wrong state:"
printlog "...language for CTL is not active => BUG!"
end if
ComplexScriptEnabled.UnCheck()
if LanguageComplexScript.IsEnabled() = TRUE then
Warnlog "CTL support is not active, the listbox is in wrong state:"
printlog "...the language for CTL is active => BUG!"
end if
ComplexScriptEnabled.Check()
end if
printlog "- save raw data"
lsSave (1) = Gebietsschema.GetSelText()
lsSave (2) = StandardWaehrung.GetSelText()
lsSave (3) = Westlich.GetSelText()
bSave = Aktivieren.IsChecked()
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
lsSave (4) = Asiatisch.GetSelText()
if lsSave (4) = "" then
Warnlog "Empty entry is selected for 'Asian'! => Bug 102046"
endif
bSave2 = ComplexScriptEnabled.IsChecked()
ComplexScriptEnabled.Check()
lsSave (5) = LanguageComplexScript.GetSelText()
if lsSave (5) = "" then
Warnlog "Empty entry is selected for 'Complex script'! => Bug 102046"
endif
printlog "- change settings"
select case iSprache
case 34 : Gebietsschema.Select( 40 )
case 39 : Gebietsschema.Select( 17 )
case 81 : Gebietsschema.Select( 22 )
case 88 : Gebietsschema.Select( 19 )
case else : Gebietsschema.Select( 15 )
end select
StandardWaehrung.Select( 20 )
Westlich.Select( 10 )
lsSave2(1) = Westlich.GetSelText()
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
Asiatisch.Select( 5 )
lsSave2(2) = Asiatisch.GetSelText()
AktuellesDokument.Uncheck()
ComplexScriptEnabled.Check
LanguageComplexScript.Select( 7 )
lsSave2 (3) = LanguageComplexScript.GetSelText()
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK()
Sleep ( 3 )
hCloseDocument
printlog "- exit/restart StarOffice"
ExitRestartTheOffice
hNewDocument
printlog "- check changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "Languages" )
select case iSprache
case 34 : if Gebietsschema.GetSelIndex <> 40 then
Warnlog "locale settings => changes not saved!"
endif
case 39 : if Gebietsschema.GetSelIndex <> 17 then
Warnlog "locale settings => changes not saved!"
endif
case 81 : if Gebietsschema.GetSelIndex <> 22 then
Warnlog "locale settings => changes not saved!"
endif
case 88 : if Gebietsschema.GetSelIndex <> 19 then
Warnlog "locale settings => changes not saved!"
endif
case else : if Gebietsschema.GetSelIndex <> 15 then
Warnlog "locale settings => changes not saved!"
endif
end select
if StandardWaehrung.GetSelIndex <> 20 then
Warnlog "default currency => changes not saved!"
endif
if Westlich.GetSelText <> lsSave2(1) then
Warnlog "western => changes not saved! "
endif
if Aktivieren.IsChecked <> TRUE then
Warnlog "Enabled asian support => changes not saved!"
endif
if Asiatisch.GetSelText <> lsSave2(2) then
Warnlog "asian => changes not saved! "
endif
if ComplexScriptEnabled.IsChecked <> TRUE then
Warnlog "CTL support => changes not saved!"
endif
if LanguageComplexScript.GetSelText <> lsSave2 (3) then
Warnlog "CTL language => changes not saved! "
endif
printlog "- set to default"
Gebietsschema.Select lsSave(1)
StandardWaehrung.Select lsSave (2)
Westlich.Select lsSave (3)
AktuellesDokument.Uncheck()
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
if lsSave (4) <> "" then
Asiatisch.Select lsSave (4)
else
Asiatisch.Select 1
end if
if Aktivieren.isEnabled then
if bSave = TRUE then
Aktivieren.Check
else
Aktivieren.Uncheck
endif
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
ComplexScriptEnabled.Check()
if lsSave (5) <> "" then
LanguageComplexScript.Select( lsSave(5) )
else
LanguageComplexScript.Select( 1 )
end if
if bSave2 = TRUE then
ComplexScriptEnabled.Check()
else
ComplexScriptEnabled.Uncheck()
endif
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK()
Sleep (3)
printlog "- check the data"
ToolsOptions
hToolsOptions ( "LanguageSettings", "Languages" )
if Gebietsschema.GetSelText() <> lsSave(1) then
Warnlog "locale settings => changes not saved! => BugID : 87977"
endif
if StandardWaehrung.GetSelText() <> lsSave(2) then
Warnlog "default currency => changes not saved!"
endif
if Westlich.GetSelText() <> lsSave (3) then
Warnlog "western => changes not saved!"
endif
if Aktivieren.IsChecked() <> bSave then
Warnlog "Enabled asian support => changes not saved!"
endif
if Aktivieren.isEnabled then
Aktivieren.Check
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
if lsSave (4) <> "" then
if Asiatisch.GetSelText() <> lsSave (4) then
Warnlog "asian => changes not saved!"
endif
end if
if ComplexScriptEnabled.IsChecked() <> bSave2 then
Warnlog "CTL support => changes not saved!"
endif
ComplexScriptEnabled.Check()
if lsSave (5) <> "" then
if LanguageComplexScript.GetSelText() <> lsSave (5) then
Warnlog "CTL language => changes not saved! "
endif
end if
if Aktivieren.isEnabled then
if bSave = TRUE then
Aktivieren.Check
else
Aktivieren.Uncheck
endif
else
qaErrorLog("Asian locale setting is selected: '"+Gebietsschema.getSelText()+"'")
printlog Aktivieren.isEnabled
endif
if bSave2 = TRUE then
ComplexScriptEnabled.Check()
else
ComplexScriptEnabled.Uncheck()
endif
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK()
Sleep (3)
hclosedocument
endcase
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
testcase tLanguageSettingsWritingAids
Dim lbSave1 ( 5 ) as Boolean
Dim lbSave2 ( 5 ) as Boolean
Dim lbSave3 ( 15 ) as Boolean
dim iCounter as Integer
Dim i as Integer, iCounter1 as Integer, iCounter2 as Integer, iCounter3 as Integer
hNewDocument
ToolsOptions
hToolsOptions ( "LanguageSettings", "WritingAids" )
printlog " - save raw data / and inverted settings"
iCounter1 = Sprachmodule.GetItemCount
Sprachmodule.TypeKeys "<PageUp>", 6
for i=1 to iCounter1
lbSave1 (i) = Sprachmodule.IsChecked
if lbSave1 (i) = TRUE then Sprachmodule.Uncheck else Sprachmodule.Check
Sprachmodule.TypeKeys "<Down>"
next i
iCounter2 = Benutzerwoerterbuch.GetItemCount
Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
for i=1 to iCounter2 - 1
lbSave2 (i) = Benutzerwoerterbuch.IsChecked
if lbSave2 (i) = TRUE then Benutzerwoerterbuch.Uncheck else Benutzerwoerterbuch.Check
Benutzerwoerterbuch.TypeKeys "<Down>"
next i
if Benutzerwoerterbuch.IsChecked <> TRUE then
Warnlog "Last entry in 'User-defined dictionaries' should be checked ( internal Ignore-All List ), but it isn't => BUG?!"
endif
iCounter3 = Optionen.GetItemCount
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter3
if i<>9 AND i<>10 AND i<>11 then
lbSave3 (i) = Optionen.IsChecked
if lbSave3 (i) = TRUE then Optionen.Uncheck else Optionen.Check
end if
Optionen.TypeKeys "<Down>"
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
hCloseDocument
printlog " - exit/restart StarOffice"
ExitRestartTheOffice
printlog " - check changes"
hNewDocument
ToolsOptions
hToolsOptions ( "LanguageSettings", "WritingAids" )
printlog " 'available language modules'"
Sprachmodule.TypeKeys "<PageUp>", 6
for i=1 to iCounter1
if Sprachmodule.Ischecked = lbSave1 (i) then
Warnlog "entry no. " + i + " => changes not saved! perhaps #i15841!"
end if
Sprachmodule.TypeKeys "<Down>"
next i
printlog " 'user-definded dictonaries'"
Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
for i=1 to iCounter2 - 1
if Benutzerwoerterbuch.Ischecked = lbSave2 (i) then Warnlog "entry no. " + i + " => changes not saved!"
Benutzerwoerterbuch.TypeKeys "<Down>"
next i
if Benutzerwoerterbuch.IsChecked <> TRUE then
Warnlog "Last entry in 'User-defined dictionaries' should be checked ( internal Ignore-All List ), but it isn't => BUG?!"
endif
printlog " 'options'"
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter3
if i<>9 AND i<>10 AND i<>11 then
if Optionen.IsChecked = lbSave3 (i) then Warnlog "entry no. " + i + " => changes not saved!"
end if
Optionen.TypeKeys "<Down>"
next i
printlog " - make second changes"
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter3
if i=1 then Optionen.Uncheck
if i=3 then Optionen.Check
if i=5 then Optionen.Uncheck
if i=6 then Optionen.Check
if i=7 then Optionen.Uncheck
if i=12 then Optionen.Check
Optionen.TypeKeys "<Down>"
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
hCloseDocument
printlog " - check second changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "WritingAids" )
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter
select case i
case 1 : if Optionen.IsChecked <> FALSE then
Warnlog "entry no. 1 => changes not saved!"
endif
case 3 : if Optionen.IsChecked <> TRUE then
Warnlog "entry no. 3 => changes not saved!"
endif
case 5 : if Optionen.IsChecked <> FALSE then
Warnlog "entry no. 5 => changes not saved!"
endif
case 6 : if Optionen.IsChecked <> TRUE then
Warnlog "entry no. 6 => changes not saved!"
endif
case 7 : if Optionen.IsChecked <> FALSE then
printlog "entry no. 7 => not saved! => it is only for documents"
endif
case 12 : if Optionen.IsChecked <> TRUE then
Warnlog "entry no. 12 => changes not saved!"
endif
end select
Optionen.TypeKeys "<Down>"
next i
printlog " - reset settings"
Sprachmodule.TypeKeys "<PageUp>", 6
for i=1 to iCounter1
if lbSave1 (i) = TRUE then Sprachmodule.Check else Sprachmodule.UnCheck
Sprachmodule.TypeKeys "<Down>"
next i
Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
for i=1 to iCounter2 - 1
if lbSave2 (i) = TRUE then Benutzerwoerterbuch.Check else Benutzerwoerterbuch.UnCheck
Benutzerwoerterbuch.TypeKeys "<Down>"
next i
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter3
if i<>9 AND i<>10 AND i<>11 then
if lbSave3 (i) = TRUE then Optionen.Check else Optionen.UnCheck
end if
Optionen.TypeKeys "<Down>"
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check raw data"
ToolsOptions
hToolsOptions ( "LanguageSettings", "WritingAids" )
printlog " 'available language modules'"
Sprachmodule.TypeKeys "<PageUp>", 6
for i=1 to iCounter1
if Sprachmodule.Ischecked <> lbSave1 (i) then Warnlog "entry no. " + i + " => changes not saved!"
Sprachmodule.TypeKeys "<Down>"
next i
printlog " 'user-definded dictonaries'"
Benutzerwoerterbuch.TypeKeys "<PageUp>", 6
for i=1 to iCounter2 - 1
if Benutzerwoerterbuch.Ischecked <> lbSave2 (i) then Warnlog "entry no. " + i + " => changes not saved!"
Benutzerwoerterbuch.TypeKeys "<Down>"
next i
printlog " 'options'"
Optionen.TypeKeys "<PageUp>", 6
for i=1 to iCounter3
if i<>9 AND i<>10 AND i<>11 then
if Optionen.IsChecked <> lbSave3 (i) then Warnlog "entry no. " + i + " => changes not saved!"
end if
Optionen.TypeKeys "<Down>"
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
endcase
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
testcase tLanguageSettingsJapaneseFind
Dim bSave ( 20 ) as Boolean
hNewDocument
ToolsOptions
hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
printlog " - save data"
bSave (1 ) = MatchCase.IsChecked
bSave (2 ) = MatchFullHalf.IsChecked
bSave (3 ) = MatchHiraganaKatakana.IsChecked
bSave (4 ) = MatchContractions.IsChecked
bSave (5 ) = MatchMinusDashChoOn.IsChecked
bSave (6 ) = MatchRepeatcharacterMarks.IsChecked
bSave (7 ) = MatchVariantFormKanji.IsChecked
bSave (8 ) = MatchOldKanaForms.IsChecked
bSave (9 ) = MatchDiZiDuZu.IsChecked
bSave (10) = MatchBaVaHaFa.IsChecked
bSave (11) = MatchTsiThiChiDhiZi.IsChecked
bSave (12) = MatchHyuFyuByuVyu.IsChecked
bSave (13) = MatchDeSheZeJe.IsChecked
bSave (14) = MatchIaIya.IsChecked
bSave (15) = MatchKiKu.IsChecked
bSave (16) = PunctuationCharacters.IsChecked
bSave (17) = WhitespaceCharacters.IsChecked
bSave (18) = ProlongedSoundmarks.IsChecked
bSave (19) = MiddleDots.IsChecked
printlog " - invert data"
if bSave (1 ) = TRUE then MatchCase.Uncheck else MatchCase.Check
if bSave (2 ) = TRUE then MatchFullHalf.Uncheck else MatchFullHalf.Check
if bSave (3 ) = TRUE then MatchHiraganaKatakana.Uncheck else MatchHiraganaKatakana.Check
if bSave (4 ) = TRUE then MatchContractions.Uncheck else MatchContractions.Check
if bSave (5 ) = TRUE then MatchMinusDashChoOn.Uncheck else MatchMinusDashChoOn.Check
if bSave (6 ) = TRUE then MatchRepeatcharacterMarks.Uncheck else MatchRepeatcharacterMarks.Check
if bSave (7 ) = TRUE then MatchVariantFormKanji.Uncheck else MatchVariantFormKanji.Check
if bSave (8 ) = TRUE then MatchOldKanaForms.Uncheck else MatchOldKanaForms.Check
if bSave (9 ) = TRUE then MatchDiZiDuZu.Uncheck else MatchDiZiDuZu.Check
if bSave (10) = TRUE then MatchBaVaHaFa.Uncheck else MatchBaVaHaFa.Check
if bSave (11) = TRUE then MatchTsiThiChiDhiZi.Uncheck else MatchTsiThiChiDhiZi.Check
if bSave (12) = TRUE then MatchHyuFyuByuVyu.Uncheck else MatchHyuFyuByuVyu.Check
if bSave (13) = TRUE then MatchDeSheZeJe.Uncheck else MatchDeSheZeJe.Check
if bSave (14) = TRUE then MatchIaIya.Uncheck else MatchIaIya.Check
if bSave (15) = TRUE then MatchKiKu.Uncheck else MatchKiKu.Check
if bSave (16) = TRUE then PunctuationCharacters.Uncheck else PunctuationCharacters.Check
if bSave (17) = TRUE then WhitespaceCharacters.Uncheck else WhitespaceCharacters.Check
if bSave (18) = TRUE then ProlongedSoundmarks.Uncheck else ProlongedSoundmarks.Check
if bSave (19) = TRUE then MiddleDots.Uncheck else MiddleDots.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
hCloseDocument
printlog " - exit/restart StarOffice"
ExitRestartTheOffice
printlog " - check changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
if MatchCase.IsChecked = bSave (1 ) then Warnlog "Match Case => changes not saved!"
if MatchFullHalf.IsChecked = bSave (2 ) then Warnlog "Match Full Half => changes not saved!"
if MatchHiraganaKatakana.IsChecked = bSave (3 ) then Warnlog "Match Hiragana Katakana => changes not saved!"
if MatchContractions.IsChecked = bSave (4 ) then Warnlog "Match Contractions => changes not saved!"
if MatchMinusDashChoOn.IsChecked = bSave (5 ) then Warnlog "Match Minus Dash Cho On => changes not saved!"
if MatchRepeatcharacterMarks.IsChecked = bSave (6 ) then Warnlog "Match Repeatcharacter Marks => changes not saved!"
if MatchVariantFormKanji.IsChecked = bSave (7 ) then Warnlog "Match Variant Form Kanji => changes not saved!"
if MatchOldKanaForms.IsChecked = bSave (8 ) then Warnlog "Match Old Kana Forms => changes not saved!"
if MatchDiZiDuZu.IsChecked = bSave (9 ) then Warnlog "Match Di Zi Du Zu => changes not saved!"
if MatchBaVaHaFa.IsChecked = bSave (10) then Warnlog "Match Ba Va Ha Fa => changes not saved!"
if MatchTsiThiChiDhiZi.IsChecked = bSave (11) then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
if MatchHyuFyuByuVyu.IsChecked = bSave (12) then Warnlog "Match Hyu Iyu Byu Vyu => changes not saved!"
if MatchDeSheZeJe.IsChecked = bSave (13) then Warnlog "Match De She Ze Je => changes not saved!"
if MatchIaIya.IsChecked = bSave (14) then Warnlog "Match Ia Iya => changes not saved!"
if MatchKiKu.IsChecked = bSave (15) then Warnlog "Match Ki Ku => changes not saved!"
if PunctuationCharacters.IsChecked = bSave (16) then Warnlog "Punctuation Characters => changes not saved!"
if WhitespaceCharacters.IsChecked = bSave (17) then Warnlog "Whitespace Characters => changes not saved!"
if ProlongedSoundmarks.IsChecked = bSave (18) then Warnlog "Prolonged Soundmarks => changes not saved!"
if MiddleDots.IsChecked = bSave (19) then Warnlog "Middle Dots => changes not saved!"
printlog " - second changes"
MatchCase.Check
MatchFullHalf.Uncheck
MatchHiraganaKatakana.Check
MatchContractions.Check
MatchMinusDashChoOn.Uncheck
MatchRepeatcharacterMarks.Uncheck
MatchVariantFormKanji.Check
MatchOldKanaForms.Check
MatchDiZiDuZu.Uncheck
MatchBaVaHaFa.Check
MatchTsiThiChiDhiZi.Uncheck
MatchHyuFyuByuVyu.Check
MatchDeSheZeJe.Uncheck
MatchIaIya.Check
MatchKiKu.Uncheck
PunctuationCharacters.Uncheck
WhitespaceCharacters.Uncheck
ProlongedSoundmarks.Uncheck
MiddleDots.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
if MatchCase.IsChecked <> TRUE then Warnlog "Match Case => changes not saved!"
if MatchFullHalf.IsChecked <> FALSE then Warnlog "Match Full Half => changes not saved!"
if MatchHiraganaKatakana.IsChecked <> TRUE then Warnlog "Match Hiragana Katakana => changes not saved!"
if MatchContractions.IsChecked <> TRUE then Warnlog "Match Contractions => changes not saved!"
if MatchMinusDashChoOn.IsChecked <> FALSE then Warnlog "Match Minus Dash Cho On => changes not saved!"
if MatchRepeatcharacterMarks.IsChecked <> FALSE then Warnlog "Match Repeatcharacter Marks => changes not saved!"
if MatchVariantFormKanji.IsChecked <> TRUE then Warnlog "Match Variant Form Kanji => changes not saved!"
if MatchOldKanaForms.IsChecked <> TRUE then Warnlog "Match Old Kana Forms => changes not saved!"
if MatchDiZiDuZu.IsChecked <> FALSE then Warnlog "Match Di Zi Du Zu => changes not saved!"
if MatchBaVaHaFa.IsChecked <> TRUE then Warnlog "Match Ba Va Ha Fa => changes not saved!"
if MatchTsiThiChiDhiZi.IsChecked <> FALSE then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
if MatchHyuFyuByuVyu.IsChecked <> TRUE then Warnlog "Match Hyu Iyu Byu Vyu => changes not saved!"
if MatchDeSheZeJe.IsChecked <> FALSE then Warnlog "Match De She Ze Je => changes not saved!"
if MatchIaIya.IsChecked <> TRUE then Warnlog "Match Ia Iya => changes not saved!"
if MatchKiKu.IsChecked <> FALSE then Warnlog "Match Ki Ku => changes not saved!"
if PunctuationCharacters.IsChecked <> FALSE then Warnlog "Punctuation Characters => changes not saved!"
if WhitespaceCharacters.IsChecked <> FALSE then Warnlog "Whitespace Characters => changes not saved!"
if ProlongedSoundmarks.IsChecked <> FALSE then Warnlog "Prolonged Soundmarks => changes not saved!"
if MiddleDots.IsChecked <> TRUE then Warnlog "Middle Dots => changes not saved!"
printlog " - reset to saved data"
if bSave (1 ) = TRUE then MatchCase.Check else MatchCase.UnCheck
if bSave (2 ) = TRUE then MatchFullHalf.Check else MatchFullHalf.UnCheck
if bSave (3 ) = TRUE then MatchHiraganaKatakana.Check else MatchHiraganaKatakana.UnCheck
if bSave (4 ) = TRUE then MatchContractions.Check else MatchContractions.UnCheck
if bSave (5 ) = TRUE then MatchMinusDashChoOn.Check else MatchMinusDashChoOn.UnCheck
if bSave (6 ) = TRUE then MatchRepeatcharacterMarks.Check else MatchRepeatcharacterMarks.UnCheck
if bSave (7 ) = TRUE then MatchVariantFormKanji.Check else MatchVariantFormKanji.UnCheck
if bSave (8 ) = TRUE then MatchOldKanaForms.Check else MatchOldKanaForms.UnCheck
if bSave (9 ) = TRUE then MatchDiZiDuZu.Check else MatchDiZiDuZu.UnCheck
if bSave (10) = TRUE then MatchBaVaHaFa.Check else MatchBaVaHaFa.UnCheck
if bSave (11) = TRUE then MatchTsiThiChiDhiZi.Check else MatchTsiThiChiDhiZi.UnCheck
if bSave (12) = TRUE then MatchHyuFyuByuVyu.Check else MatchHyuFyuByuVyu.UnCheck
if bSave (13) = TRUE then MatchDeSheZeJe.Check else MatchDeSheZeJe.UnCheck
if bSave (14) = TRUE then MatchIaIya.Check else MatchIaIya.UnCheck
if bSave (15) = TRUE then MatchKiKu.Check else MatchKiKu.UnCheck
if bSave (16) = TRUE then PunctuationCharacters.Check else PunctuationCharacters.UnCheck
if bSave (17) = TRUE then WhitespaceCharacters.Check else WhitespaceCharacters.UnCheck
if bSave (18) = TRUE then ProlongedSoundmarks.Check else ProlongedSoundmarks.UnCheck
if bSave (19) = TRUE then MiddleDots.Check else MiddleDots.UnCheck
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check saved data"
ToolsOptions
hToolsOptions ( "LanguageSettings", "SearchingInJapanese" )
if MatchCase.IsChecked <> bSave (1 ) then Warnlog "Match Case => changes not saved!"
if MatchFullHalf.IsChecked <> bSave (2 ) then Warnlog "Match Full Half => changes not saved!"
if MatchHiraganaKatakana.IsChecked <> bSave (3 ) then Warnlog "Match Hiragana Katakana => changes not saved!"
if MatchContractions.IsChecked <> bSave (4 ) then Warnlog "Match Contractions => changes not saved!"
if MatchMinusDashChoOn.IsChecked <> bSave (5 ) then Warnlog "Match Minus Dash Cho On => changes not saved!"
if MatchRepeatcharacterMarks.IsChecked <> bSave (6 ) then Warnlog "Match Repeatcharacter Marks => changes not saved!"
if MatchVariantFormKanji.IsChecked <> bSave (7 ) then Warnlog "Match Variant Form Kanji => changes not saved!"
if MatchOldKanaForms.IsChecked <> bSave (8 ) then Warnlog "Match Old Kana Forms => changes not saved!"
if MatchDiZiDuZu.IsChecked <> bSave (9 ) then Warnlog "Match Di Zi Du Zu => changes not saved!"
if MatchBaVaHaFa.IsChecked <> bSave (10) then Warnlog "Match Ba Va Ha Fa => changes not saved!"
if MatchTsiThiChiDhiZi.IsChecked <> bSave (11) then Warnlog "Match Tsi Thi Chi Dhi Zi => changes not saved!"
if MatchHyuFyuByuVyu.IsChecked <> bSave (12) then Warnlog "Match Hyu Fyu Byu Vyu => changes not saved!"
if MatchDeSheZeJe.IsChecked <> bSave (13) then Warnlog "Match De She Ze Je => changes not saved!"
if MatchIaIya.IsChecked <> bSave (14) then Warnlog "Match Ia Iya => changes not saved!"
if MatchKiKu.IsChecked <> bSave (15) then Warnlog "Match Ki Ku => changes not saved!"
if PunctuationCharacters.IsChecked <> bSave (16) then Warnlog "Punctuation Characters => changes not saved!"
if WhitespaceCharacters.IsChecked <> bSave (17) then Warnlog "Whitespace Characters => changes not saved!"
if ProlongedSoundmarks.IsChecked <> bSave (18) then Warnlog "Prolonged Soundmarks => changes not saved!"
if MiddleDots.IsChecked <> bSave (19) then Warnlog "Middle Dots => changes not saved!"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
endcase
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
' > * > * > * > * > * > * > * > * > * > * > * > * > * > * > * > *
testcase tLanguageSettingsAsianLayout
Dim bSave ( 20 ) as Boolean
Dim sSave ( 20 ) as String
Dim i as Integer, iLan as Integer
hNewDocument
ToolsOptions
hToolsOptions ( "LanguageSettings", "AsianLayout" )
printlog " - save raw data"
bSave ( 1 ) = WesternCharactersOnly.IsChecked
bSave ( 2 ) = WesternTextAndPunctuation.IsChecked
bSave ( 3 ) = NoCompression.IsChecked
bSave ( 4 ) = CompressPunctuationOnly.IsChecked
bSave ( 5 ) = CompressPunctuationAndJapaneseKana.IsChecked
iLan = Language.GetItemCount
if iLan > 4 then
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?!?"
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
hclosedocument
goto endsub
end if
for i=1 to iLan
Language.Select i
sSave ( i ) = Language.GetSelText
bSave ( 5+i ) = Standard.IsChecked
Standard.Uncheck
sSave ( 5+i ) = NoStartOfLine.GetText
sSave ( 10+i ) = NoEndOfLine.GetText
if bSave ( 5+1 ) = TRUE then
Standard.Check
else
Standard.Uncheck
end if
next i
printlog " - change data"
WesternTextAndPunctuation.Check
CompressPunctuationOnly.Check
for i=1 to Language.GetItemCount
Language.Select i
Standard.UnCheck
select case i
case 1 : NoStartOfLine.SetText "avc" : NoEndOfLine.SetText "vca"
case 2 : NoStartOfLine.SetText ">" : NoEndOfLine.SetText "<"
case 3 : NoStartOfLine.SetText "!d?$" : NoEndOfLine.SetText "!d?$"
case 4 : NoStartOfLine.SetText "aS$%6" : NoEndOfLine.SetText "aS$$6"
end select
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
hCloseDocument
printlog " - exit/restart StarOffice"
ExitRestartTheOffice
printlog " - check changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "AsianLayout" )
if WesternTextAndPunctuation.IsChecked <> TRUE then Warnlog "Western Text And Punctuation => changes not saved!"
if CompressPunctuationOnly.IsChecked <> TRUE then Warnlog "Compress Punctuation Only => changes not saved!"
for i=1 to iLan
Language.Select i
if Language.GetSelText <> sSave (i) then Warnlog "The language-entries are changed!"
if Standard.IsChecked then
Warnlog sSave(i) + " : Standard is not unchecked"
Standard.Uncheck
end if
select case i
case 1 : if NoStartOfLine.GetText <> "avc" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
if NoEndOfLine.GetText <> "vca" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
case 2 : if NoStartOfLine.GetText <> ">" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
if NoEndOfLine.GetText <> "<" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
case 3 : if NoStartOfLine.GetText <> "!d?$" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
if NoEndOfLine.GetText <> "!d?$" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
case 4 : if NoStartOfLine.GetText <> "aS$%6" then Warnlog sSave (i) + " : NoStartOfLine -> changes not saved"
if NoEndOfLine.GetText <> "aS$$6" then Warnlog sSave (i) + " : NoEndOfLine -> changes not saved"
end select
next i
printlog " - second changes"
WesternCharactersOnly.Check
CompressPunctuationAndJapaneseKana.Check
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check changes"
ToolsOptions
hToolsOptions ( "LanguageSettings", "AsianLayout" )
if WesternCharactersOnly.IsChecked <> TRUE then Warnlog "Western Characters Only => changes not saved!"
if CompressPunctuationAndJapaneseKana.IsChecked <> TRUE then Warnlog "Compress Punctuation And Japanese Kana => changes not saved!"
printlog " - reset to saved data"
if bSave ( 1 ) = TRUE then WesternCharactersOnly.Check
if bSave ( 2 ) = TRUE then WesternTextAndPunctuation.Check
if bSave ( 3 ) = TRUE then NoCompression.Check
if bSave ( 4 ) = TRUE then CompressPunctuationOnly.Check
if bSave ( 5 ) = TRUE then CompressPunctuationAndJapaneseKana.Check
for i=1 to iLan
Language.Select sSave(i)
Standard.Uncheck
NoStartOfLine.SetText sSave ( 5+i )
NoEndOfLine.SetText sSave ( 10+i )
if bSave ( 5+i ) = TRUE then Standard.Check else Standard.Uncheck
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
printlog " - check reset"
ToolsOptions
hToolsOptions ( "LanguageSettings", "AsianLayout" )
if WesternCharactersOnly.IsChecked <> bSave ( 1 ) then Warnlog "Western Characters Only => changes not saved!"
if WesternTextAndPunctuation.IsChecked <> bSave ( 2 ) then Warnlog "Western Text And Punctuation => changes not saved!"
if NoCompression.IsChecked <> bSave ( 3 ) then Warnlog "No Compression => changes not saved!"
if CompressPunctuationOnly.IsChecked <> bSave ( 4 ) then Warnlog "Compress Punctuation Only => changes not saved!"
if CompressPunctuationAndJapaneseKana.IsChecked <> bSave ( 5 ) then Warnlog "Compress Punctuation And Japanese Kana => changes not saved!"
for i=1 to iLan
Language.Select sSave(i)
if Standard.IsChecked <> bSave ( 5+i ) then Warnlog sSave(i) + " : Standard -> changes not saved"
Standard.Uncheck
if NoStartOfLine.GetText <> sSave ( 5+i ) then Warnlog sSave(i) + " : NoStartOfLine -> changes not saved"
if NoEndOfLine.GetText <> sSave ( 10+i ) then Warnlog sSave(i) + " : NoEndOfLine -> changes not saved"
if bSave ( 5+i ) = TRUE then Standard.Check else Standard.Uncheck
next i
Kontext "ExtrasOptionenDlg"
ExtrasOptionenDlg.OK
Sleep (3)
endcase
|