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_tools.inc,v $
13 '* last change: $Author: jsi $ $Date: 2008-06-16 12:19:05 $
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 : Tools for CJK feature test in Writer
38 '\***********************************************************************
41 '******************************************************************************
42 ' This function will check Asina Language Support on/off based on the parameter
43 '******************************************************************************
44 function CheckAsianLanguageSupport( sSupport as String ) as String
47 Call hToolsOptions("LANGUAGESETTINGS","LANGUAGES")
49 if ( aktivieren.exists() ) then
50 if ( aktivieren.isEnabled() ) then
51 if ( lcase( sSupport ) = "on" ) then
52 printlog( "Enabling Asian Language Support" )
55 printlog( "Disabling Asian Language Support" )
59 warnlog( "Activate Asian Language Support checkbox is disabled" )
62 warnlog( "Activate Asian Language Support checkbox is missing" )
65 Kontext "ExtrasOptionenDlg"
66 ExtrasOptionenDlg.OK()
72 '***************************************************************
73 ' Start up Navigator , and set focus to the correct position
74 '**************************************************************
75 function fStartupNavigator(navigatorItem as String , subItemNum as Integer)
79 if NOT Navigator.Exists then
80 ' If you don' t ask for the Navigator and it's open it would be clodes and test fails !
83 Kontext "NavigatorWriter"
84 if Auswahlliste.GetItemCount < 11 then
87 if Auswahlliste.GetItemCount > 11 then
90 Auswahlliste.TypeKeys "-"
93 Kontext "NavigatorWriter"
94 Auswahlliste.TypeKeys "<Up>", 11
96 Select case navigatorItem
97 case "Headings" : goto GoON
98 case "Tables" : Auswahlliste.TypeKeys "<down>"
99 case "TextFrame" : Auswahlliste.TypeKeys "<down>" , 2
100 case "Graphics" : Auswahlliste.TypeKeys "<down>" , 3
101 case "OLEObject" : Auswahlliste.TypeKeys "<down>" , 4
102 case "Bookmarks" : Auswahlliste.TypeKeys "<down>" , 5
103 case "Section" : Auswahlliste.TypeKeys "<down>" , 6
104 case "Hyperlinks" : Auswahlliste.TypeKeys "<down>" , 7
105 case "References" : Auswahlliste.TypeKeys "<down>" , 8
106 case "Indexes" : Auswahlliste.TypeKeys "<down>" , 9
107 case "Notes" : Auswahlliste.TypeKeys "<down>" , 10
108 case "DrawObjects" : Auswahlliste.TypeKeys "<down>" , 11
112 Auswahlliste.TypeKeys "<return>"
114 Toolbox.Click Inhaltsansicht
116 Auswahlliste.TypeKeys "<Up>",subItemNum
124 function fCloseNavigator
125 '/// This function will close Navigator dialogure
129 if ( Navigator.exists() ) then
131 printlog( "Closed navigator" )
133 printlog( "Navigator not open." )
139 '****************************************************************************
140 ' This routine will return the Country name based on CountryID
141 '*****************************************************************************
142 function fGetCountryName( CountryID as Integer ) as String
145 case 01 : ' English (USA)
146 select case CountryID
147 case 1: fGetCountryName = "English (USA)"
148 case 33: fGetCountryName = "French (France)"
149 case 34: fGetCountryName = "Spanish (Spain)"
150 case 39: fGetCountryName = "Italian (Italy)"
151 case 46: fGetCountryName = "Swedish (Sweden)"
152 case 49: fGetCountryName = "German (Germany)"
153 case 55: fGetCountryName = "Portuguese (Brazil)"
154 case 81: fGetCountryName = "Japanese"
155 case 82: fGetCountryName = "Korean (RoK)"
156 case 86: fGetCountryName = "Chinese (simplified)"
157 case 88: fGetCountryName = "Chinese (traditional)"
159 QAErrorLog "Now, the test does not support for the language " +iSprache
163 select case CountryID
164 case 1: fGetCountryName = "Anglais (U.S.A.)"
165 case 33: fGetCountryName = "Français (France)"
166 case 34: fGetCountryName = "Espagnol (Espagne)"
167 case 39: fGetCountryName = "Italien (Italie)"
168 case 46: fGetCountryName = "Suédois (Suède)"
169 case 49: fGetCountryName = "Allemand (Allemagne)"
170 case 55: fGetCountryName = "Portugais (Brésil)"
171 case 81: fGetCountryName = "Japonais"
172 case 82: fGetCountryName = "Coréen"
173 case 86: fGetCountryName = "Chinois (simple)"
174 case 88: fGetCountryName = "Chinois (traditionnel)"
176 QAErrorLog "Now, the test does not support for the language " +iSprache
180 select case CountryID
181 case 1: fGetCountryName = "Inglés (EE.UU.)"
182 case 33: fGetCountryName = "Francés (Francia)"
183 case 34: fGetCountryName = "Español (España)"
184 case 39: fGetCountryName = "Italiano (Italia)"
185 case 46: fGetCountryName = "Sueco (Suecia)"
186 case 49: fGetCountryName = "Alemán (Alemania)"
187 case 55: fGetCountryName = "Portugués (Brasil)"
188 case 81: fGetCountryName = "Japonés"
189 case 82: fGetCountryName = "Coreano"
190 case 86: fGetCountryName = "Chino (simple)"
191 case 88: fGetCountryName = "Chino (tradicional)"
193 QAErrorLog "Now, the test does not support for the language " +iSprache
197 select case CountryID
198 case 1: fGetCountryName = "Inglese (US)"
199 case 33: fGetCountryName = "Francese (Francia)"
200 case 34: fGetCountryName = "Spagnolo (Spagna)"
201 case 39: fGetCountryName = "Italiano (Italia)"
202 case 46: fGetCountryName = "Svedese (Svezia)"
203 case 49: fGetCountryName = "Tedesco (Germania)"
204 case 55: fGetCountryName = "Portoghese (Brasile)"
205 case 81: fGetCountryName = "Giapponese"
206 case 82: fGetCountryName = "Coreano"
207 case 86: fGetCountryName = "Cinese (semplificato)"
208 case 88: fGetCountryName = "Cinese (tradizionale)"
210 QAErrorLog "Now, the test does not support for the language " +iSprache
214 select case CountryID
215 case 1: fGetCountryName = "engelska"
216 case 33: fGetCountryName = "franska (Frankrike)"
217 case 34: fGetCountryName = "spanska (Spanien)"
218 case 39: fGetCountryName = "italienska (Italien)"
219 case 46: fGetCountryName = "svenska (Sverige)"
220 case 49: fGetCountryName = "tyska (Tyskland)"
221 case 55: fGetCountryName = "portugisiska (Brasilien)"
222 case 81: fGetCountryName = "Japanska"
223 case 82: fGetCountryName = "koreanska"
224 case 86: fGetCountryName = "kinesiska (enkel)"
225 case 88: fGetCountryName = "kinesiska (trad.)"
227 QAErrorLog "Now, the test does not support for the language " +iSprache
231 select case CountryID
232 case 1: fGetCountryName = "Englisch (USA)"
233 case 33: fGetCountryName = "Französisch (Frankreich)"
234 case 34: fGetCountryName = "Spanisch (Spanien)"
235 case 39: fGetCountryName = "Italienisch (Italien)"
236 case 46: fGetCountryName = "Schwedisch (Schweden)"
237 case 49: fGetCountryName = "Deutsch (Deutschland)"
238 case 55: fGetCountryName = "Portugiesisch (Brasilien)"
239 case 81: fGetCountryName = "Japanisch"
240 case 82: fGetCountryName = "Koreanisch (RoK)"
241 case 86: fGetCountryName = "Chinesisch (einfach)"
242 case 88: fGetCountryName = "Chinesisch (Trad.)"
244 QAErrorLog "Now, the test does not support for the language " +iSprache
247 case 55 : ' Portuguese
248 select case CountryID
249 case 1: fGetCountryName = "Inglês (EUA)"
250 case 33: fGetCountryName = "Francês (França)"
251 case 34: fGetCountryName = "Espanhol (Espanha)"
252 case 39: fGetCountryName = "Italiano (Itália)"
253 case 46: fGetCountryName = "Sueco (Suécia)"
254 case 49: fGetCountryName = "Alemão (Alemanha)"
255 case 55: fGetCountryName = "Português (Brasil)"
256 case 81: fGetCountryName = "Japonês"
257 case 82: fGetCountryName = "Coreano (RoK)"
258 case 86: fGetCountryName = "Chinês (simplificado)"
259 case 88: fGetCountryName = "Chinês (tradicional)"
261 QAErrorLog "Now, the test does not support for the language " +iSprache
265 select case CountryID
266 case 1: fGetCountryName = "英語(米国)"
267 case 33: fGetCountryName = "フランス語(フランス)"
268 case 34: fGetCountryName = "スペイン語(スペイン)"
269 case 39: fGetCountryName = "イタリア語(イタリア)"
270 case 46: fGetCountryName = "スウェーデン語(スウェーデン)"
271 case 49: fGetCountryName = "ドイツ語(ドイツ)"
272 case 55: fGetCountryName = "ポルトガル語(ブラジル)"
273 case 81: fGetCountryName = "日本語"
274 case 82: fGetCountryName = "韓国語"
275 case 86: fGetCountryName = "中国語(簡体字)"
276 case 88: fGetCountryName = "中国語(繁体字)"
278 QAErrorLog "Now, the test does not support for the language " +iSprache
282 select case CountryID
283 case 1: fGetCountryName = "영어(미국)"
284 case 33: fGetCountryName = "스페인어(스페인)"
285 case 34: fGetCountryName = "프랑스어(프랑스)"
286 case 39: fGetCountryName = "이탈리아어 (이태리)"
287 case 46: fGetCountryName = "스웨덴어(스웨덴)"
288 case 49: fGetCountryName = "독일어(독일)"
289 case 55: fGetCountryName = "포르투갈어(브라질)"
290 case 81: fGetCountryName = "일본어"
291 case 82: fGetCountryName = "한국어"
292 case 86: fGetCountryName = "중국어(간체)"
293 case 88: fGetCountryName = "중국어(번체)"
295 QAErrorLog "Now, the test does not support for the language " +iSprache
298 case 86 : ' Chinese (simplified)
299 select case CountryID
300 case 1: fGetCountryName = "英语(美国)"
301 case 33: fGetCountryName = "法语(法国)"
302 case 34: fGetCountryName = "西班牙语(西班牙)"
303 case 39: fGetCountryName = "意大利语(意大利)"
304 case 46: fGetCountryName = "瑞典语(瑞典)"
305 case 49: fGetCountryName = "德语(德国)"
306 case 55: fGetCountryName = "葡萄牙语(巴西)"
307 case 81: fGetCountryName = "日语"
308 case 82: fGetCountryName = "朝鲜语"
309 case 86: fGetCountryName = "中文(简体字)"
310 case 88: fGetCountryName = "中文(繁体字)"
312 QAErrorLog "Now, the test does not support for the language " +iSprache
316 case 88 : ' Chinese (traditional)
317 select case CountryID
318 case 1: fGetCountryName = "英語(美國)"
319 case 33: fGetCountryName = "法語(法國)"
320 case 34: fGetCountryName = "西班牙語(西班牙)"
321 case 39: fGetCountryName = "意大利語(意大利)"
322 case 46: fGetCountryName = "瑞典語(瑞典)"
323 case 49: fGetCountryName = "德語(德國)"
324 case 55: fGetCountryName = "葡萄牙語(巴西)"
325 case 81: fGetCountryName = "日文"
326 case 82: fGetCountryName = "韓語"
327 case 86: fGetCountryName = "中文(簡體字)"
328 case 88: fGetCountryName = "中文(繁體)"
330 QAErrorLog "Now, the test does not support for the language " +iSprache
333 case else : ' Fallback
334 QAErrorLog "Now, the test does not support for the language " +iSprache