Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
5 : : * This Source Code Form is subject to the terms of the Mozilla Public
6 : : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
11 : : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : : * contributor license agreements. See the NOTICE file distributed
13 : : * with this work for additional information regarding copyright
14 : : * ownership. The ASF licenses this file to you under the Apache
15 : : * License, Version 2.0 (the "License"); you may not use this file
16 : : * except in compliance with the License. You may obtain a copy of
17 : : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : : */
19 : :
20 : :
21 : : /****************** I N C L U D E S **************************************/
22 : : // C and C++ Includes.
23 : : #include <stdlib.h>
24 : : #include <stdio.h>
25 : : #include <string.h>
26 : :
27 : : #include <i18npool/mslangid.hxx>
28 : : #include <comphelper/string.hxx>
29 : : #include <tools/rc.h>
30 : : #include <tools/color.hxx>
31 : :
32 : : #include <vclrsc.hxx>
33 : : #include <rscconst.hxx>
34 : : #include <rscarray.hxx>
35 : : #include <rscclass.hxx>
36 : : #include <rsccont.hxx>
37 : : #include <rscdb.hxx>
38 : :
39 : :
40 : : #include <rsclex.hxx>
41 : : #include <rscyacc.hxx>
42 : :
43 : : #include <boost/unordered_map.hpp>
44 : :
45 : : /****************** M A C R O S ******************************************/
46 : 162720 : void RscTypCont::SETCONST( RscConst * pClass, const char * szString, sal_uInt32 nVal )
47 : : {
48 : : #if OSL_DEBUG_LEVEL > 2
49 : : fprintf( stderr, "setconst : %s\n", szString );
50 : : #endif
51 : : pClass->SetConstant( aNmTb.Put( szString,
52 : 162720 : CONSTNAME, nVal ), nVal );
53 : 162720 : }
54 : :
55 : 14400 : void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
56 : : {
57 : : #if OSL_DEBUG_LEVEL > 2
58 : : fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
59 : : #endif
60 : : pClass->SetConstant( aNmTb.Put( nName,
61 : 14400 : CONSTNAME, nVal ), nVal );
62 : 14400 : }
63 : :
64 : : /****************** C O D E **********************************************/
65 : : /*************************************************************************
66 : : |* RscTypCont::InitLangType()
67 : : |*
68 : : |* Beschreibung
69 : : *************************************************************************/
70 : :
71 : : typedef boost::unordered_map< rtl::OString, sal_uInt32, rtl::OStringHash > langmap;
72 [ + - ]: 720 : static langmap ULong_Iso_map;
73 : :
74 : 512760 : sal_uInt32 GetLangId(const rtl::OString &rLang)
75 : : {
76 [ + - ]: 512760 : langmap::iterator pIter = ULong_Iso_map.find( rLang );
77 [ + - ][ + + ]: 512760 : if ( pIter != ULong_Iso_map.end())
78 [ + - ]: 121800 : return pIter->second;
79 : 512760 : return 0;
80 : : }
81 : :
82 : 720 : void RscLangEnum::Init( RscNameTable& rNames )
83 : : {
84 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
85 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
86 : :
87 : 720 : sal_Int32 nIndex = 0;
88 : 720 : mnLangId = 0x400; // stay away from selfdefined...
89 : : const MsLangId::IsoLangEntry* pLangEntry;
90 : :
91 [ + - ][ + - ]: 277920 : while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW ))
[ + + ][ + + ]
92 : : {
93 : : #if OSL_DEBUG_LEVEL > 2
94 : : fprintf( stderr, "ISO Language in : %d\n",
95 : : (int)nIndex,
96 : : pLangEntry->mnLang,
97 : : MsLangId::convertLanguageToIsoByteString( pLangEntry->mnLang ).getStr() );
98 : : #endif
99 : 277200 : rtl::OString aLang(pLangEntry->maLangStr, strlen(pLangEntry->maLangStr));
100 : 277200 : rtl::OString aCountry(pLangEntry->maCountry, strlen(pLangEntry->maCountry));
101 [ + + ][ + + ]: 277200 : if ( aCountry.isEmpty() || aLang.equalsIgnoreAsciiCase(aCountry) )
[ + + ]
102 : : {
103 [ + - ][ + - ]: 41760 : SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
104 [ + - ][ + + ]: 41760 : if ( ! GetLangId( aLang ))
105 [ + - ]: 32400 : ULong_Iso_map[ aLang ] = mnLangId;
106 : : #if OSL_DEBUG_LEVEL > 2
107 : : fprintf( stderr, "ISO Language out: %s 0x%lx\n", aLang.getStr(), mnLangId );
108 : : #endif
109 : 41760 : mnLangId++;
110 : : }
111 : : else
112 : : {
113 [ + - ][ + - ]: 235440 : SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
114 [ + - ][ + + ]: 235440 : if ( ! GetLangId( aLang ))
115 [ + - ]: 130320 : ULong_Iso_map[ aLang ] = mnLangId;
116 : : #if OSL_DEBUG_LEVEL > 2
117 : : fprintf( stderr, "ISO Language out: %s 0x%lx", aLang.getStr(), mnLangId );
118 : : #endif
119 : 235440 : mnLangId++;
120 : 235440 : aLang = aLang + rtl::OString( '-' ) + aCountry.toAsciiUpperCase();
121 [ + - ][ + - ]: 235440 : SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
122 [ + - ][ + + ]: 235440 : if ( ! GetLangId( aLang ))
123 [ + - ]: 228240 : ULong_Iso_map[ aLang ] = mnLangId;
124 : : #if OSL_DEBUG_LEVEL > 2
125 : : fprintf( stderr, " %s 0x%lx\n", aLang.getStr(), mnLangId );
126 : : #endif
127 : 235440 : mnLangId++;
128 : : // hack - survive "x-no-translate"
129 [ + + ]: 235440 : if (aLang.equalsL(RTL_CONSTASCII_STRINGPARAM("en-US")))
130 : : {
131 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
132 : 720 : mnLangId++;
133 : : }
134 : : }
135 : 277200 : nIndex++;
136 : 277200 : }
137 : :
138 : 720 : rtl::OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
139 [ - + ]: 720 : if ( !aEnvIsoTokens.isEmpty() )
140 : : {
141 : 0 : rtl::OString aIsoToken;
142 : 0 : sal_uInt16 nTokenCounter = 0;
143 : 0 : sal_Bool bOneMore = 1;
144 [ # # ]: 0 : while ( bOneMore )
145 : : {
146 : 0 : aIsoToken = comphelper::string::getToken(aEnvIsoTokens, nTokenCounter, ' ');
147 [ # # ]: 0 : if ( !aIsoToken.isEmpty() )
148 : : {
149 [ # # ][ # # ]: 0 : SetConstant( rNames.Put( aIsoToken.getStr(), CONSTNAME, mnLangId ), mnLangId );
150 [ # # ][ # # ]: 0 : if ( ! GetLangId( aIsoToken ))
151 [ # # ]: 0 : ULong_Iso_map[ aIsoToken ] = mnLangId;
152 : : #if OSL_DEBUG_LEVEL > 2
153 : : fprintf( stderr, "Env ISO Language out: %s 0x%lx\n", aIsoToken.getStr(), mnLangId );
154 : : #endif
155 : 0 : mnLangId++;
156 : : }
157 : : else
158 : 0 : bOneMore = 0;
159 : 0 : nTokenCounter++;
160 : 0 : }
161 : : }
162 : :
163 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER1", CONSTNAME, LANGUAGE_USER1 ), LANGUAGE_USER1 );
164 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER2", CONSTNAME, LANGUAGE_USER2 ), LANGUAGE_USER2 );
165 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER3", CONSTNAME, LANGUAGE_USER3 ), LANGUAGE_USER3 );
166 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER4", CONSTNAME, LANGUAGE_USER4 ), LANGUAGE_USER4 );
167 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER5", CONSTNAME, LANGUAGE_USER5 ), LANGUAGE_USER5 );
168 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER6", CONSTNAME, LANGUAGE_USER6 ), LANGUAGE_USER6 );
169 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER7", CONSTNAME, LANGUAGE_USER7 ), LANGUAGE_USER7 );
170 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "LANGUAGE_USER8", CONSTNAME, LANGUAGE_USER8 ), LANGUAGE_USER8 );
171 [ + - ][ + - ]: 720 : SetConstant( rNames.Put( "EXTERN", CONSTNAME, LANGUAGE_USER9 ), LANGUAGE_USER9 );
172 : 720 : }
173 : :
174 : 0 : Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
175 : : {
176 : 0 : Atom nResult = 0;
177 : : KEY_STRUCT aStruct;
178 [ # # ][ # # ]: 0 : if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) )
[ # # ]
179 : : {
180 [ # # ][ # # ]: 0 : SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId );
181 : : // insert new lang to ULong_Iso_map
182 : 0 : rtl::OString aLang( pLang );
183 [ # # ][ # # ]: 0 : if ( ! GetLangId( aLang ))
184 [ # # ]: 0 : ULong_Iso_map[ aLang ] = mnLangId;
185 : : // increase id counter
186 : 0 : mnLangId++;
187 : : }
188 : : #if OSL_DEBUG_LEVEL > 2
189 : : fprintf( stderr, "AddLanguage( %s ) = %d\n", pLang, nResult );
190 : : #endif
191 : 0 : return nResult;
192 : : }
193 : :
194 : 720 : RscEnum * RscTypCont::InitLangType()
195 : : {
196 : 720 : aLangType.Init( aNmTb );
197 : 720 : return( &aLangType );
198 : : }
199 : :
200 : : /*************************************************************************
201 : : |*
202 : : |* RscTypCont::InitFieldUnitsType()
203 : : |*
204 : : *************************************************************************/
205 : 720 : RscEnum * RscTypCont::InitFieldUnitsType()
206 : : {
207 : : RscEnum * pFieldUnits;
208 [ + - ][ + - ]: 720 : pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
[ + - ]
209 : :
210 : 720 : SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
211 : 720 : SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
212 : 720 : SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
213 : 720 : SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
214 : 720 : SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
215 : 720 : SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
216 : 720 : SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
217 : 720 : SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
218 : 720 : SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
219 : 720 : SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
220 : 720 : SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
221 : 720 : SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
222 : 720 : SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
223 : 720 : SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
224 : 720 : SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
225 : :
226 : 720 : return pFieldUnits;
227 : : }
228 : :
229 : : /*************************************************************************
230 : : |*
231 : : |* RscTypCont::InitTimeFieldFormat()
232 : : |*
233 : : *************************************************************************/
234 : 720 : RscEnum * RscTypCont::InitTimeFieldFormat()
235 : : {
236 : : RscEnum * pTimeFieldFormat;
237 : 1440 : pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
238 [ + - ][ + - ]: 720 : RSC_NOTYPE );
[ + - ]
239 : :
240 : 720 : SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
241 : 720 : SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
242 : 720 : SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
243 : :
244 : 720 : return pTimeFieldFormat;
245 : : }
246 : :
247 : : /*************************************************************************
248 : : |*
249 : : |* RscTypCont::InitColor()
250 : : |*
251 : : *************************************************************************/
252 : 720 : RscEnum * RscTypCont::InitColor(){
253 : : RscEnum * pColor;
254 [ + - ][ + - ]: 720 : pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
[ + - ]
255 : :
256 : 720 : SETCONST( pColor, "COL_BLACK", COL_BLACK );
257 : 720 : SETCONST( pColor, "COL_BLUE", COL_BLUE );
258 : 720 : SETCONST( pColor, "COL_GREEN", COL_GREEN );
259 : 720 : SETCONST( pColor, "COL_CYAN", COL_CYAN );
260 : 720 : SETCONST( pColor, "COL_RED", COL_RED );
261 : 720 : SETCONST( pColor, "COL_MAGENTA", COL_MAGENTA );
262 : 720 : SETCONST( pColor, "COL_BROWN", COL_BROWN );
263 : 720 : SETCONST( pColor, "COL_GRAY", COL_GRAY );
264 : 720 : SETCONST( pColor, "COL_LIGHTGRAY", COL_LIGHTGRAY );
265 : 720 : SETCONST( pColor, "COL_LIGHTBLUE", COL_LIGHTBLUE );
266 : 720 : SETCONST( pColor, "COL_LIGHTGREEN", COL_LIGHTGREEN );
267 : 720 : SETCONST( pColor, "COL_LIGHTCYAN", COL_LIGHTCYAN );
268 : 720 : SETCONST( pColor, "COL_LIGHTRED", COL_LIGHTRED );
269 : 720 : SETCONST( pColor, "COL_LIGHTMAGENTA", COL_LIGHTMAGENTA );
270 : 720 : SETCONST( pColor, "COL_YELLOW", COL_YELLOW );
271 : 720 : SETCONST( pColor, "COL_WHITE", COL_WHITE );
272 : :
273 : 720 : return( pColor );
274 : : }
275 : :
276 : : /*************************************************************************
277 : : |*
278 : : |* RscTypCont::InitMapUnit()
279 : : |*
280 : : *************************************************************************/
281 : 720 : RscEnum * RscTypCont::InitMapUnit(){
282 : : RscEnum * pMapUnit;
283 [ + - ][ + - ]: 720 : pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
[ + - ]
284 : :
285 : 720 : SETCONST( pMapUnit, "MAP_PIXEL", MAP_PIXEL );
286 : 720 : SETCONST( pMapUnit, "MAP_SYSFONT", MAP_SYSFONT );
287 : 720 : SETCONST( pMapUnit, "MAP_100TH_MM", MAP_100TH_MM );
288 : 720 : SETCONST( pMapUnit, "MAP_10TH_MM", MAP_10TH_MM );
289 : 720 : SETCONST( pMapUnit, "MAP_MM", MAP_MM );
290 : 720 : SETCONST( pMapUnit, "MAP_CM", MAP_CM );
291 : 720 : SETCONST( pMapUnit, "MAP_1000TH_INCH", MAP_1000TH_INCH );
292 : 720 : SETCONST( pMapUnit, "MAP_100TH_INCH", MAP_100TH_INCH );
293 : 720 : SETCONST( pMapUnit, "MAP_10TH_INCH", MAP_10TH_INCH );
294 : 720 : SETCONST( pMapUnit, "MAP_INCH", MAP_INCH );
295 : 720 : SETCONST( pMapUnit, "MAP_POINT", MAP_POINT );
296 : 720 : SETCONST( pMapUnit, "MAP_TWIP", MAP_TWIP );
297 : 720 : SETCONST( pMapUnit, "MAP_APPFONT", MAP_APPFONT );
298 : 720 : SETCONST( pMapUnit, "MAP_SV", RSC_EXTRAMAPUNIT );
299 : 720 : return( pMapUnit );
300 : : }
301 : :
302 : : /*************************************************************************
303 : : |*
304 : : |* RscTypCont::InitKey()
305 : : |*
306 : : *************************************************************************/
307 : 720 : RscEnum * RscTypCont::InitKey(){
308 : : RscEnum * pKey;
309 [ + - ][ + - ]: 720 : pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
[ + - ]
310 : :
311 : 720 : SETCONST( pKey, "KEY_0", com::sun::star::awt::Key::NUM0 );
312 : 720 : SETCONST( pKey, "KEY_1", com::sun::star::awt::Key::NUM1 );
313 : 720 : SETCONST( pKey, "KEY_2", com::sun::star::awt::Key::NUM2 );
314 : 720 : SETCONST( pKey, "KEY_3", com::sun::star::awt::Key::NUM3 );
315 : 720 : SETCONST( pKey, "KEY_4", com::sun::star::awt::Key::NUM4 );
316 : 720 : SETCONST( pKey, "KEY_5", com::sun::star::awt::Key::NUM5 );
317 : 720 : SETCONST( pKey, "KEY_6", com::sun::star::awt::Key::NUM6 );
318 : 720 : SETCONST( pKey, "KEY_7", com::sun::star::awt::Key::NUM7 );
319 : 720 : SETCONST( pKey, "KEY_8", com::sun::star::awt::Key::NUM8 );
320 : 720 : SETCONST( pKey, "KEY_9", com::sun::star::awt::Key::NUM9 );
321 : :
322 : 720 : SETCONST( pKey, "KEY_A", com::sun::star::awt::Key::A );
323 : 720 : SETCONST( pKey, "KEY_B", com::sun::star::awt::Key::B );
324 : 720 : SETCONST( pKey, "KEY_C", com::sun::star::awt::Key::C );
325 : 720 : SETCONST( pKey, "KEY_D", com::sun::star::awt::Key::D );
326 : 720 : SETCONST( pKey, "KEY_E", com::sun::star::awt::Key::E );
327 : 720 : SETCONST( pKey, "KEY_F", com::sun::star::awt::Key::F );
328 : 720 : SETCONST( pKey, "KEY_G", com::sun::star::awt::Key::G );
329 : 720 : SETCONST( pKey, "KEY_H", com::sun::star::awt::Key::H );
330 : 720 : SETCONST( pKey, "KEY_I", com::sun::star::awt::Key::I );
331 : 720 : SETCONST( pKey, "KEY_J", com::sun::star::awt::Key::J );
332 : 720 : SETCONST( pKey, "KEY_K", com::sun::star::awt::Key::K );
333 : 720 : SETCONST( pKey, "KEY_L", com::sun::star::awt::Key::L );
334 : 720 : SETCONST( pKey, "KEY_M", com::sun::star::awt::Key::M );
335 : 720 : SETCONST( pKey, "KEY_N", com::sun::star::awt::Key::N );
336 : 720 : SETCONST( pKey, "KEY_O", com::sun::star::awt::Key::O );
337 : 720 : SETCONST( pKey, "KEY_P", com::sun::star::awt::Key::P );
338 : 720 : SETCONST( pKey, "KEY_Q", com::sun::star::awt::Key::Q );
339 : 720 : SETCONST( pKey, "KEY_R", com::sun::star::awt::Key::R );
340 : 720 : SETCONST( pKey, "KEY_S", com::sun::star::awt::Key::S );
341 : 720 : SETCONST( pKey, "KEY_T", com::sun::star::awt::Key::T );
342 : 720 : SETCONST( pKey, "KEY_U", com::sun::star::awt::Key::U );
343 : 720 : SETCONST( pKey, "KEY_V", com::sun::star::awt::Key::V );
344 : 720 : SETCONST( pKey, "KEY_W", com::sun::star::awt::Key::W );
345 : 720 : SETCONST( pKey, "KEY_X", com::sun::star::awt::Key::X );
346 : 720 : SETCONST( pKey, "KEY_Y", com::sun::star::awt::Key::Y );
347 : 720 : SETCONST( pKey, "KEY_Z", com::sun::star::awt::Key::Z );
348 : :
349 : 720 : SETCONST( pKey, "KEY_F1", com::sun::star::awt::Key::F1 );
350 : 720 : SETCONST( pKey, "KEY_F2", com::sun::star::awt::Key::F2 );
351 : 720 : SETCONST( pKey, "KEY_F3", com::sun::star::awt::Key::F3 );
352 : 720 : SETCONST( pKey, "KEY_F4", com::sun::star::awt::Key::F4 );
353 : 720 : SETCONST( pKey, "KEY_F5", com::sun::star::awt::Key::F5 );
354 : 720 : SETCONST( pKey, "KEY_F6", com::sun::star::awt::Key::F6 );
355 : 720 : SETCONST( pKey, "KEY_F7", com::sun::star::awt::Key::F7 );
356 : 720 : SETCONST( pKey, "KEY_F8", com::sun::star::awt::Key::F8 );
357 : 720 : SETCONST( pKey, "KEY_F9", com::sun::star::awt::Key::F9 );
358 : 720 : SETCONST( pKey, "KEY_F10", com::sun::star::awt::Key::F10 );
359 : 720 : SETCONST( pKey, "KEY_F11", com::sun::star::awt::Key::F11 );
360 : 720 : SETCONST( pKey, "KEY_F12", com::sun::star::awt::Key::F12 );
361 : 720 : SETCONST( pKey, "KEY_F13", com::sun::star::awt::Key::F13 );
362 : 720 : SETCONST( pKey, "KEY_F14", com::sun::star::awt::Key::F14 );
363 : 720 : SETCONST( pKey, "KEY_F15", com::sun::star::awt::Key::F15 );
364 : 720 : SETCONST( pKey, "KEY_F16", com::sun::star::awt::Key::F16 );
365 : 720 : SETCONST( pKey, "KEY_F17", com::sun::star::awt::Key::F17 );
366 : 720 : SETCONST( pKey, "KEY_F18", com::sun::star::awt::Key::F18 );
367 : 720 : SETCONST( pKey, "KEY_F19", com::sun::star::awt::Key::F19 );
368 : 720 : SETCONST( pKey, "KEY_F20", com::sun::star::awt::Key::F20 );
369 : 720 : SETCONST( pKey, "KEY_F21", com::sun::star::awt::Key::F21 );
370 : 720 : SETCONST( pKey, "KEY_F22", com::sun::star::awt::Key::F22 );
371 : 720 : SETCONST( pKey, "KEY_F23", com::sun::star::awt::Key::F23 );
372 : 720 : SETCONST( pKey, "KEY_F24", com::sun::star::awt::Key::F24 );
373 : 720 : SETCONST( pKey, "KEY_F25", com::sun::star::awt::Key::F25 );
374 : 720 : SETCONST( pKey, "KEY_F26", com::sun::star::awt::Key::F26 );
375 : :
376 : 720 : SETCONST( pKey, "KEY_DOWN", com::sun::star::awt::Key::DOWN );
377 : 720 : SETCONST( pKey, "KEY_UP", com::sun::star::awt::Key::UP );
378 : 720 : SETCONST( pKey, "KEY_LEFT", com::sun::star::awt::Key::LEFT );
379 : 720 : SETCONST( pKey, "KEY_RIGHT", com::sun::star::awt::Key::RIGHT );
380 : 720 : SETCONST( pKey, "KEY_HOME", com::sun::star::awt::Key::HOME );
381 : 720 : SETCONST( pKey, "KEY_END", com::sun::star::awt::Key::END );
382 : 720 : SETCONST( pKey, "KEY_PAGEUP", com::sun::star::awt::Key::PAGEUP );
383 : 720 : SETCONST( pKey, "KEY_PAGEDOWN", com::sun::star::awt::Key::PAGEDOWN );
384 : :
385 : 720 : SETCONST( pKey, "KEY_RETURN", com::sun::star::awt::Key::RETURN );
386 : 720 : SETCONST( pKey, "KEY_ESCAPE", com::sun::star::awt::Key::ESCAPE );
387 : 720 : SETCONST( pKey, "KEY_TAB", com::sun::star::awt::Key::TAB );
388 : 720 : SETCONST( pKey, "KEY_BACKSPACE", com::sun::star::awt::Key::BACKSPACE );
389 : 720 : SETCONST( pKey, "KEY_SPACE", com::sun::star::awt::Key::SPACE );
390 : 720 : SETCONST( pKey, "KEY_INSERT", com::sun::star::awt::Key::INSERT );
391 : 720 : SETCONST( pKey, "KEY_DELETE", com::sun::star::awt::Key::DELETE );
392 : :
393 : 720 : SETCONST( pKey, "KEY_ADD", com::sun::star::awt::Key::ADD );
394 : 720 : SETCONST( pKey, "KEY_SUBTRACT", com::sun::star::awt::Key::SUBTRACT );
395 : 720 : SETCONST( pKey, "KEY_MULTIPLY", com::sun::star::awt::Key::MULTIPLY );
396 : 720 : SETCONST( pKey, "KEY_DIVIDE", com::sun::star::awt::Key::DIVIDE );
397 : 720 : SETCONST( pKey, "KEY_POINT", com::sun::star::awt::Key::POINT );
398 : 720 : SETCONST( pKey, "KEY_COMMA", com::sun::star::awt::Key::COMMA );
399 : 720 : SETCONST( pKey, "KEY_LESS", com::sun::star::awt::Key::LESS );
400 : 720 : SETCONST( pKey, "KEY_GREATER", com::sun::star::awt::Key::GREATER );
401 : 720 : SETCONST( pKey, "KEY_EQUAL", com::sun::star::awt::Key::EQUAL );
402 : :
403 : 720 : SETCONST( pKey, "KEY_OPEN", com::sun::star::awt::Key::OPEN );
404 : 720 : SETCONST( pKey, "KEY_CUT", com::sun::star::awt::Key::CUT );
405 : 720 : SETCONST( pKey, "KEY_COPY", com::sun::star::awt::Key::COPY );
406 : 720 : SETCONST( pKey, "KEY_PASTE", com::sun::star::awt::Key::PASTE );
407 : 720 : SETCONST( pKey, "KEY_UNDO", com::sun::star::awt::Key::UNDO );
408 : 720 : SETCONST( pKey, "KEY_REPEAT", com::sun::star::awt::Key::REPEAT );
409 : 720 : SETCONST( pKey, "KEY_FIND", com::sun::star::awt::Key::FIND );
410 : 720 : SETCONST( pKey, "KEY_PROPERTIES", com::sun::star::awt::Key::PROPERTIES );
411 : 720 : SETCONST( pKey, "KEY_FRONT", com::sun::star::awt::Key::FRONT );
412 : 720 : SETCONST( pKey, "KEY_CONTEXTMENU", com::sun::star::awt::Key::CONTEXTMENU );
413 : 720 : SETCONST( pKey, "KEY_HELP", com::sun::star::awt::Key::HELP );
414 : 720 : SETCONST( pKey, "KEY_HANGUL_HANJA", com::sun::star::awt::Key::HANGUL_HANJA );
415 : 720 : SETCONST( pKey, "KEY_DECIMAL", com::sun::star::awt::Key::DECIMAL );
416 : 720 : SETCONST( pKey, "KEY_TILDE", com::sun::star::awt::Key::TILDE );
417 : 720 : SETCONST( pKey, "KEY_QUOTELEFT", com::sun::star::awt::Key::QUOTELEFT );
418 : :
419 : 720 : return( pKey );
420 : : }
421 : :
422 : : /*************************************************************************
423 : : |*
424 : : |* RscTypCont::InitTriState()
425 : : |*
426 : : *************************************************************************/
427 : 720 : RscEnum * RscTypCont::InitTriState(){
428 : : RscEnum * pTriState;
429 [ + - ][ + - ]: 720 : pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
[ + - ]
430 : :
431 : 720 : SETCONST( pTriState, "STATE_NOCHECK", STATE_NOCHECK );
432 : 720 : SETCONST( pTriState, "STATE_CHECK", STATE_CHECK );
433 : 720 : SETCONST( pTriState, "STATE_DONTKNOW", STATE_DONTKNOW );
434 : :
435 : 720 : return( pTriState );
436 : : }
437 : :
438 : : /*************************************************************************
439 : : |*
440 : : |* RscTypCont::InitMessButtons()
441 : : |*
442 : : *************************************************************************/
443 : 720 : RscEnum * RscTypCont::InitMessButtons()
444 : : {
445 : : RscEnum * pMessButtons;
446 [ + - ][ + - ]: 720 : pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
[ + - ]
447 : 720 : SETCONST( pMessButtons, "WB_OK", sal::static_int_cast<sal_uInt32>(WB_OK) );
448 : 720 : SETCONST( pMessButtons, "WB_OK_CANCEL", sal::static_int_cast<sal_uInt32>(WB_OK_CANCEL) );
449 : 720 : SETCONST( pMessButtons, "WB_YES_NO", sal::static_int_cast<sal_uInt32>(WB_YES_NO) );
450 : 720 : SETCONST( pMessButtons, "WB_YES_NO_CANCEL", sal::static_int_cast<sal_uInt32>(WB_YES_NO_CANCEL) );
451 : 720 : SETCONST( pMessButtons, "WB_RETRY_CANCEL", sal::static_int_cast<sal_uInt32>(WB_RETRY_CANCEL) );
452 : 720 : SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE", sal::static_int_cast<sal_uInt32>(WB_ABORT_RETRY_IGNORE) );
453 : 720 : return( pMessButtons );
454 : : }
455 : :
456 : : /*************************************************************************
457 : : |*
458 : : |* RscTypCont::InitMessDefButton()
459 : : |*
460 : : *************************************************************************/
461 : 720 : RscEnum * RscTypCont::InitMessDefButton(){
462 : : RscEnum * pMessDefButton;
463 : 1440 : pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
464 [ + - ][ + - ]: 720 : RSC_NOTYPE );
[ + - ]
465 : :
466 : 720 : SETCONST( pMessDefButton, "WB_DEF_OK", sal::static_int_cast<sal_uInt32>(WB_DEF_OK) );
467 : 720 : SETCONST( pMessDefButton, "WB_DEF_CANCEL", sal::static_int_cast<sal_uInt32>(WB_DEF_CANCEL) );
468 : 720 : SETCONST( pMessDefButton, "WB_DEF_RETRY", sal::static_int_cast<sal_uInt32>(WB_DEF_RETRY) );
469 : 720 : SETCONST( pMessDefButton, "WB_DEF_YES", sal::static_int_cast<sal_uInt32>(WB_DEF_YES) );
470 : 720 : SETCONST( pMessDefButton, "WB_DEF_NO", sal::static_int_cast<sal_uInt32>(WB_DEF_NO) );
471 : 720 : SETCONST( pMessDefButton, "WB_DEF_IGNORE", sal::static_int_cast<sal_uInt32>(WB_DEF_IGNORE) );
472 : 720 : return( pMessDefButton );
473 : : }
474 : :
475 : : /*************************************************************************
476 : : |*
477 : : |* RscTypCont::InitGeometry()
478 : : |*
479 : : *************************************************************************/
480 : 720 : RscTupel * RscTypCont::InitGeometry()
481 : : {
482 : : RscTop * pTupel;
483 : : Atom nId;
484 : :
485 : : // Clientvariablen einfuegen
486 : 1440 : pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
487 [ + - ][ + - ]: 720 : RSC_NOTYPE, NULL );
[ + - ]
488 : 720 : nId = aNmTb.Put( "X", VARNAME );
489 : 720 : pTupel->SetVariable( nId, &aShort );
490 : 720 : nId = aNmTb.Put( "Y", VARNAME );
491 : 720 : pTupel->SetVariable( nId, &aShort );
492 : 720 : nId = aNmTb.Put( "WIDTH", VARNAME );
493 : 720 : pTupel->SetVariable( nId, &aShort );
494 : 720 : nId = aNmTb.Put( "HEIGHT", VARNAME );
495 : 720 : pTupel->SetVariable( nId, &aShort );
496 : :
497 : 720 : return (RscTupel *)pTupel;
498 : : }
499 : :
500 : : /*************************************************************************
501 : : |*
502 : : |* RscTypCont::InitLangGeometry()
503 : : |*
504 : : *************************************************************************/
505 : 720 : RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
506 : : {
507 [ + - ][ + - ]: 720 : return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
[ + - ]
508 : : }
509 : :
510 : : /*************************************************************************
511 : : |*
512 : : |* RscTypCont::InitStringList()
513 : : |*
514 : : *************************************************************************/
515 : 720 : RscCont * RscTypCont::InitStringList()
516 : : {
517 : : RscCont * pCont;
518 : :
519 [ + - ][ + - ]: 720 : pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
[ + - ]
520 : 720 : pCont->SetTypeClass( &aString );
521 : :
522 : 720 : return pCont;
523 : : }
524 : :
525 : : /*************************************************************************
526 : : |*
527 : : |* RscTypCont::InitLangStringList()
528 : : |*
529 : : *************************************************************************/
530 : 720 : RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
531 : : {
532 : 1440 : return new RscArray( pHS->getID( "Lang_CharsList" ),
533 [ + - ][ + - ]: 1440 : RSC_NOTYPE, pStrLst, &aLangType );
[ + - ]
534 : : }
535 : :
536 : : /*************************************************************************
537 : : |*
538 : : |* RscTypCont::InitStringTupel()
539 : : |*
540 : : *************************************************************************/
541 : 720 : RscTupel * RscTypCont::InitStringTupel()
542 : : {
543 : : RscTop * pTupel;
544 : : Atom nId;
545 : :
546 : : // Clientvariablen einfuegen
547 [ + - ][ + - ]: 720 : pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
[ + - ]
548 : 720 : nId = aNmTb.Put( "FILTER", VARNAME );
549 : 720 : pTupel->SetVariable( nId, &aString );
550 : 720 : nId = aNmTb.Put( "MASK", VARNAME );
551 : 720 : pTupel->SetVariable( nId, &aString );
552 : :
553 : 720 : return (RscTupel *)pTupel;
554 : : }
555 : :
556 : : /*************************************************************************
557 : : |*
558 : : |* RscTypCont::InitStringLongTupel()
559 : : |*
560 : : *************************************************************************/
561 : 720 : RscTupel * RscTypCont::InitStringLongTupel()
562 : : {
563 : : RscTop * pTupel;
564 : : Atom nId;
565 : :
566 : : // Clientvariablen einfuegen
567 [ + - ][ + - ]: 720 : pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
[ + - ]
568 : 720 : nId = aNmTb.Put( "ItemText", VARNAME );
569 : 720 : pTupel->SetVariable( nId, &aString );
570 : 720 : nId = aNmTb.Put( "ItemId", VARNAME );
571 : 720 : pTupel->SetVariable( nId, &aEnumLong );
572 : :
573 : 720 : return (RscTupel *)pTupel;
574 : : }
575 : :
576 : : /*************************************************************************
577 : : |*
578 : : |* RscTypCont::InitStringTupelList()
579 : : |*
580 : : *************************************************************************/
581 : 720 : RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
582 : : {
583 : : RscCont * pCont;
584 : :
585 [ + - ][ + - ]: 720 : pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
[ + - ]
586 : 720 : pCont->SetTypeClass( pTupelString );
587 : :
588 : 720 : return pCont;
589 : : }
590 : :
591 : : /*************************************************************************
592 : : |*
593 : : |* RscTypCont::InitStringLongTupelList()
594 : : |*
595 : : *************************************************************************/
596 : 720 : RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
597 : : {
598 : : RscCont * pCont;
599 : :
600 [ + - ][ + - ]: 720 : pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
[ + - ]
601 : 720 : pCont->SetTypeClass( pStringLong );
602 : :
603 : 720 : return pCont;
604 : : }
605 : :
606 : : /*************************************************************************
607 : : |*
608 : : |* RscTypCont::InitLangStringTupelList()
609 : : |*
610 : : *************************************************************************/
611 : 720 : RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
612 : : {
613 : 1440 : return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
614 [ + - ][ + - ]: 1440 : RSC_NOTYPE, pStrTupelLst, &aLangType );
[ + - ]
615 : : }
616 : :
617 : : /*************************************************************************
618 : : |*
619 : : |* RscTypCont::InitLangStringLongTupelList()
620 : : |*
621 : : *************************************************************************/
622 : 720 : RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
623 : : {
624 : 1440 : return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
625 [ + - ][ + - ]: 1440 : RSC_NOTYPE, pStrLongTupelLst, &aLangType );
[ + - ]
626 [ + - ][ + - ]: 2160 : }
627 : :
628 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|