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