Update ooo320-m1
[ooovba.git] / rsc / source / parser / rscibas.cxx
blob8af2590653ad769537ce488dba3b390bc38d1b44
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: rscibas.cxx,v $
10 * $Revision: 1.16 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_rsc.hxx"
34 /****************** I N C L U D E S **************************************/
35 // C and C++ Includes.
36 #include <stdlib.h>
37 #include <stdio.h>
38 #include <string.h>
40 #include <i18npool/mslangid.hxx>
41 #include <tools/rc.h>
42 #include <tools/color.hxx>
44 #include <vclrsc.hxx>
45 #include <rscconst.hxx>
46 #include <rscarray.hxx>
47 #include <rscclass.hxx>
48 #include <rsccont.hxx>
49 #include <rscdb.hxx>
52 #include "rsclex.hxx"
53 #include <yyrscyacc.hxx>
55 #include <hash_map>
57 /****************** M A C R O S ******************************************/
58 void RscTypCont::SETCONST( RscConst * pClass, const char * szString, UINT32 nVal )
60 #if OSL_DEBUG_LEVEL > 2
61 fprintf( stderr, "setconst : %s\n", szString );
62 #endif
63 pClass->SetConstant( aNmTb.Put( szString,
64 CONSTNAME, nVal ), nVal );
67 void RscTypCont::SETCONST( RscConst * pClass, Atom nName, UINT32 nVal )
69 #if OSL_DEBUG_LEVEL > 2
70 fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
71 #endif
72 pClass->SetConstant( aNmTb.Put( nName,
73 CONSTNAME, nVal ), nVal );
76 /****************** C O D E **********************************************/
77 /*************************************************************************
78 |* RscTypCont::InitLangType()
80 |* Beschreibung
81 *************************************************************************/
83 typedef std::hash_map< rtl::OString, sal_uInt32, rtl::OStringHash > langmap;
84 static langmap ULong_Iso_map;
86 sal_uInt32 GetLangId( const ByteString& aLang )
88 langmap::iterator pIter = ULong_Iso_map.find( aLang );
89 if ( pIter != ULong_Iso_map.end())
90 return pIter->second;
91 return 0;
94 void RscLangEnum::Init( RscNameTable& rNames )
96 SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
97 SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
99 sal_Int32 nIndex = 0;
100 mnLangId = 0x400; // stay away from selfdefined...
101 char csep = '-';
102 const MsLangId::IsoLangEntry* pLangEntry;
103 ByteString aCountry, aLang;
105 while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW ))
107 #if OSL_DEBUG_LEVEL > 2
108 fprintf( stderr, "ISO Language in : %d %d %s\n",
109 (int)nIndex,
110 pLangEntry->mnLang,
111 MsLangId::convertLanguageToIsoByteString( pLangEntry->mnLang ).getStr() );
112 #endif
113 aLang = pLangEntry->maLangStr;
114 aCountry = pLangEntry->maCountry;
115 if ( aLang.EqualsIgnoreCaseAscii( aCountry ) || ! aCountry.Len() )
117 SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
118 if ( ! GetLangId( aLang ))
119 ULong_Iso_map[ aLang ] = mnLangId;
120 #if OSL_DEBUG_LEVEL > 2
121 fprintf( stderr, "ISO Language out: %s 0x%lx\n", aLang.GetBuffer(), mnLangId );
122 #endif
123 mnLangId++;
125 else
127 SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
128 if ( ! GetLangId( aLang ))
129 ULong_Iso_map[ aLang ] = mnLangId;
130 #if OSL_DEBUG_LEVEL > 2
131 fprintf( stderr, "ISO Language out: %s 0x%lx", aLang.GetBuffer(), mnLangId );
132 #endif
133 mnLangId++;
134 aLang += csep;
135 aLang += aCountry.ToUpperAscii();
136 SetConstant( rNames.Put( aLang.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
137 if ( ! GetLangId( aLang ))
138 ULong_Iso_map[ aLang ] = mnLangId;
139 #if OSL_DEBUG_LEVEL > 2
140 fprintf( stderr, " %s 0x%lx\n", aLang.GetBuffer(), mnLangId );
141 #endif
142 mnLangId++;
143 // hack - survive "x-no-translate"
144 if ( aLang == "en-US" )
146 // SetConstant( rNames.Put( "x-no-translate", CONSTNAME, mnLangId ), mnLangId );
147 // mnLangId++;
148 SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
149 mnLangId++;
152 nIndex++;
155 ByteString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
156 if ( aEnvIsoTokens.Len() )
158 ByteString aIsoToken;
159 sal_uInt16 nTokenCounter = 0;
160 sal_Bool bOneMore = 1;
161 while ( bOneMore )
163 aIsoToken = aEnvIsoTokens.GetToken( nTokenCounter, ' ' );
164 if ( aIsoToken.Len() )
166 SetConstant( rNames.Put( aIsoToken.GetBuffer(), CONSTNAME, mnLangId ), mnLangId );
167 if ( ! GetLangId( aIsoToken ))
168 ULong_Iso_map[ aIsoToken ] = mnLangId;
169 #if OSL_DEBUG_LEVEL > 2
170 fprintf( stderr, "Env ISO Language out: %s 0x%lx\n", aIsoToken.GetBuffer(), mnLangId );
171 #endif
172 mnLangId++;
174 else
175 bOneMore = 0;
176 nTokenCounter++;
180 SetConstant( rNames.Put( "LANGUAGE_USER1", CONSTNAME, LANGUAGE_USER1 ), LANGUAGE_USER1 );
181 SetConstant( rNames.Put( "LANGUAGE_USER2", CONSTNAME, LANGUAGE_USER2 ), LANGUAGE_USER2 );
182 SetConstant( rNames.Put( "LANGUAGE_USER3", CONSTNAME, LANGUAGE_USER3 ), LANGUAGE_USER3 );
183 SetConstant( rNames.Put( "LANGUAGE_USER4", CONSTNAME, LANGUAGE_USER4 ), LANGUAGE_USER4 );
184 SetConstant( rNames.Put( "LANGUAGE_USER5", CONSTNAME, LANGUAGE_USER5 ), LANGUAGE_USER5 );
185 SetConstant( rNames.Put( "LANGUAGE_USER6", CONSTNAME, LANGUAGE_USER6 ), LANGUAGE_USER6 );
186 SetConstant( rNames.Put( "LANGUAGE_USER7", CONSTNAME, LANGUAGE_USER7 ), LANGUAGE_USER7 );
187 SetConstant( rNames.Put( "LANGUAGE_USER8", CONSTNAME, LANGUAGE_USER8 ), LANGUAGE_USER8 );
188 SetConstant( rNames.Put( "EXTERN", CONSTNAME, LANGUAGE_USER9 ), LANGUAGE_USER9 );
191 Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
193 Atom nResult = 0;
194 KEY_STRUCT aStruct;
195 if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) )
197 SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId );
198 // insert new lang to ULong_Iso_map
199 rtl::OString aLang( pLang );
200 if ( ! GetLangId( aLang ))
201 ULong_Iso_map[ aLang ] = mnLangId;
202 // increase id counter
203 mnLangId++;
205 #if OSL_DEBUG_LEVEL > 2
206 fprintf( stderr, "AddLanguage( %s ) = 0x%lx\n", pLang, nResult );
207 #endif
208 return nResult;
211 RscEnum * RscTypCont::InitLangType()
213 aLangType.Init( aNmTb );
214 return( &aLangType );
217 /*************************************************************************
219 |* RscTypCont::InitFieldUnitsType()
221 |* Beschreibung
222 |* Ersterstellung MM 22.03.91
223 |* Letzte Aenderung MM 27.06.91
225 *************************************************************************/
226 RscEnum * RscTypCont::InitFieldUnitsType()
228 RscEnum * pFieldUnits;
229 pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
231 SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
232 SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
233 SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
234 SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
235 SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
236 SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
237 SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
238 SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
239 SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
240 SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
241 SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
242 SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
243 // Amelia : adds two units ,"char" and "line"
244 SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
245 SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
246 SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
248 return pFieldUnits;
251 /*************************************************************************
253 |* RscTypCont::InitTimeFieldFormat()
255 |* Beschreibung
256 |* Ersterstellung MM 22.03.91
257 |* Letzte Aenderung MM 27.06.91
259 *************************************************************************/
260 RscEnum * RscTypCont::InitTimeFieldFormat()
262 RscEnum * pTimeFieldFormat;
263 pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
264 RSC_NOTYPE );
266 SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
267 SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
268 SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
270 return pTimeFieldFormat;
273 /*************************************************************************
275 |* RscTypCont::InitColor()
277 |* Beschreibung
278 |* Ersterstellung MM 24.05.91
279 |* Letzte Aenderung MM 24.05.91
281 *************************************************************************/
282 RscEnum * RscTypCont::InitColor(){
283 RscEnum * pColor;
284 pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
286 SETCONST( pColor, "COL_BLACK", COL_BLACK );
287 SETCONST( pColor, "COL_BLUE", COL_BLUE );
288 SETCONST( pColor, "COL_GREEN", COL_GREEN );
289 SETCONST( pColor, "COL_CYAN", COL_CYAN );
290 SETCONST( pColor, "COL_RED", COL_RED );
291 SETCONST( pColor, "COL_MAGENTA", COL_MAGENTA );
292 SETCONST( pColor, "COL_BROWN", COL_BROWN );
293 SETCONST( pColor, "COL_GRAY", COL_GRAY );
294 SETCONST( pColor, "COL_LIGHTGRAY", COL_LIGHTGRAY );
295 SETCONST( pColor, "COL_LIGHTBLUE", COL_LIGHTBLUE );
296 SETCONST( pColor, "COL_LIGHTGREEN", COL_LIGHTGREEN );
297 SETCONST( pColor, "COL_LIGHTCYAN", COL_LIGHTCYAN );
298 SETCONST( pColor, "COL_LIGHTRED", COL_LIGHTRED );
299 SETCONST( pColor, "COL_LIGHTMAGENTA", COL_LIGHTMAGENTA );
300 SETCONST( pColor, "COL_YELLOW", COL_YELLOW );
301 SETCONST( pColor, "COL_WHITE", COL_WHITE );
303 return( pColor );
306 /*************************************************************************
308 |* RscTypCont::InitMapUnit()
310 |* Beschreibung
311 |* Ersterstellung MM 24.05.91
312 |* Letzte Aenderung MM 24.05.91
314 *************************************************************************/
315 RscEnum * RscTypCont::InitMapUnit(){
316 RscEnum * pMapUnit;
317 pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
319 SETCONST( pMapUnit, "MAP_PIXEL", MAP_PIXEL );
320 SETCONST( pMapUnit, "MAP_SYSFONT", MAP_SYSFONT );
321 SETCONST( pMapUnit, "MAP_100TH_MM", MAP_100TH_MM );
322 SETCONST( pMapUnit, "MAP_10TH_MM", MAP_10TH_MM );
323 SETCONST( pMapUnit, "MAP_MM", MAP_MM );
324 SETCONST( pMapUnit, "MAP_CM", MAP_CM );
325 SETCONST( pMapUnit, "MAP_1000TH_INCH", MAP_1000TH_INCH );
326 SETCONST( pMapUnit, "MAP_100TH_INCH", MAP_100TH_INCH );
327 SETCONST( pMapUnit, "MAP_10TH_INCH", MAP_10TH_INCH );
328 SETCONST( pMapUnit, "MAP_INCH", MAP_INCH );
329 SETCONST( pMapUnit, "MAP_POINT", MAP_POINT );
330 SETCONST( pMapUnit, "MAP_TWIP", MAP_TWIP );
331 SETCONST( pMapUnit, "MAP_APPFONT", MAP_APPFONT );
332 SETCONST( pMapUnit, "MAP_SV", RSC_EXTRAMAPUNIT );
333 return( pMapUnit );
336 /*************************************************************************
338 |* RscTypCont::InitKey()
340 |* Beschreibung
341 |* Ersterstellung MM 24.05.91
342 |* Letzte Aenderung MM 24.05.91
344 *************************************************************************/
345 RscEnum * RscTypCont::InitKey(){
346 RscEnum * pKey;
347 pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
349 SETCONST( pKey, "KEY_0", com::sun::star::awt::Key::NUM0 );
350 SETCONST( pKey, "KEY_1", com::sun::star::awt::Key::NUM1 );
351 SETCONST( pKey, "KEY_2", com::sun::star::awt::Key::NUM2 );
352 SETCONST( pKey, "KEY_3", com::sun::star::awt::Key::NUM3 );
353 SETCONST( pKey, "KEY_4", com::sun::star::awt::Key::NUM4 );
354 SETCONST( pKey, "KEY_5", com::sun::star::awt::Key::NUM5 );
355 SETCONST( pKey, "KEY_6", com::sun::star::awt::Key::NUM6 );
356 SETCONST( pKey, "KEY_7", com::sun::star::awt::Key::NUM7 );
357 SETCONST( pKey, "KEY_8", com::sun::star::awt::Key::NUM8 );
358 SETCONST( pKey, "KEY_9", com::sun::star::awt::Key::NUM9 );
360 SETCONST( pKey, "KEY_A", com::sun::star::awt::Key::A );
361 SETCONST( pKey, "KEY_B", com::sun::star::awt::Key::B );
362 SETCONST( pKey, "KEY_C", com::sun::star::awt::Key::C );
363 SETCONST( pKey, "KEY_D", com::sun::star::awt::Key::D );
364 SETCONST( pKey, "KEY_E", com::sun::star::awt::Key::E );
365 SETCONST( pKey, "KEY_F", com::sun::star::awt::Key::F );
366 SETCONST( pKey, "KEY_G", com::sun::star::awt::Key::G );
367 SETCONST( pKey, "KEY_H", com::sun::star::awt::Key::H );
368 SETCONST( pKey, "KEY_I", com::sun::star::awt::Key::I );
369 SETCONST( pKey, "KEY_J", com::sun::star::awt::Key::J );
370 SETCONST( pKey, "KEY_K", com::sun::star::awt::Key::K );
371 SETCONST( pKey, "KEY_L", com::sun::star::awt::Key::L );
372 SETCONST( pKey, "KEY_M", com::sun::star::awt::Key::M );
373 SETCONST( pKey, "KEY_N", com::sun::star::awt::Key::N );
374 SETCONST( pKey, "KEY_O", com::sun::star::awt::Key::O );
375 SETCONST( pKey, "KEY_P", com::sun::star::awt::Key::P );
376 SETCONST( pKey, "KEY_Q", com::sun::star::awt::Key::Q );
377 SETCONST( pKey, "KEY_R", com::sun::star::awt::Key::R );
378 SETCONST( pKey, "KEY_S", com::sun::star::awt::Key::S );
379 SETCONST( pKey, "KEY_T", com::sun::star::awt::Key::T );
380 SETCONST( pKey, "KEY_U", com::sun::star::awt::Key::U );
381 SETCONST( pKey, "KEY_V", com::sun::star::awt::Key::V );
382 SETCONST( pKey, "KEY_W", com::sun::star::awt::Key::W );
383 SETCONST( pKey, "KEY_X", com::sun::star::awt::Key::X );
384 SETCONST( pKey, "KEY_Y", com::sun::star::awt::Key::Y );
385 SETCONST( pKey, "KEY_Z", com::sun::star::awt::Key::Z );
387 SETCONST( pKey, "KEY_F1", com::sun::star::awt::Key::F1 );
388 SETCONST( pKey, "KEY_F2", com::sun::star::awt::Key::F2 );
389 SETCONST( pKey, "KEY_F3", com::sun::star::awt::Key::F3 );
390 SETCONST( pKey, "KEY_F4", com::sun::star::awt::Key::F4 );
391 SETCONST( pKey, "KEY_F5", com::sun::star::awt::Key::F5 );
392 SETCONST( pKey, "KEY_F6", com::sun::star::awt::Key::F6 );
393 SETCONST( pKey, "KEY_F7", com::sun::star::awt::Key::F7 );
394 SETCONST( pKey, "KEY_F8", com::sun::star::awt::Key::F8 );
395 SETCONST( pKey, "KEY_F9", com::sun::star::awt::Key::F9 );
396 SETCONST( pKey, "KEY_F10", com::sun::star::awt::Key::F10 );
397 SETCONST( pKey, "KEY_F11", com::sun::star::awt::Key::F11 );
398 SETCONST( pKey, "KEY_F12", com::sun::star::awt::Key::F12 );
399 SETCONST( pKey, "KEY_F13", com::sun::star::awt::Key::F13 );
400 SETCONST( pKey, "KEY_F14", com::sun::star::awt::Key::F14 );
401 SETCONST( pKey, "KEY_F15", com::sun::star::awt::Key::F15 );
402 SETCONST( pKey, "KEY_F16", com::sun::star::awt::Key::F16 );
403 SETCONST( pKey, "KEY_F17", com::sun::star::awt::Key::F17 );
404 SETCONST( pKey, "KEY_F18", com::sun::star::awt::Key::F18 );
405 SETCONST( pKey, "KEY_F19", com::sun::star::awt::Key::F19 );
406 SETCONST( pKey, "KEY_F20", com::sun::star::awt::Key::F20 );
407 SETCONST( pKey, "KEY_F21", com::sun::star::awt::Key::F21 );
408 SETCONST( pKey, "KEY_F22", com::sun::star::awt::Key::F22 );
409 SETCONST( pKey, "KEY_F23", com::sun::star::awt::Key::F23 );
410 SETCONST( pKey, "KEY_F24", com::sun::star::awt::Key::F24 );
411 SETCONST( pKey, "KEY_F25", com::sun::star::awt::Key::F25 );
412 SETCONST( pKey, "KEY_F26", com::sun::star::awt::Key::F26 );
414 SETCONST( pKey, "KEY_DOWN", com::sun::star::awt::Key::DOWN );
415 SETCONST( pKey, "KEY_UP", com::sun::star::awt::Key::UP );
416 SETCONST( pKey, "KEY_LEFT", com::sun::star::awt::Key::LEFT );
417 SETCONST( pKey, "KEY_RIGHT", com::sun::star::awt::Key::RIGHT );
418 SETCONST( pKey, "KEY_HOME", com::sun::star::awt::Key::HOME );
419 SETCONST( pKey, "KEY_END", com::sun::star::awt::Key::END );
420 SETCONST( pKey, "KEY_PAGEUP", com::sun::star::awt::Key::PAGEUP );
421 SETCONST( pKey, "KEY_PAGEDOWN", com::sun::star::awt::Key::PAGEDOWN );
423 SETCONST( pKey, "KEY_RETURN", com::sun::star::awt::Key::RETURN );
424 SETCONST( pKey, "KEY_ESCAPE", com::sun::star::awt::Key::ESCAPE );
425 SETCONST( pKey, "KEY_TAB", com::sun::star::awt::Key::TAB );
426 SETCONST( pKey, "KEY_BACKSPACE", com::sun::star::awt::Key::BACKSPACE );
427 SETCONST( pKey, "KEY_SPACE", com::sun::star::awt::Key::SPACE );
428 SETCONST( pKey, "KEY_INSERT", com::sun::star::awt::Key::INSERT );
429 SETCONST( pKey, "KEY_DELETE", com::sun::star::awt::Key::DELETE );
431 SETCONST( pKey, "KEY_ADD", com::sun::star::awt::Key::ADD );
432 SETCONST( pKey, "KEY_SUBTRACT", com::sun::star::awt::Key::SUBTRACT );
433 SETCONST( pKey, "KEY_MULTIPLY", com::sun::star::awt::Key::MULTIPLY );
434 SETCONST( pKey, "KEY_DIVIDE", com::sun::star::awt::Key::DIVIDE );
435 SETCONST( pKey, "KEY_POINT", com::sun::star::awt::Key::POINT );
436 SETCONST( pKey, "KEY_COMMA", com::sun::star::awt::Key::COMMA );
437 SETCONST( pKey, "KEY_LESS", com::sun::star::awt::Key::LESS );
438 SETCONST( pKey, "KEY_GREATER", com::sun::star::awt::Key::GREATER );
439 SETCONST( pKey, "KEY_EQUAL", com::sun::star::awt::Key::EQUAL );
441 SETCONST( pKey, "KEY_OPEN", com::sun::star::awt::Key::OPEN );
442 SETCONST( pKey, "KEY_CUT", com::sun::star::awt::Key::CUT );
443 SETCONST( pKey, "KEY_COPY", com::sun::star::awt::Key::COPY );
444 SETCONST( pKey, "KEY_PASTE", com::sun::star::awt::Key::PASTE );
445 SETCONST( pKey, "KEY_UNDO", com::sun::star::awt::Key::UNDO );
446 SETCONST( pKey, "KEY_REPEAT", com::sun::star::awt::Key::REPEAT );
447 SETCONST( pKey, "KEY_FIND", com::sun::star::awt::Key::FIND );
448 SETCONST( pKey, "KEY_PROPERTIES", com::sun::star::awt::Key::PROPERTIES );
449 SETCONST( pKey, "KEY_FRONT", com::sun::star::awt::Key::FRONT );
450 SETCONST( pKey, "KEY_CONTEXTMENU", com::sun::star::awt::Key::CONTEXTMENU );
451 SETCONST( pKey, "KEY_HELP", com::sun::star::awt::Key::HELP );
452 SETCONST( pKey, "KEY_HANGUL_HANJA", com::sun::star::awt::Key::HANGUL_HANJA );
453 SETCONST( pKey, "KEY_DECIMAL", com::sun::star::awt::Key::DECIMAL );
454 SETCONST( pKey, "KEY_TILDE", com::sun::star::awt::Key::TILDE );
455 SETCONST( pKey, "KEY_QUOTELEFT", com::sun::star::awt::Key::QUOTELEFT );
457 return( pKey );
460 /*************************************************************************
462 |* RscTypCont::InitTriState()
464 |* Beschreibung
465 |* Ersterstellung MM 26.11.91
466 |* Letzte Aenderung MM 26.11.91
468 *************************************************************************/
469 RscEnum * RscTypCont::InitTriState(){
470 RscEnum * pTriState;
471 pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
473 SETCONST( pTriState, "STATE_NOCHECK", STATE_NOCHECK );
474 SETCONST( pTriState, "STATE_CHECK", STATE_CHECK );
475 SETCONST( pTriState, "STATE_DONTKNOW", STATE_DONTKNOW );
477 return( pTriState );
480 /*************************************************************************
482 |* RscTypCont::InitMessButtons()
484 |* Beschreibung
485 |* Ersterstellung MM 24.05.91
486 |* Letzte Aenderung MM 24.05.91
488 *************************************************************************/
489 RscEnum * RscTypCont::InitMessButtons()
491 RscEnum * pMessButtons;
492 pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
493 SETCONST( pMessButtons, "WB_OK", sal::static_int_cast<UINT32>(WB_OK) );
494 SETCONST( pMessButtons, "WB_OK_CANCEL", sal::static_int_cast<UINT32>(WB_OK_CANCEL) );
495 SETCONST( pMessButtons, "WB_YES_NO", sal::static_int_cast<UINT32>(WB_YES_NO) );
496 SETCONST( pMessButtons, "WB_YES_NO_CANCEL", sal::static_int_cast<UINT32>(WB_YES_NO_CANCEL) );
497 SETCONST( pMessButtons, "WB_RETRY_CANCEL", sal::static_int_cast<UINT32>(WB_RETRY_CANCEL) );
498 SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE", sal::static_int_cast<UINT32>(WB_ABORT_RETRY_IGNORE) );
499 return( pMessButtons );
502 /*************************************************************************
504 |* RscTypCont::InitMessDefButton()
506 |* Beschreibung
507 |* Ersterstellung MM 24.05.91
508 |* Letzte Aenderung MM 24.05.91
510 *************************************************************************/
511 RscEnum * RscTypCont::InitMessDefButton(){
512 RscEnum * pMessDefButton;
513 pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
514 RSC_NOTYPE );
516 SETCONST( pMessDefButton, "WB_DEF_OK", sal::static_int_cast<UINT32>(WB_DEF_OK) );
517 SETCONST( pMessDefButton, "WB_DEF_CANCEL", sal::static_int_cast<UINT32>(WB_DEF_CANCEL) );
518 SETCONST( pMessDefButton, "WB_DEF_RETRY", sal::static_int_cast<UINT32>(WB_DEF_RETRY) );
519 SETCONST( pMessDefButton, "WB_DEF_YES", sal::static_int_cast<UINT32>(WB_DEF_YES) );
520 SETCONST( pMessDefButton, "WB_DEF_NO", sal::static_int_cast<UINT32>(WB_DEF_NO) );
521 SETCONST( pMessDefButton, "WB_DEF_IGNORE", sal::static_int_cast<UINT32>(WB_DEF_IGNORE) );
522 return( pMessDefButton );
525 /*************************************************************************
527 |* RscTypCont::InitGeometry()
529 |* Beschreibung
530 |* Ersterstellung MM 24.05.91
531 |* Letzte Aenderung MM 24.05.91
533 *************************************************************************/
534 RscTupel * RscTypCont::InitGeometry()
536 RscTop * pTupel;
537 Atom nId;
539 // Clientvariablen einfuegen
540 pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
541 RSC_NOTYPE, NULL );
542 nId = aNmTb.Put( "X", VARNAME );
543 pTupel->SetVariable( nId, &aShort );
544 nId = aNmTb.Put( "Y", VARNAME );
545 pTupel->SetVariable( nId, &aShort );
546 nId = aNmTb.Put( "WIDTH", VARNAME );
547 pTupel->SetVariable( nId, &aShort );
548 nId = aNmTb.Put( "HEIGHT", VARNAME );
549 pTupel->SetVariable( nId, &aShort );
551 return (RscTupel *)pTupel;
554 /*************************************************************************
556 |* RscTypCont::InitLangGeometry()
558 |* Beschreibung
559 |* Ersterstellung MM 24.05.91
560 |* Letzte Aenderung MM 24.05.91
562 *************************************************************************/
563 RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
565 return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
568 /*************************************************************************
570 |* RscTypCont::InitStringList()
572 |* Beschreibung
573 |* Ersterstellung MM 24.05.91
574 |* Letzte Aenderung MM 24.05.91
576 *************************************************************************/
577 RscCont * RscTypCont::InitStringList()
579 RscCont * pCont;
581 pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
582 pCont->SetTypeClass( &aString );
584 return pCont;
587 /*************************************************************************
589 |* RscTypCont::InitLangStringList()
591 |* Beschreibung
592 |* Ersterstellung MM 24.05.91
593 |* Letzte Aenderung MM 24.05.91
595 *************************************************************************/
596 RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
598 return new RscArray( pHS->getID( "Lang_CharsList" ),
599 RSC_NOTYPE, pStrLst, &aLangType );
602 /*************************************************************************
604 |* RscTypCont::InitStringTupel()
606 |* Beschreibung
607 |* Ersterstellung MM 24.05.91
608 |* Letzte Aenderung MM 24.05.91
610 *************************************************************************/
611 RscTupel * RscTypCont::InitStringTupel()
613 RscTop * pTupel;
614 Atom nId;
616 // Clientvariablen einfuegen
617 pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
618 nId = aNmTb.Put( "FILTER", VARNAME );
619 pTupel->SetVariable( nId, &aString );
620 nId = aNmTb.Put( "MASK", VARNAME );
621 pTupel->SetVariable( nId, &aString );
623 return (RscTupel *)pTupel;
626 /*************************************************************************
628 |* RscTypCont::InitStringLongTupel()
630 |* Beschreibung
631 |* Ersterstellung MM 18.07.94
632 |* Letzte Aenderung MM 18.07.94
634 *************************************************************************/
635 RscTupel * RscTypCont::InitStringLongTupel()
637 RscTop * pTupel;
638 Atom nId;
640 // Clientvariablen einfuegen
641 pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
642 nId = aNmTb.Put( "ItemText", VARNAME );
643 pTupel->SetVariable( nId, &aString );
644 nId = aNmTb.Put( "ItemId", VARNAME );
645 pTupel->SetVariable( nId, &aEnumLong );
647 return (RscTupel *)pTupel;
650 /*************************************************************************
652 |* RscTypCont::InitStringTupelList()
654 |* Beschreibung
655 |* Ersterstellung MM 24.05.91
656 |* Letzte Aenderung MM 24.05.91
658 *************************************************************************/
659 RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
661 RscCont * pCont;
663 pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
664 pCont->SetTypeClass( pTupelString );
666 return pCont;
669 /*************************************************************************
671 |* RscTypCont::InitStringLongTupelList()
673 |* Beschreibung
674 |* Ersterstellung MM 24.05.91
675 |* Letzte Aenderung MM 24.05.91
677 *************************************************************************/
678 RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
680 RscCont * pCont;
682 pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
683 pCont->SetTypeClass( pStringLong );
685 return pCont;
688 /*************************************************************************
690 |* RscTypCont::InitLangStringTupelList()
692 |* Beschreibung
693 |* Ersterstellung MM 24.05.91
694 |* Letzte Aenderung MM 24.05.91
696 *************************************************************************/
697 RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
699 return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
700 RSC_NOTYPE, pStrTupelLst, &aLangType );
703 /*************************************************************************
705 |* RscTypCont::InitLangStringLongTupelList()
707 |* Beschreibung
708 |* Ersterstellung MM 24.05.91
709 |* Letzte Aenderung MM 24.05.91
711 *************************************************************************/
712 RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
714 return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
715 RSC_NOTYPE, pStrLongTupelLst, &aLangType );