fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / rsc / source / parser / rscibas.cxx
blobddbdd870875f2d9688eef14ba23fdada6d62a183
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <stdlib.h>
22 #include <stdio.h>
23 #include <string.h>
25 #include <i18nlangtag/mslangid.hxx>
26 #include <i18nlangtag/languagetag.hxx>
27 #include <comphelper/string.hxx>
28 #include <tools/rc.h>
29 #include <tools/color.hxx>
31 #include <vclrsc.hxx>
32 #include <rscconst.hxx>
33 #include <rscarray.hxx>
34 #include <rscclass.hxx>
35 #include <rsccont.hxx>
36 #include <rscdb.hxx>
39 #include <rsclex.hxx>
40 #include <rscyacc.hxx>
42 #include <boost/unordered_map.hpp>
44 void RscTypCont::SETCONST( RscConst * pClass, const char * szString, sal_uInt32 nVal )
46 #if OSL_DEBUG_LEVEL > 2
47 fprintf( stderr, "setconst : %s\n", szString );
48 #endif
49 pClass->SetConstant( aNmTb.Put( szString,
50 CONSTNAME, nVal ), nVal );
53 void RscTypCont::SETCONST( RscConst * pClass, Atom nName, sal_uInt32 nVal )
55 #if OSL_DEBUG_LEVEL > 2
56 fprintf( stderr, "setconst hash: %u\n", (unsigned int)nName );
57 #endif
58 pClass->SetConstant( aNmTb.Put( nName,
59 CONSTNAME, nVal ), nVal );
63 typedef boost::unordered_map< OString, sal_uInt32, OStringHash > langmap;
64 static langmap ULong_Iso_map;
66 sal_uInt32 GetLangId(const OString &rLang)
68 langmap::iterator pIter = ULong_Iso_map.find( rLang );
69 if ( pIter != ULong_Iso_map.end())
70 return pIter->second;
71 return 0;
74 void RscLangEnum::Init( RscNameTable& rNames )
76 SetConstant( rNames.Put( "SYSTEM", CONSTNAME, (long)LANGUAGE_SYSTEM ), LANGUAGE_SYSTEM );
77 SetConstant( rNames.Put( "DONTKNOW", CONSTNAME, LANGUAGE_DONTKNOW ), LANGUAGE_DONTKNOW );
79 sal_Int32 nIndex = 0;
80 mnLangId = 0x400; // stay away from selfdefined...
81 const MsLangId::IsoLangEntry* pLangEntry;
83 while ( NULL != ( pLangEntry = MsLangId::getIsoLangEntry( nIndex )) && ( pLangEntry->mnLang != LANGUAGE_DONTKNOW ))
85 #if OSL_DEBUG_LEVEL > 2
86 fprintf( stderr, "ISO Language in : %d, 0x%04x, %s\n",
87 (int)nIndex,
88 (unsigned)pLangEntry->mnLang,
89 OUStringToOString( pLangEntry->getTagString(), RTL_TEXTENCODING_ASCII_US).getStr());
90 fprintf( stderr, "ISO Language out:");
91 #endif
92 LanguageTag aLanguageTag( pLangEntry->getTagString());
93 ::std::vector< OUString > aFallbacks( aLanguageTag.getFallbackStrings());
94 for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
96 OString aLang( OUStringToOString( *it, RTL_TEXTENCODING_ASCII_US));
97 SetConstant( rNames.Put( aLang.getStr(), CONSTNAME, mnLangId ), mnLangId );
98 bool bAdd = (GetLangId( aLang ) == 0);
99 if ( bAdd )
100 ULong_Iso_map[ aLang ] = mnLangId;
101 #if OSL_DEBUG_LEVEL > 2
102 fprintf( stderr, " %s 0x%lx (%s)", aLang.getStr(), mnLangId, (bAdd ? "added" : "exists") );
103 #endif
104 mnLangId++;
106 #if OSL_DEBUG_LEVEL > 2
107 fprintf( stderr, "\n");
108 #endif
109 nIndex++;
111 // hack - survive "x-no-translate"
112 /* XXX: that ^^^ was the original comment, but we're adding "x-comment"
113 * here? Which is good anyway. */
114 SetConstant( rNames.Put( "x-comment", CONSTNAME, mnLangId ), mnLangId );
115 mnLangId++;
117 OString aEnvIsoTokens = getenv( "RSC_LANG_ISO" );
118 if ( !aEnvIsoTokens.isEmpty() )
120 OString aIsoToken;
121 sal_uInt16 nTokenCounter = 0;
122 sal_Bool bOneMore = 1;
123 while ( bOneMore )
125 aIsoToken = comphelper::string::getToken(aEnvIsoTokens, nTokenCounter, ' ');
126 if ( !aIsoToken.isEmpty() )
128 SetConstant( rNames.Put( aIsoToken.getStr(), CONSTNAME, mnLangId ), mnLangId );
129 bool bAdd = (GetLangId( aIsoToken ) == 0);
130 if ( bAdd )
131 ULong_Iso_map[ aIsoToken ] = mnLangId;
132 #if OSL_DEBUG_LEVEL > 2
133 fprintf( stderr, "Env ISO Language out: %s 0x%lx (%s)\n",
134 aIsoToken.getStr(), mnLangId, (bAdd ? "added" : "exists") );
135 #endif
136 mnLangId++;
138 else
139 bOneMore = 0;
140 nTokenCounter++;
145 Atom RscLangEnum::AddLanguage( const char* pLang, RscNameTable& rNames )
147 Atom nResult = 0;
148 bool bAdd = false;
149 KEY_STRUCT aStruct;
150 if( ! rNames.Get( nResult = pHS->getID( pLang ), &aStruct ) )
152 SetConstant( nResult = rNames.Put( pLang, CONSTNAME, mnLangId ), mnLangId );
153 // insert new lang to ULong_Iso_map
154 OString aLang( pLang );
155 bAdd = (GetLangId( aLang ) == 0);
156 if ( bAdd )
157 ULong_Iso_map[ aLang ] = mnLangId;
158 // increase id counter
159 mnLangId++;
161 #if OSL_DEBUG_LEVEL > 2
162 fprintf( stderr, "AddLanguage( '%s' ) = %d (%s)\n", pLang, nResult, (bAdd ? "added" : "exists") );
163 #endif
164 return nResult;
167 RscEnum * RscTypCont::InitLangType()
169 aLangType.Init( aNmTb );
170 return( &aLangType );
173 RscEnum * RscTypCont::InitFieldUnitsType()
175 RscEnum * pFieldUnits;
176 pFieldUnits = new RscEnum( pHS->getID( "EnumFieldUnit" ), RSC_NOTYPE );
178 SETCONST( pFieldUnits, "FUNIT_NONE", FUNIT_NONE );
179 SETCONST( pFieldUnits, "FUNIT_MM", FUNIT_MM );
180 SETCONST( pFieldUnits, "FUNIT_CM", FUNIT_CM );
181 SETCONST( pFieldUnits, "FUNIT_M", FUNIT_M );
182 SETCONST( pFieldUnits, "FUNIT_KM", FUNIT_KM );
183 SETCONST( pFieldUnits, "FUNIT_TWIP", FUNIT_TWIP );
184 SETCONST( pFieldUnits, "FUNIT_POINT", FUNIT_POINT );
185 SETCONST( pFieldUnits, "FUNIT_PICA", FUNIT_PICA );
186 SETCONST( pFieldUnits, "FUNIT_INCH", FUNIT_INCH );
187 SETCONST( pFieldUnits, "FUNIT_FOOT", FUNIT_FOOT );
188 SETCONST( pFieldUnits, "FUNIT_MILE", FUNIT_MILE );
189 SETCONST( pFieldUnits, "FUNIT_CUSTOM", FUNIT_CUSTOM );
190 SETCONST( pFieldUnits, "FUNIT_CHAR", FUNIT_CHAR );
191 SETCONST( pFieldUnits, "FUNIT_LINE", FUNIT_LINE );
192 SETCONST( pFieldUnits, "FUNIT_PERCENT", FUNIT_PERCENT );
194 return pFieldUnits;
197 RscEnum * RscTypCont::InitTimeFieldFormat()
199 RscEnum * pTimeFieldFormat;
200 pTimeFieldFormat = new RscEnum( pHS->getID( "EnumTimeFieldFormat" ),
201 RSC_NOTYPE );
203 SETCONST( pTimeFieldFormat, "TIMEF_NONE", TIMEF_NONE );
204 SETCONST( pTimeFieldFormat, "TIMEF_SEC", TIMEF_SEC );
205 SETCONST( pTimeFieldFormat, "TIMEF_100TH_SEC", TIMEF_100TH_SEC );
207 return pTimeFieldFormat;
210 RscEnum * RscTypCont::InitColor(){
211 RscEnum * pColor;
212 pColor = new RscEnum( pHS->getID( "EnumColor" ), RSC_NOTYPE );
214 SETCONST( pColor, "COL_BLACK", COL_BLACK );
215 SETCONST( pColor, "COL_BLUE", COL_BLUE );
216 SETCONST( pColor, "COL_GREEN", COL_GREEN );
217 SETCONST( pColor, "COL_CYAN", COL_CYAN );
218 SETCONST( pColor, "COL_RED", COL_RED );
219 SETCONST( pColor, "COL_MAGENTA", COL_MAGENTA );
220 SETCONST( pColor, "COL_BROWN", COL_BROWN );
221 SETCONST( pColor, "COL_GRAY", COL_GRAY );
222 SETCONST( pColor, "COL_LIGHTGRAY", COL_LIGHTGRAY );
223 SETCONST( pColor, "COL_LIGHTBLUE", COL_LIGHTBLUE );
224 SETCONST( pColor, "COL_LIGHTGREEN", COL_LIGHTGREEN );
225 SETCONST( pColor, "COL_LIGHTCYAN", COL_LIGHTCYAN );
226 SETCONST( pColor, "COL_LIGHTRED", COL_LIGHTRED );
227 SETCONST( pColor, "COL_LIGHTMAGENTA", COL_LIGHTMAGENTA );
228 SETCONST( pColor, "COL_YELLOW", COL_YELLOW );
229 SETCONST( pColor, "COL_WHITE", COL_WHITE );
231 return( pColor );
234 RscEnum * RscTypCont::InitMapUnit(){
235 RscEnum * pMapUnit;
236 pMapUnit = new RscEnum( pHS->getID( "EnumMapUnit" ), RSC_NOTYPE );
238 SETCONST( pMapUnit, "MAP_PIXEL", MAP_PIXEL );
239 SETCONST( pMapUnit, "MAP_SYSFONT", MAP_SYSFONT );
240 SETCONST( pMapUnit, "MAP_100TH_MM", MAP_100TH_MM );
241 SETCONST( pMapUnit, "MAP_10TH_MM", MAP_10TH_MM );
242 SETCONST( pMapUnit, "MAP_MM", MAP_MM );
243 SETCONST( pMapUnit, "MAP_CM", MAP_CM );
244 SETCONST( pMapUnit, "MAP_1000TH_INCH", MAP_1000TH_INCH );
245 SETCONST( pMapUnit, "MAP_100TH_INCH", MAP_100TH_INCH );
246 SETCONST( pMapUnit, "MAP_10TH_INCH", MAP_10TH_INCH );
247 SETCONST( pMapUnit, "MAP_INCH", MAP_INCH );
248 SETCONST( pMapUnit, "MAP_POINT", MAP_POINT );
249 SETCONST( pMapUnit, "MAP_TWIP", MAP_TWIP );
250 SETCONST( pMapUnit, "MAP_APPFONT", MAP_APPFONT );
251 SETCONST( pMapUnit, "MAP_SV", RSC_EXTRAMAPUNIT );
252 return( pMapUnit );
255 RscEnum * RscTypCont::InitKey(){
256 RscEnum * pKey;
257 pKey = new RscEnum( pHS->getID( "EnumKey" ), RSC_NOTYPE );
259 SETCONST( pKey, "KEY_0", com::sun::star::awt::Key::NUM0 );
260 SETCONST( pKey, "KEY_1", com::sun::star::awt::Key::NUM1 );
261 SETCONST( pKey, "KEY_2", com::sun::star::awt::Key::NUM2 );
262 SETCONST( pKey, "KEY_3", com::sun::star::awt::Key::NUM3 );
263 SETCONST( pKey, "KEY_4", com::sun::star::awt::Key::NUM4 );
264 SETCONST( pKey, "KEY_5", com::sun::star::awt::Key::NUM5 );
265 SETCONST( pKey, "KEY_6", com::sun::star::awt::Key::NUM6 );
266 SETCONST( pKey, "KEY_7", com::sun::star::awt::Key::NUM7 );
267 SETCONST( pKey, "KEY_8", com::sun::star::awt::Key::NUM8 );
268 SETCONST( pKey, "KEY_9", com::sun::star::awt::Key::NUM9 );
270 SETCONST( pKey, "KEY_A", com::sun::star::awt::Key::A );
271 SETCONST( pKey, "KEY_B", com::sun::star::awt::Key::B );
272 SETCONST( pKey, "KEY_C", com::sun::star::awt::Key::C );
273 SETCONST( pKey, "KEY_D", com::sun::star::awt::Key::D );
274 SETCONST( pKey, "KEY_E", com::sun::star::awt::Key::E );
275 SETCONST( pKey, "KEY_F", com::sun::star::awt::Key::F );
276 SETCONST( pKey, "KEY_G", com::sun::star::awt::Key::G );
277 SETCONST( pKey, "KEY_H", com::sun::star::awt::Key::H );
278 SETCONST( pKey, "KEY_I", com::sun::star::awt::Key::I );
279 SETCONST( pKey, "KEY_J", com::sun::star::awt::Key::J );
280 SETCONST( pKey, "KEY_K", com::sun::star::awt::Key::K );
281 SETCONST( pKey, "KEY_L", com::sun::star::awt::Key::L );
282 SETCONST( pKey, "KEY_M", com::sun::star::awt::Key::M );
283 SETCONST( pKey, "KEY_N", com::sun::star::awt::Key::N );
284 SETCONST( pKey, "KEY_O", com::sun::star::awt::Key::O );
285 SETCONST( pKey, "KEY_P", com::sun::star::awt::Key::P );
286 SETCONST( pKey, "KEY_Q", com::sun::star::awt::Key::Q );
287 SETCONST( pKey, "KEY_R", com::sun::star::awt::Key::R );
288 SETCONST( pKey, "KEY_S", com::sun::star::awt::Key::S );
289 SETCONST( pKey, "KEY_T", com::sun::star::awt::Key::T );
290 SETCONST( pKey, "KEY_U", com::sun::star::awt::Key::U );
291 SETCONST( pKey, "KEY_V", com::sun::star::awt::Key::V );
292 SETCONST( pKey, "KEY_W", com::sun::star::awt::Key::W );
293 SETCONST( pKey, "KEY_X", com::sun::star::awt::Key::X );
294 SETCONST( pKey, "KEY_Y", com::sun::star::awt::Key::Y );
295 SETCONST( pKey, "KEY_Z", com::sun::star::awt::Key::Z );
297 SETCONST( pKey, "KEY_F1", com::sun::star::awt::Key::F1 );
298 SETCONST( pKey, "KEY_F2", com::sun::star::awt::Key::F2 );
299 SETCONST( pKey, "KEY_F3", com::sun::star::awt::Key::F3 );
300 SETCONST( pKey, "KEY_F4", com::sun::star::awt::Key::F4 );
301 SETCONST( pKey, "KEY_F5", com::sun::star::awt::Key::F5 );
302 SETCONST( pKey, "KEY_F6", com::sun::star::awt::Key::F6 );
303 SETCONST( pKey, "KEY_F7", com::sun::star::awt::Key::F7 );
304 SETCONST( pKey, "KEY_F8", com::sun::star::awt::Key::F8 );
305 SETCONST( pKey, "KEY_F9", com::sun::star::awt::Key::F9 );
306 SETCONST( pKey, "KEY_F10", com::sun::star::awt::Key::F10 );
307 SETCONST( pKey, "KEY_F11", com::sun::star::awt::Key::F11 );
308 SETCONST( pKey, "KEY_F12", com::sun::star::awt::Key::F12 );
309 SETCONST( pKey, "KEY_F13", com::sun::star::awt::Key::F13 );
310 SETCONST( pKey, "KEY_F14", com::sun::star::awt::Key::F14 );
311 SETCONST( pKey, "KEY_F15", com::sun::star::awt::Key::F15 );
312 SETCONST( pKey, "KEY_F16", com::sun::star::awt::Key::F16 );
313 SETCONST( pKey, "KEY_F17", com::sun::star::awt::Key::F17 );
314 SETCONST( pKey, "KEY_F18", com::sun::star::awt::Key::F18 );
315 SETCONST( pKey, "KEY_F19", com::sun::star::awt::Key::F19 );
316 SETCONST( pKey, "KEY_F20", com::sun::star::awt::Key::F20 );
317 SETCONST( pKey, "KEY_F21", com::sun::star::awt::Key::F21 );
318 SETCONST( pKey, "KEY_F22", com::sun::star::awt::Key::F22 );
319 SETCONST( pKey, "KEY_F23", com::sun::star::awt::Key::F23 );
320 SETCONST( pKey, "KEY_F24", com::sun::star::awt::Key::F24 );
321 SETCONST( pKey, "KEY_F25", com::sun::star::awt::Key::F25 );
322 SETCONST( pKey, "KEY_F26", com::sun::star::awt::Key::F26 );
324 SETCONST( pKey, "KEY_DOWN", com::sun::star::awt::Key::DOWN );
325 SETCONST( pKey, "KEY_UP", com::sun::star::awt::Key::UP );
326 SETCONST( pKey, "KEY_LEFT", com::sun::star::awt::Key::LEFT );
327 SETCONST( pKey, "KEY_RIGHT", com::sun::star::awt::Key::RIGHT );
328 SETCONST( pKey, "KEY_HOME", com::sun::star::awt::Key::HOME );
329 SETCONST( pKey, "KEY_END", com::sun::star::awt::Key::END );
330 SETCONST( pKey, "KEY_PAGEUP", com::sun::star::awt::Key::PAGEUP );
331 SETCONST( pKey, "KEY_PAGEDOWN", com::sun::star::awt::Key::PAGEDOWN );
333 SETCONST( pKey, "KEY_RETURN", com::sun::star::awt::Key::RETURN );
334 SETCONST( pKey, "KEY_ESCAPE", com::sun::star::awt::Key::ESCAPE );
335 SETCONST( pKey, "KEY_TAB", com::sun::star::awt::Key::TAB );
336 SETCONST( pKey, "KEY_BACKSPACE", com::sun::star::awt::Key::BACKSPACE );
337 SETCONST( pKey, "KEY_SPACE", com::sun::star::awt::Key::SPACE );
338 SETCONST( pKey, "KEY_INSERT", com::sun::star::awt::Key::INSERT );
339 SETCONST( pKey, "KEY_DELETE", com::sun::star::awt::Key::DELETE );
341 SETCONST( pKey, "KEY_ADD", com::sun::star::awt::Key::ADD );
342 SETCONST( pKey, "KEY_SUBTRACT", com::sun::star::awt::Key::SUBTRACT );
343 SETCONST( pKey, "KEY_MULTIPLY", com::sun::star::awt::Key::MULTIPLY );
344 SETCONST( pKey, "KEY_DIVIDE", com::sun::star::awt::Key::DIVIDE );
345 SETCONST( pKey, "KEY_POINT", com::sun::star::awt::Key::POINT );
346 SETCONST( pKey, "KEY_COMMA", com::sun::star::awt::Key::COMMA );
347 SETCONST( pKey, "KEY_LESS", com::sun::star::awt::Key::LESS );
348 SETCONST( pKey, "KEY_GREATER", com::sun::star::awt::Key::GREATER );
349 SETCONST( pKey, "KEY_EQUAL", com::sun::star::awt::Key::EQUAL );
351 SETCONST( pKey, "KEY_OPEN", com::sun::star::awt::Key::OPEN );
352 SETCONST( pKey, "KEY_CUT", com::sun::star::awt::Key::CUT );
353 SETCONST( pKey, "KEY_COPY", com::sun::star::awt::Key::COPY );
354 SETCONST( pKey, "KEY_PASTE", com::sun::star::awt::Key::PASTE );
355 SETCONST( pKey, "KEY_UNDO", com::sun::star::awt::Key::UNDO );
356 SETCONST( pKey, "KEY_REPEAT", com::sun::star::awt::Key::REPEAT );
357 SETCONST( pKey, "KEY_FIND", com::sun::star::awt::Key::FIND );
358 SETCONST( pKey, "KEY_PROPERTIES", com::sun::star::awt::Key::PROPERTIES );
359 SETCONST( pKey, "KEY_FRONT", com::sun::star::awt::Key::FRONT );
360 SETCONST( pKey, "KEY_CONTEXTMENU", com::sun::star::awt::Key::CONTEXTMENU );
361 SETCONST( pKey, "KEY_HELP", com::sun::star::awt::Key::HELP );
362 SETCONST( pKey, "KEY_HANGUL_HANJA", com::sun::star::awt::Key::HANGUL_HANJA );
363 SETCONST( pKey, "KEY_DECIMAL", com::sun::star::awt::Key::DECIMAL );
364 SETCONST( pKey, "KEY_TILDE", com::sun::star::awt::Key::TILDE );
365 SETCONST( pKey, "KEY_QUOTELEFT", com::sun::star::awt::Key::QUOTELEFT );
367 return( pKey );
370 RscEnum * RscTypCont::InitTriState(){
371 RscEnum * pTriState;
372 pTriState = new RscEnum( pHS->getID( "EnumTriState" ), RSC_NOTYPE );
374 SETCONST( pTriState, "STATE_NOCHECK", STATE_NOCHECK );
375 SETCONST( pTriState, "STATE_CHECK", STATE_CHECK );
376 SETCONST( pTriState, "STATE_DONTKNOW", STATE_DONTKNOW );
378 return( pTriState );
381 RscEnum * RscTypCont::InitMessButtons()
383 RscEnum * pMessButtons;
384 pMessButtons = new RscEnum( pHS->getID( "EnumMessButtons" ), RSC_NOTYPE );
385 SETCONST( pMessButtons, "WB_OK", sal::static_int_cast<sal_uInt32>(WB_OK) );
386 SETCONST( pMessButtons, "WB_OK_CANCEL", sal::static_int_cast<sal_uInt32>(WB_OK_CANCEL) );
387 SETCONST( pMessButtons, "WB_YES_NO", sal::static_int_cast<sal_uInt32>(WB_YES_NO) );
388 SETCONST( pMessButtons, "WB_YES_NO_CANCEL", sal::static_int_cast<sal_uInt32>(WB_YES_NO_CANCEL) );
389 SETCONST( pMessButtons, "WB_RETRY_CANCEL", sal::static_int_cast<sal_uInt32>(WB_RETRY_CANCEL) );
390 SETCONST( pMessButtons, "WB_ABORT_RETRY_IGNORE", sal::static_int_cast<sal_uInt32>(WB_ABORT_RETRY_IGNORE) );
391 return( pMessButtons );
394 RscEnum * RscTypCont::InitMessDefButton(){
395 RscEnum * pMessDefButton;
396 pMessDefButton = new RscEnum( pHS->getID( "EnumMessDefButton" ),
397 RSC_NOTYPE );
399 SETCONST( pMessDefButton, "WB_DEF_OK", sal::static_int_cast<sal_uInt32>(WB_DEF_OK) );
400 SETCONST( pMessDefButton, "WB_DEF_CANCEL", sal::static_int_cast<sal_uInt32>(WB_DEF_CANCEL) );
401 SETCONST( pMessDefButton, "WB_DEF_RETRY", sal::static_int_cast<sal_uInt32>(WB_DEF_RETRY) );
402 SETCONST( pMessDefButton, "WB_DEF_YES", sal::static_int_cast<sal_uInt32>(WB_DEF_YES) );
403 SETCONST( pMessDefButton, "WB_DEF_NO", sal::static_int_cast<sal_uInt32>(WB_DEF_NO) );
404 SETCONST( pMessDefButton, "WB_DEF_IGNORE", sal::static_int_cast<sal_uInt32>(WB_DEF_IGNORE) );
405 return( pMessDefButton );
408 RscTupel * RscTypCont::InitGeometry()
410 RscTop * pTupel;
411 Atom nId;
413 // Clientvariablen einfuegen
414 pTupel = new RscTupel( pHS->getID( "TupelDeltaSystem" ),
415 RSC_NOTYPE, NULL );
416 nId = aNmTb.Put( "X", VARNAME );
417 pTupel->SetVariable( nId, &aShort );
418 nId = aNmTb.Put( "Y", VARNAME );
419 pTupel->SetVariable( nId, &aShort );
420 nId = aNmTb.Put( "WIDTH", VARNAME );
421 pTupel->SetVariable( nId, &aShort );
422 nId = aNmTb.Put( "HEIGHT", VARNAME );
423 pTupel->SetVariable( nId, &aShort );
425 return (RscTupel *)pTupel;
428 RscArray * RscTypCont::InitLangGeometry( RscTupel * pGeo )
430 return new RscArray( pHS->getID( "Lang_TupelGeometry" ), RSC_NOTYPE, pGeo, &aLangType );
433 RscCont * RscTypCont::InitStringList()
435 RscCont * pCont;
437 pCont = new RscCont( pHS->getID( "Chars[]" ), RSC_NOTYPE );
438 pCont->SetTypeClass( &aString );
440 return pCont;
443 RscArray * RscTypCont::InitLangStringList( RscCont * pStrLst )
445 return new RscArray( pHS->getID( "Lang_CharsList" ),
446 RSC_NOTYPE, pStrLst, &aLangType );
449 RscTupel * RscTypCont::InitStringTupel()
451 RscTop * pTupel;
452 Atom nId;
454 // Clientvariablen einfuegen
455 pTupel = new RscTupel( pHS->getID( "CharsTupel" ), RSC_NOTYPE, NULL );
456 nId = aNmTb.Put( "FILTER", VARNAME );
457 pTupel->SetVariable( nId, &aString );
458 nId = aNmTb.Put( "MASK", VARNAME );
459 pTupel->SetVariable( nId, &aString );
461 return (RscTupel *)pTupel;
464 RscTupel * RscTypCont::InitStringLongTupel()
466 RscTop * pTupel;
467 Atom nId;
469 // Clientvariablen einfuegen
470 pTupel = new RscTupel( pHS->getID( "CharsLongTupel" ), RSC_NOTYPE, NULL );
471 nId = aNmTb.Put( "ItemText", VARNAME );
472 pTupel->SetVariable( nId, &aString );
473 nId = aNmTb.Put( "ItemId", VARNAME );
474 pTupel->SetVariable( nId, &aEnumLong );
476 return (RscTupel *)pTupel;
479 RscCont * RscTypCont::InitStringTupelList( RscTupel * pTupelString )
481 RscCont * pCont;
483 pCont = new RscCont( pHS->getID( "CharsCharsTupel[]" ), RSC_NOTYPE );
484 pCont->SetTypeClass( pTupelString );
486 return pCont;
489 RscCont * RscTypCont::InitStringLongTupelList( RscTupel * pStringLong )
491 RscCont * pCont;
493 pCont = new RscCont( pHS->getID( "CharsLongTupel[]" ), RSC_NOTYPE );
494 pCont->SetTypeClass( pStringLong );
496 return pCont;
499 RscArray * RscTypCont::InitLangStringTupelList( RscCont * pStrTupelLst )
501 return new RscArray( pHS->getID( "Lang_CharsCharsTupel" ),
502 RSC_NOTYPE, pStrTupelLst, &aLangType );
505 RscArray * RscTypCont::InitLangStringLongTupelList( RscCont * pStrLongTupelLst )
507 return new RscArray( pHS->getID( "Lang_CharsLongTupelList" ),
508 RSC_NOTYPE, pStrLongTupelLst, &aLangType );
511 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */