xref: /trunk/main/vcl/os2/source/app/sallang.cxx (revision fc9fd3f1)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SALLANG_HXX
25 #include <os2/sallang.hxx>
26 #endif
27 
28 // =======================================================================
29 
30 // -----------------------------------------------------------------------
31 // English (US/UK/AUS/CAN/NZ/EIRE/SAFRICA/JAMAICA/CARRIBEAN)
32 static const wchar_t* aImplLangEnglishTab[LSTR_COUNT] =
33 {
34 	L"Shift",                                                // LSTR_KEY_SHIFT
35 	L"Ctrl",                                                 // LSTR_KEY_CTRL
36 	L"Alt",                                                  // LSTR_KEY_ALT
37 	L"Up",                                                   // LSTR_KEY_UP
38 	L"Down",                                                 // LSTR_KEY_DOWN
39 	L"Left",                                                 // LSTR_KEY_LEFT
40 	L"Right",                                                // LSTR_KEY_RIGHT
41 	L"Home",                                                 // LSTR_KEY_HOME
42 	L"End",                                                  // LSTR_KEY_END
43 	L"PageUp",                                               // LSTR_KEY_PAGEUP
44 	L"PageDown",                                             // LSTR_KEY_PAGEDOWN
45 	L"Enter",                                                // LSTR_KEY_RETURN
46 	L"Esc",                                                  // LSTR_KEY_ESC
47 	L"Tab",                                                  // LSTR_KEY_TAB
48 	L"Backspace",                                            // LSTR_KEY_BACKSPACE
49 	L"Space",                                                // LSTR_KEY_SPACE
50 	L"Insert",                                               // LSTR_KEY_INSERT
51 	L"Del",                                                  // LSTR_KEY_DELETE
52 };
53 
54 // =======================================================================
55 
ImplGetLangTab(LanguageType eLang)56 const sal_Unicode** ImplGetLangTab( LanguageType eLang )
57 {
58 	// Sprachtabelle ermitteln
59 	const wchar_t** pLangTab;
60 	//switch ( International::GetNeutralLanguage( eLang ) )
61 	switch ( eLang )
62 	{
63 #if 0
64 		case LANGUAGE_DANISH:
65 			pLangTab = aImplLangDanishTab;
66 			break;
67 
68 		case LANGUAGE_DUTCH:
69 		case LANGUAGE_DUTCH_BELGIAN:
70 			pLangTab = aImplLangDutchTab;
71 			break;
72 
73 		case LANGUAGE_FINNISH:
74 			pLangTab = aImplLangFinnishTab;
75 			break;
76 
77 		case LANGUAGE_FRENCH:
78 			pLangTab = aImplLangFrenchTab;
79 			break;
80 
81 		case LANGUAGE_GERMAN:
82 			pLangTab = aImplLangGermanTab;
83 			break;
84 
85 		case LANGUAGE_ITALIAN:
86 			pLangTab = aImplLangItalianTab;
87 			break;
88 
89 		case LANGUAGE_NORWEGIAN:
90 		case LANGUAGE_NORWEGIAN_BOKMAL:
91 			pLangTab = aImplLangNorwegianTab;
92 			break;
93 
94 		case LANGUAGE_PORTUGUESE:
95 		case LANGUAGE_PORTUGUESE_BRAZILIAN:
96 			pLangTab = aImplLangPortugueseTab;
97 			break;
98 
99 		case LANGUAGE_SPANISH:
100 			pLangTab = aImplLangSpanishTab;
101 			break;
102 
103 		case LANGUAGE_SWEDISH:
104 			pLangTab = aImplLangSwedishTab;
105 			break;
106 #endif
107 		default:
108 			pLangTab = aImplLangEnglishTab;
109 			break;
110 	}
111 
112 	return (const sal_Unicode**)pLangTab;
113 }
114