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