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: configuration.inc,v $
13 '* last change: $Author: obo $ $Date: 2008-07-25 08:02:50 $
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 : Function Test for known global Issues
38 '\*****************************************************************
40 sub sToolsCustomizeKeyboardFunction
41 dim aApplication() as string
43 dim lList(1000) as string
46 ' go through all applications:
47 aApplication()=array("WRITER","MASTERDOCUMENT","HTML","CALC","IMPRESS","DRAW","MATH","DATABASE")
48 a=uBound(aApplication())
52 if ( i = 7 and gtSysName = "Solaris x86" ) then
53 qaerrorlog( "#i62423# Solaris: Crash when opening new database" )
55 gApplication = aApplication(i)
56 tToolsCustomizeKeyboardFunction(lList())
62 a = ListCount(lList())
63 printlog "Count1: " + a
68 if (lList(i) <> sTemp) then
69 printlog ""+i+": '" + lList(i) + "'"
74 printlog "Number of unique Errors: " + b
78 testcase tToolsCustomizeKeyboardFunction(lList())
79 '/// idea from AS find .uno: in Keyboard Function list ///'
80 dim sKeys(300,2) as string
81 dim i,a,b,c,d as integer
82 dim sTemp, sTemp2 as string
83 dim iBugCount(10) as integer
84 dim bErrorFound as boolean
85 dim i43969 as string ' ALL
86 dim i60617 as string ' ALL
87 dim i64346 as string ' ALL
88 dim i80850 as string ' ALL
89 dim i84982 as string ' ALL
98 i60617 = ".uno:ContinueNumbering"
99 i43969 = ".uno:MacroOrganizer"
100 i64346 = ".uno:SendMailDocAs"
101 i80850 = ".uno:ToggleFormula.uno:AssignMacro"
102 i84982 = ".uno:FontDialogForParagraph"
103 i84983 = ".uno:DBNewReportWithPreSelection"
104 i87950 = ".uno:DBMigrateScripts"
105 i87951 = ".uno:DeleteAllNotes.uno:DeleteAuthor.uno:DeleteNote.uno:HideAllNotes.uno:HideAuthor.uno:HideNote"
106 i87952 = ".uno:InsertApplet"
107 i92080 = ".uno:SaveGraphic"
108 i96322 = ".uno:ActivateStyleApply"
109 i100037 = ".uno:AcceptTracedChange, .uno:DeleteComment, .uno:RejectTracedChange, .uno:ReplyNote, .uno:TaskPaneInsertPage"
111 '/// open application ///'
114 '/// Tools->Configure ///'
118 '/// switch to tabpage 'Keyboard' ///'
119 Messagebox.SetPage TabTastatur ' 2 ------------------
120 Kontext "TabTastatur"
123 case 1: '/// Check Checkbox 'StarOffice' ///'
125 Printlog ("-------------------- Keylist for StarOpenOfficeSuite.org --------------------")
126 case 2: '/// Check Checkbox '$APPLICATION' ///'
128 Printlog ("-------------------- Keylist for "+gApplication+" ------------------------")
130 i = Bereich.getItemCount
132 Bereich.select(a,true)
133 sTemp = Bereich.getSelText
134 for b=1 to Funktion.getItemCount
135 sTemp2 = Funktion.getItemText(b)
136 d = inStr(sTemp2,":")
138 ' translators use ':'-> check if ' ' follows or CHR$ < 128
139 ' asc() returns 16 bit values in an integer -> sign is affected :-( -> use abs(asc())
140 if (((mid(sTemp2,d+1,1)<>" ")AND(abs(asc(mid(sTemp2,d+1,1)))<128)) AND (abs(asc(mid(sTemp2,d-1,1)))<128))then
141 listAppend(lList(),sTemp2)
143 if (inStr(i60617,sTemp2)>0) then
144 qaErrorLog "#i60617# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
147 if (inStr(sTemp2,i64346)>0) then
148 qaErrorLog "#i64346# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
151 if (inStr(i43969,sTemp2)>0) then
152 qaErrorLog "#i41265# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
155 if (inStr(i80850,sTemp2)>0) then
156 qaErrorLog "#i80850# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
159 if (inStr(i84982,sTemp2)>0) then
160 qaErrorLog "#i84982# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
163 if (inStr(i84983,sTemp2)>0) then
164 qaErrorLog "#i84983# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
167 if (inStr(i87950,sTemp2)>0) then
168 qaErrorLog "#i87950# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
171 if (inStr(i87951,sTemp2)>0) then
172 qaErrorLog "#i87951# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
175 if (inStr(i87952,sTemp2)>0) then
176 qaErrorLog "#i87952# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
179 if (inStr(i92080,sTemp2)>0) then
180 qaErrorLog "#i92080# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
183 if (inStr(i96322,sTemp2)>0) then
184 qaErrorLog "#i96322# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
188 if (inStr(i100037,sTemp2)>0) then
189 qaErrorLog "#i100037# ("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
192 if ( not bErrorFound ) then
193 warnlog "("+c+"/"+a+"/"+b+"): Provide real Name for Function: '"+sTemp+"'::'"+sTemp2+"'"
198 ' printlog "("+c+"/"+a+"/"+b+"): '"+sTemp+"'::'"+sTemp2+"'"
203 ' if (iBugCount(3) > 0) then WarnLog ""+iBugCount(3)+": Missing Name for funktion; is .uno:..."
204 '/// cancel dialog 'Customize' ///'
206 '/// close application ///'
210 testcase tToolsOptionsAPIConfiguration
212 Dim sComXML as String
213 Dim sHelpTip as String
214 Dim sHelpExtendedTip as String
215 Dim bHelpTip as Boolean
216 Dim bHelpExtendedTip as Boolean
217 Dim Silent as Boolean
218 Dim sTempPath as string
219 Dim sTempList(10) as string
220 Dim sLocalString as string
222 'Used for GetXMLValueGlobal (DEPRECATED function!) to get no output in resultfile.
227 '///+<li>Tools / Language Settings / Languages
228 call hToolsOptions ("Languagesettings", "Languages")
229 '///+ Check if Asian language support is enabled and verify <i>gAsianSup</i> variable.
230 if (gAsianSup <> Aktivieren.IsChecked) then
231 warnlog "gAsianSup differs from UI"
233 '///+ Check if CTL (=complex text layout) is enabled amd set <i>gCTLSup</i> variable TRUE or FALSE.
234 if (gCTLSup <> ComplexScriptEnabled.IsChecked) then
235 warnlog "gCTLSup differs from UI"
238 '///+<li>Check <i>gAccessibility</i> for Win32 (from Options UI)</li>
239 call hToolsOptions ("STAROFFICE", "ACCESSIBILITY")
241 if (gPlatGroup <> "unx") then
242 if (gAccessibility <> SupportAssistiveTechnologyTools.IsChecked) then
243 warnlog "gAccessibility differs from UI"
247 if (NOT gAccessibility) then
248 warnlog "gAccessibility differs from UI - catch"
252 '///+ <li>Check the switch to the <i>system</i> dialogs to "internal" dialogs.
253 call hToolsOptions ("StarOffice", "General")
254 if StarOfficeDialogeBenutzen.Exists then
255 if (NOT StarOfficeDialogeBenutzen.isChecked) then
256 warnlog "StarOfficeDialogeBenutzen is not checked"
260 '///+<li>Checking the <i>bubble help</i>.
261 call hToolsOptions ("StarOffice", "General")
262 if (Tips.isChecked) then
263 warnlog "Help Tip is checked"
267 '///+<li>Checking the <i>work</i> directory in Tools / Options,
268 call hToolsOptions ("StarOffice", "Paths")
270 case 01 : iJump = 6 ' English (USA)
271 case 03 : iJump = 7 ' Portuguese
272 case 07 : iJump = 0 ' Russian
273 case 30 : iJump = 0 ' Greek
274 case 31 : iJump = 0 ' Netherlands
275 case 33 : iJump = 0 ' French
276 case 34 : iJump = 0 ' Spanish
277 case 35 : iJump = 0 ' Finnish
278 case 36 : iJump = 0 ' Hungaria
279 case 37 : iJump = 0 ' Catalan
280 case 39 : iJump = 0 ' Italian
281 case 42 : iJump = 0 ' Czech
282 case 43 : iJump = 0 ' Slowak
283 case 44 : iJump = 0 ' English (GB)
284 case 45 : iJump = 0 ' Danish
285 case 46 : iJump = 0 ' Swedish
286 case 47 : iJump = 0 ' Norwegian
287 case 48 : iJump = 0 ' Polish
288 case 49 : iJump = 1 ' German
289 case 51 : iJump = 0 ' Slowak
290 case 55 : iJump = 0 ' Portuguese (Brazil)
291 case 66 : iJump = 0 ' Thai
292 case 81 : iJump = 0 ' Japanese ' disabled, because locale dependant!
293 case 82 : iJump = 0 ' Korean ' disabled, because locale dependant!
294 case 86 : iJump = 0 ' Chinese (simplified) ' disabled, because locale dependant!
295 case 88 : iJump = 0 ' Chinese (traditional) ' disabled, because locale dependant!
296 case 90 : iJump = 0 ' Turkish
297 case 91 : iJump = 0 ' Hindi
298 case 96 : iJump = 0 ' Arab
299 case 97 : iJump = 0 ' Hebrew
300 case else : qaErrorlog "The work-dir can't changed to the internal office-work-dir! Please insert the language in this list!"
305 'DEBUG: printlog "** master.inc::mMakeGeneralOptions::iJump(" & iSprache & ") = " & iJump
306 sLocalString = Typ.getItemText(iJump,3) ' works in gh13
307 if sLocalString = "" then
308 sLocalString = Typ.getItemText(iJump,2) ' fallback for before gh13
310 if (sLocalString <> ConvertPath (gOfficePath + "user\work")) then
311 warnlog ("Work Directory differs from API setting? : is: '" + sLocalString + "' should: '" + ConvertPath (gOfficePath + "user\work") + "'")
314 'TODO: figure out which Entry it could be
315 for i = 1 to Typ.getItemCount
316 if (Typ.getItemText(i,2) = ConvertPath (gOfficePath + "user\work")) then
317 qaErrorLog ("found WorkDirectory at position: " + i)
322 warnlog ("No workdirectory candidate found.")
326 '///+<li>Checking the directory for temporary files (=temp-path).
328 case 01 : iJump = 8 ' English (USA)
329 case 03 : iJump = 3 ' Portuguese
330 case 07 : iJump = 0 ' Russian
331 case 30 : iJump = 0 ' Greek
332 case 31 : iJump = 0 ' Netherlands
333 case 33 : iJump = 0 ' French
334 case 34 : iJump = 1 ' Spanish
335 case 35 : iJump = 0 ' Finnish
336 case 36 : iJump = 0 ' Hungaria
337 case 37 : iJump = 0 ' Catalan
338 case 39 : iJump = 0 ' Italian
339 case 42 : iJump = 0 ' Czech
340 case 43 : iJump = 0 ' Slowak
341 case 44 : iJump = 0 ' English (GB)
342 case 45 : iJump = 0 ' Danish
343 case 46 : iJump = 0 ' Swedish
344 case 47 : iJump = 0 ' Norwegian
345 case 48 : iJump = 0 ' Polish
346 case 49 : iJump = 8 ' German
347 case 51 : iJump = 0 ' Slowak
348 case 55 : iJump = 1 ' Portuguese (Brazil)
349 case 66 : iJump = 0 ' Thai
350 case 81 : iJump = 0 ' Japanese ' disabled, because locale dependant!
351 case 82 : iJump = 0 ' Korean ' disabled, because locale dependant!
352 case 86 : iJump = 0 ' Chinese (simplified) ' disabled, because locale dependant!
353 case 88 : iJump = 0 ' Chinese (traditional) ' disabled, because locale dependant!
354 case 90 : iJump = 0 ' Turkish
355 case 91 : iJump = 0 ' Hindi
356 case 96 : iJump = 0 ' Arab
357 case 97 : iJump = 0 ' Hebrew
358 case else : qaErrorLog "The temp-dir can't changed to the internal office-temp-dir! Please insert the language in this list!"
362 'DEBUG: printlog "** master.inc::mMakeGeneralOptions::iJump(" & iSprache & ") = " & iJump
363 sLocalString = Typ.getItemText(iJump,3) ' works in gh13
364 if sLocalString = "" then
365 sLocalString = Typ.getItemText(iJump,2) ' fallback for before gh13
367 if (sLocalString <> ConvertPath (gOfficePath + "user\temp")) then
368 warnlog ("Temp Directory differs from API setting? : is: '" + sLocalString + "' should: '" + ConvertPath (gOfficePath + "user\temp") + "'")
371 'TODO: figure out which Entry it could be
372 for i = 1 to Typ.getItemCount
373 if (Typ.getItemText(i,2) = ConvertPath (gOfficePath + "user\temp")) then
374 qaErrorLog ("found TempDirectory at position: " + i)
379 warnlog ("No tempdirectory candidate found.")
383 Kontext "ExtrasOptionenDlg"
387 warnlog "Error during walking through optionsdialog"