jl165 merging heads
[LibreOffice.git] / testautomation / writer / optional / w_chinesetranslate.bas
blob07c14cf06f5a24e4d88297b3c781254450f25c37
1 'encoding UTF-8 Do not remove or change this line!
2 '**************************************************************************
3 ' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 '
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 : helge.delfs@oracle.com
30 '* short description : Test Chinese Translation
32 '\*******************************************************************
34 sub main
36 Dim StartZeit
37 Dim bAsianLanguage as Boolean
38 Dim DefaultLanguage as String
40 StartZeit = Now()
42 use "writer\tools\includes\w_tools.inc"
43 use "writer\tools\includes\w_tool3.inc"
44 use "writer\optional\includes\tools\tools1.inc"
45 use "writer\optional\includes\tools\tools2.inc"
46 use "writer\optional\includes\chinesetranslate\w_chinesetranslate1.inc"
47 use "writer\optional\includes\chinesetranslate\w_chinesetranslate2.inc"
49 printlog Chr(13) + "Loading of Include - Files takes: " + Wielange ( StartZeit )
50 printlog Chr(13) + "******* Writer - Level 1 - Test *******"
52 Call hStatusIn ( "writer", "w_chinesetranslate.bas" , "Chinese Translation" )
54 printlog Chr(13) + " - Test Chinese Translation"
56 'Enable 'Asian Language support' ON
57 bAsianLanguage = ActiveDeactivateAsianSupport(TRUE)
58 ' Set default language(asian) for document is "Simplified Chinese"
59 DefaultLanguage = fSetAsian(fGetLanguageName(86))
61 printlog Chr(13) + " -- Default setting -- "
63 'Don't need to run this case - tDefaultSetting_1
64 Call tDefaultSetting_1
65 Call tDefaultSetting_2
66 Call tDefaultSetting_3
68 printlog Chr(13) + " -- Standard Function -- "
69 Call tChineseTranslate_1
70 Call tChineseTranslate_2
71 Call tChineseTranslate_3
72 Call tChineseTranslate_4
73 Call tChineseTranslate_5
75 printlog Chr(13) + " -- Chinese Dictionary -- "
76 Call tChineseTranslate_6
77 Call tChineseTranslate_7
78 Call tChineseTranslate_8
79 Call tChineseTranslate_9
80 Call tChineseTranslate_10
81 Call tChineseTranslate_11
83 printlog Chr(13) + " -- Undo/Redo -- "
84 Call tUndoRedo
86 'Set default language(asian) to default
87 Call fSetAsian(DefaultLanguage)
88 'Set the 'Asian Language support' to default
89 if bAsianLanguage = FALSE then
90 Call ActiveDeactivateAsianSupport(FALSE)
91 end if
93 Call hStatusOut
95 Printlog Chr(13) + "End of Level 1 Test - Chinese Conversion"
96 Printlog "Duration: "+ WieLange ( StartZeit )
97 Printlog "Date: " + Date + " Time: " + Time
99 end sub
101 sub LoadIncludeFiles
102 use "global\system\includes\master.inc"
103 use "global\system\includes\gvariabl.inc"
104 Call GetUseFiles
105 gApplication = "WRITER"
106 end Sub