1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
25 #include <comphelper/string.hxx>
26 #include <i18nlangtag/mslangid.hxx>
27 #include <i18nlangtag/languagetag.hxx>
28 #include <tools/color.hxx>
29 #include <tools/fldunit.hxx>
30 #include <tools/gen.hxx>
31 #include <tools/mapunit.hxx>
33 #include <tools/wintypes.hxx>
34 #include <rsc/rsc-vcl-shared-types.hxx>
36 #include <com/sun/star/awt/Key.hpp>
38 #include <rscconst.hxx>
39 #include <rscarray.hxx>
40 #include <rscclass.hxx>
41 #include <rsccont.hxx>
44 #include <rscyacc.hxx>
46 #include <unordered_map>
48 void RscTypCont::SETCONST( RscConst
* pClass
, const char * szString
, sal_uInt32 nVal
)
50 #if OSL_DEBUG_LEVEL > 2
51 fprintf( stderr
, "setconst : %s\n", szString
);
53 pClass
->SetConstant( aNmTb
.Put( szString
,
54 CONSTNAME
, nVal
), nVal
);
57 void RscTypCont::SETCONST( RscConst
* pClass
, Atom nName
, sal_uInt32 nVal
)
59 #if OSL_DEBUG_LEVEL > 2
60 fprintf( stderr
, "setconst hash: %u\n", (unsigned int)nName
);
62 pClass
->SetConstant( aNmTb
.Put( nName
,
63 CONSTNAME
, nVal
), nVal
);
67 typedef std::unordered_map
< OString
, sal_uInt32
, OStringHash
> langmap
;
68 static langmap ULong_Iso_map
;
70 sal_uInt32
GetLangId(const OString
&rLang
)
72 langmap::iterator pIter
= ULong_Iso_map
.find( rLang
);
73 if ( pIter
!= ULong_Iso_map
.end())
78 void RscLangEnum::Init( RscNameTable
& rNames
)
80 SetConstant( rNames
.Put( "SYSTEM", CONSTNAME
, (long)LANGUAGE_SYSTEM
), LANGUAGE_SYSTEM
);
81 SetConstant( rNames
.Put( "DONTKNOW", CONSTNAME
, LANGUAGE_DONTKNOW
), LANGUAGE_DONTKNOW
);
84 mnLangId
= 0x400; // stay away from selfdefined...
86 const ::std::vector
< MsLangId::LanguagetagMapping
> aList( MsLangId::getDefinedLanguagetags());
87 for (::std::vector
< MsLangId::LanguagetagMapping
>::const_iterator
iTag( aList
.begin()); iTag
!= aList
.end(); ++iTag
)
89 #if OSL_DEBUG_LEVEL > 2
90 fprintf( stderr
, "ISO Language in : %d, 0x%04x, %s\n",
92 (unsigned)(*iTag
).mnLang
,
93 OUStringToOString( (*iTag
).maBcp47
, RTL_TEXTENCODING_ASCII_US
).getStr());
94 fprintf( stderr
, "ISO Language out:");
96 LanguageTag
aLanguageTag( (*iTag
).maBcp47
);
97 ::std::vector
< OUString
> aFallbacks( aLanguageTag
.getFallbackStrings( true));
98 for (::std::vector
< OUString
>::const_iterator
it( aFallbacks
.begin()); it
!= aFallbacks
.end(); ++it
)
100 OString
aLang( OUStringToOString( *it
, RTL_TEXTENCODING_ASCII_US
));
101 SetConstant( rNames
.Put( aLang
.getStr(), CONSTNAME
, mnLangId
), mnLangId
);
102 bool bAdd
= (GetLangId( aLang
) == 0);
104 ULong_Iso_map
[ aLang
] = mnLangId
;
105 #if OSL_DEBUG_LEVEL > 2
106 fprintf( stderr
, " %s 0x%lx (%s)", aLang
.getStr(), mnLangId
, (bAdd
? "added" : "exists") );
110 #if OSL_DEBUG_LEVEL > 2
111 fprintf( stderr
, "\n");
115 // hack - survive "x-no-translate"
116 /* XXX: that ^^^ was the original comment, but we're adding "x-comment"
117 * here? Which is good anyway. */
118 SetConstant( rNames
.Put( "x-comment", CONSTNAME
, mnLangId
), mnLangId
);
121 OString aEnvIsoTokens
= getenv( "RSC_LANG_ISO" );
122 if ( !aEnvIsoTokens
.isEmpty() )
125 sal_uInt16 nTokenCounter
= 0;
126 bool bOneMore
= true;
129 aIsoToken
= aEnvIsoTokens
.getToken(nTokenCounter
, ' ');
130 if ( !aIsoToken
.isEmpty() )
132 SetConstant( rNames
.Put( aIsoToken
.getStr(), CONSTNAME
, mnLangId
), mnLangId
);
133 bool bAdd
= (GetLangId( aIsoToken
) == 0);
135 ULong_Iso_map
[ aIsoToken
] = mnLangId
;
136 #if OSL_DEBUG_LEVEL > 2
137 fprintf( stderr
, "Env ISO Language out: %s 0x%lx (%s)\n",
138 aIsoToken
.getStr(), mnLangId
, (bAdd
? "added" : "exists") );
150 Atom
RscLangEnum::AddLanguage( const char* pLang
, RscNameTable
& rNames
)
155 if( ! rNames
.Get( nResult
= pHS
->getID( pLang
), &aStruct
) )
157 SetConstant( nResult
= rNames
.Put( pLang
, CONSTNAME
, mnLangId
), mnLangId
);
158 // insert new lang to ULong_Iso_map
159 OString
aLang( pLang
);
160 bAdd
= (GetLangId( aLang
) == 0);
162 ULong_Iso_map
[ aLang
] = mnLangId
;
163 // increase id counter
166 #if OSL_DEBUG_LEVEL > 2
167 fprintf( stderr
, "AddLanguage( '%s' ) = %d (%s)\n", pLang
, nResult
, (bAdd
? "added" : "exists") );
172 RscEnum
* RscTypCont::InitLangType()
174 aLangType
.Init( aNmTb
);
178 RscEnum
* RscTypCont::InitFieldUnitsType()
180 RscEnum
* pFieldUnits
;
181 pFieldUnits
= new RscEnum( pHS
->getID( "EnumFieldUnit" ), RSC_NOTYPE
);
183 SETCONST( pFieldUnits
, "FUNIT_NONE", FUNIT_NONE
);
184 SETCONST( pFieldUnits
, "FUNIT_MM", FUNIT_MM
);
185 SETCONST( pFieldUnits
, "FUNIT_CM", FUNIT_CM
);
186 SETCONST( pFieldUnits
, "FUNIT_M", FUNIT_M
);
187 SETCONST( pFieldUnits
, "FUNIT_KM", FUNIT_KM
);
188 SETCONST( pFieldUnits
, "FUNIT_TWIP", FUNIT_TWIP
);
189 SETCONST( pFieldUnits
, "FUNIT_POINT", FUNIT_POINT
);
190 SETCONST( pFieldUnits
, "FUNIT_PICA", FUNIT_PICA
);
191 SETCONST( pFieldUnits
, "FUNIT_INCH", FUNIT_INCH
);
192 SETCONST( pFieldUnits
, "FUNIT_FOOT", FUNIT_FOOT
);
193 SETCONST( pFieldUnits
, "FUNIT_MILE", FUNIT_MILE
);
194 SETCONST( pFieldUnits
, "FUNIT_CUSTOM", FUNIT_CUSTOM
);
195 SETCONST( pFieldUnits
, "FUNIT_CHAR", FUNIT_CHAR
);
196 SETCONST( pFieldUnits
, "FUNIT_LINE", FUNIT_LINE
);
197 SETCONST( pFieldUnits
, "FUNIT_PERCENT", FUNIT_PERCENT
);
198 SETCONST( pFieldUnits
, "FUNIT_DEGREE", FUNIT_DEGREE
);
199 SETCONST( pFieldUnits
, "FUNIT_SECOND", FUNIT_SECOND
);
200 SETCONST( pFieldUnits
, "FUNIT_MILLISECOND", FUNIT_MILLISECOND
);
201 SETCONST( pFieldUnits
, "FUNIT_PIXEL", FUNIT_PIXEL
);
206 RscEnum
* RscTypCont::InitColor()
209 pColor
= new RscEnum( pHS
->getID( "EnumColor" ), RSC_NOTYPE
);
211 SETCONST( pColor
, "COL_BLACK", COL_BLACK
);
212 SETCONST( pColor
, "COL_BLUE", COL_BLUE
);
213 SETCONST( pColor
, "COL_GREEN", COL_GREEN
);
214 SETCONST( pColor
, "COL_CYAN", COL_CYAN
);
215 SETCONST( pColor
, "COL_RED", COL_RED
);
216 SETCONST( pColor
, "COL_MAGENTA", COL_MAGENTA
);
217 SETCONST( pColor
, "COL_BROWN", COL_BROWN
);
218 SETCONST( pColor
, "COL_GRAY", COL_GRAY
);
219 SETCONST( pColor
, "COL_LIGHTGRAY", COL_LIGHTGRAY
);
220 SETCONST( pColor
, "COL_LIGHTBLUE", COL_LIGHTBLUE
);
221 SETCONST( pColor
, "COL_LIGHTGREEN", COL_LIGHTGREEN
);
222 SETCONST( pColor
, "COL_LIGHTCYAN", COL_LIGHTCYAN
);
223 SETCONST( pColor
, "COL_LIGHTRED", COL_LIGHTRED
);
224 SETCONST( pColor
, "COL_LIGHTMAGENTA", COL_LIGHTMAGENTA
);
225 SETCONST( pColor
, "COL_YELLOW", COL_YELLOW
);
226 SETCONST( pColor
, "COL_WHITE", COL_WHITE
);
231 RscEnum
* RscTypCont::InitMapUnit()
234 pMapUnit
= new RscEnum( pHS
->getID( "EnumMapUnit" ), RSC_NOTYPE
);
236 SETCONST( pMapUnit
, "MAP_PIXEL", MAP_PIXEL
);
237 SETCONST( pMapUnit
, "MAP_SYSFONT", MAP_SYSFONT
);
238 SETCONST( pMapUnit
, "MAP_100TH_MM", MAP_100TH_MM
);
239 SETCONST( pMapUnit
, "MAP_10TH_MM", MAP_10TH_MM
);
240 SETCONST( pMapUnit
, "MAP_MM", MAP_MM
);
241 SETCONST( pMapUnit
, "MAP_CM", MAP_CM
);
242 SETCONST( pMapUnit
, "MAP_1000TH_INCH", MAP_1000TH_INCH
);
243 SETCONST( pMapUnit
, "MAP_100TH_INCH", MAP_100TH_INCH
);
244 SETCONST( pMapUnit
, "MAP_10TH_INCH", MAP_10TH_INCH
);
245 SETCONST( pMapUnit
, "MAP_INCH", MAP_INCH
);
246 SETCONST( pMapUnit
, "MAP_POINT", MAP_POINT
);
247 SETCONST( pMapUnit
, "MAP_TWIP", MAP_TWIP
);
248 SETCONST( pMapUnit
, "MAP_APPFONT", MAP_APPFONT
);
249 SETCONST( pMapUnit
, "MAP_SV", RSC_EXTRAMAPUNIT
);
253 RscEnum
* RscTypCont::InitKey()
256 pKey
= new RscEnum( pHS
->getID( "EnumKey" ), RSC_NOTYPE
);
258 SETCONST( pKey
, "KEY_0", com::sun::star::awt::Key::NUM0
);
259 SETCONST( pKey
, "KEY_1", com::sun::star::awt::Key::NUM1
);
260 SETCONST( pKey
, "KEY_2", com::sun::star::awt::Key::NUM2
);
261 SETCONST( pKey
, "KEY_3", com::sun::star::awt::Key::NUM3
);
262 SETCONST( pKey
, "KEY_4", com::sun::star::awt::Key::NUM4
);
263 SETCONST( pKey
, "KEY_5", com::sun::star::awt::Key::NUM5
);
264 SETCONST( pKey
, "KEY_6", com::sun::star::awt::Key::NUM6
);
265 SETCONST( pKey
, "KEY_7", com::sun::star::awt::Key::NUM7
);
266 SETCONST( pKey
, "KEY_8", com::sun::star::awt::Key::NUM8
);
267 SETCONST( pKey
, "KEY_9", com::sun::star::awt::Key::NUM9
);
269 SETCONST( pKey
, "KEY_A", com::sun::star::awt::Key::A
);
270 SETCONST( pKey
, "KEY_B", com::sun::star::awt::Key::B
);
271 SETCONST( pKey
, "KEY_C", com::sun::star::awt::Key::C
);
272 SETCONST( pKey
, "KEY_D", com::sun::star::awt::Key::D
);
273 SETCONST( pKey
, "KEY_E", com::sun::star::awt::Key::E
);
274 SETCONST( pKey
, "KEY_F", com::sun::star::awt::Key::F
);
275 SETCONST( pKey
, "KEY_G", com::sun::star::awt::Key::G
);
276 SETCONST( pKey
, "KEY_H", com::sun::star::awt::Key::H
);
277 SETCONST( pKey
, "KEY_I", com::sun::star::awt::Key::I
);
278 SETCONST( pKey
, "KEY_J", com::sun::star::awt::Key::J
);
279 SETCONST( pKey
, "KEY_K", com::sun::star::awt::Key::K
);
280 SETCONST( pKey
, "KEY_L", com::sun::star::awt::Key::L
);
281 SETCONST( pKey
, "KEY_M", com::sun::star::awt::Key::M
);
282 SETCONST( pKey
, "KEY_N", com::sun::star::awt::Key::N
);
283 SETCONST( pKey
, "KEY_O", com::sun::star::awt::Key::O
);
284 SETCONST( pKey
, "KEY_P", com::sun::star::awt::Key::P
);
285 SETCONST( pKey
, "KEY_Q", com::sun::star::awt::Key::Q
);
286 SETCONST( pKey
, "KEY_R", com::sun::star::awt::Key::R
);
287 SETCONST( pKey
, "KEY_S", com::sun::star::awt::Key::S
);
288 SETCONST( pKey
, "KEY_T", com::sun::star::awt::Key::T
);
289 SETCONST( pKey
, "KEY_U", com::sun::star::awt::Key::U
);
290 SETCONST( pKey
, "KEY_V", com::sun::star::awt::Key::V
);
291 SETCONST( pKey
, "KEY_W", com::sun::star::awt::Key::W
);
292 SETCONST( pKey
, "KEY_X", com::sun::star::awt::Key::X
);
293 SETCONST( pKey
, "KEY_Y", com::sun::star::awt::Key::Y
);
294 SETCONST( pKey
, "KEY_Z", com::sun::star::awt::Key::Z
);
296 SETCONST( pKey
, "KEY_F1", com::sun::star::awt::Key::F1
);
297 SETCONST( pKey
, "KEY_F2", com::sun::star::awt::Key::F2
);
298 SETCONST( pKey
, "KEY_F3", com::sun::star::awt::Key::F3
);
299 SETCONST( pKey
, "KEY_F4", com::sun::star::awt::Key::F4
);
300 SETCONST( pKey
, "KEY_F5", com::sun::star::awt::Key::F5
);
301 SETCONST( pKey
, "KEY_F6", com::sun::star::awt::Key::F6
);
302 SETCONST( pKey
, "KEY_F7", com::sun::star::awt::Key::F7
);
303 SETCONST( pKey
, "KEY_F8", com::sun::star::awt::Key::F8
);
304 SETCONST( pKey
, "KEY_F9", com::sun::star::awt::Key::F9
);
305 SETCONST( pKey
, "KEY_F10", com::sun::star::awt::Key::F10
);
306 SETCONST( pKey
, "KEY_F11", com::sun::star::awt::Key::F11
);
307 SETCONST( pKey
, "KEY_F12", com::sun::star::awt::Key::F12
);
308 SETCONST( pKey
, "KEY_F13", com::sun::star::awt::Key::F13
);
309 SETCONST( pKey
, "KEY_F14", com::sun::star::awt::Key::F14
);
310 SETCONST( pKey
, "KEY_F15", com::sun::star::awt::Key::F15
);
311 SETCONST( pKey
, "KEY_F16", com::sun::star::awt::Key::F16
);
312 SETCONST( pKey
, "KEY_F17", com::sun::star::awt::Key::F17
);
313 SETCONST( pKey
, "KEY_F18", com::sun::star::awt::Key::F18
);
314 SETCONST( pKey
, "KEY_F19", com::sun::star::awt::Key::F19
);
315 SETCONST( pKey
, "KEY_F20", com::sun::star::awt::Key::F20
);
316 SETCONST( pKey
, "KEY_F21", com::sun::star::awt::Key::F21
);
317 SETCONST( pKey
, "KEY_F22", com::sun::star::awt::Key::F22
);
318 SETCONST( pKey
, "KEY_F23", com::sun::star::awt::Key::F23
);
319 SETCONST( pKey
, "KEY_F24", com::sun::star::awt::Key::F24
);
320 SETCONST( pKey
, "KEY_F25", com::sun::star::awt::Key::F25
);
321 SETCONST( pKey
, "KEY_F26", com::sun::star::awt::Key::F26
);
323 SETCONST( pKey
, "KEY_DOWN", com::sun::star::awt::Key::DOWN
);
324 SETCONST( pKey
, "KEY_UP", com::sun::star::awt::Key::UP
);
325 SETCONST( pKey
, "KEY_LEFT", com::sun::star::awt::Key::LEFT
);
326 SETCONST( pKey
, "KEY_RIGHT", com::sun::star::awt::Key::RIGHT
);
327 SETCONST( pKey
, "KEY_HOME", com::sun::star::awt::Key::HOME
);
328 SETCONST( pKey
, "KEY_END", com::sun::star::awt::Key::END
);
329 SETCONST( pKey
, "KEY_PAGEUP", com::sun::star::awt::Key::PAGEUP
);
330 SETCONST( pKey
, "KEY_PAGEDOWN", com::sun::star::awt::Key::PAGEDOWN
);
332 SETCONST( pKey
, "KEY_RETURN", com::sun::star::awt::Key::RETURN
);
333 SETCONST( pKey
, "KEY_ESCAPE", com::sun::star::awt::Key::ESCAPE
);
334 SETCONST( pKey
, "KEY_TAB", com::sun::star::awt::Key::TAB
);
335 SETCONST( pKey
, "KEY_BACKSPACE", com::sun::star::awt::Key::BACKSPACE
);
336 SETCONST( pKey
, "KEY_SPACE", com::sun::star::awt::Key::SPACE
);
337 SETCONST( pKey
, "KEY_INSERT", com::sun::star::awt::Key::INSERT
);
338 SETCONST( pKey
, "KEY_DELETE", com::sun::star::awt::Key::DELETE
);
340 SETCONST( pKey
, "KEY_ADD", com::sun::star::awt::Key::ADD
);
341 SETCONST( pKey
, "KEY_SUBTRACT", com::sun::star::awt::Key::SUBTRACT
);
342 SETCONST( pKey
, "KEY_MULTIPLY", com::sun::star::awt::Key::MULTIPLY
);
343 SETCONST( pKey
, "KEY_DIVIDE", com::sun::star::awt::Key::DIVIDE
);
344 SETCONST( pKey
, "KEY_POINT", com::sun::star::awt::Key::POINT
);
345 SETCONST( pKey
, "KEY_COMMA", com::sun::star::awt::Key::COMMA
);
346 SETCONST( pKey
, "KEY_LESS", com::sun::star::awt::Key::LESS
);
347 SETCONST( pKey
, "KEY_GREATER", com::sun::star::awt::Key::GREATER
);
348 SETCONST( pKey
, "KEY_EQUAL", com::sun::star::awt::Key::EQUAL
);
350 SETCONST( pKey
, "KEY_OPEN", com::sun::star::awt::Key::OPEN
);
351 SETCONST( pKey
, "KEY_CUT", com::sun::star::awt::Key::CUT
);
352 SETCONST( pKey
, "KEY_COPY", com::sun::star::awt::Key::COPY
);
353 SETCONST( pKey
, "KEY_PASTE", com::sun::star::awt::Key::PASTE
);
354 SETCONST( pKey
, "KEY_UNDO", com::sun::star::awt::Key::UNDO
);
355 SETCONST( pKey
, "KEY_REPEAT", com::sun::star::awt::Key::REPEAT
);
356 SETCONST( pKey
, "KEY_FIND", com::sun::star::awt::Key::FIND
);
357 SETCONST( pKey
, "KEY_PROPERTIES", com::sun::star::awt::Key::PROPERTIES
);
358 SETCONST( pKey
, "KEY_FRONT", com::sun::star::awt::Key::FRONT
);
359 SETCONST( pKey
, "KEY_CONTEXTMENU", com::sun::star::awt::Key::CONTEXTMENU
);
360 SETCONST( pKey
, "KEY_HELP", com::sun::star::awt::Key::HELP
);
361 SETCONST( pKey
, "KEY_HANGUL_HANJA", com::sun::star::awt::Key::HANGUL_HANJA
);
362 SETCONST( pKey
, "KEY_DECIMAL", com::sun::star::awt::Key::DECIMAL
);
363 SETCONST( pKey
, "KEY_TILDE", com::sun::star::awt::Key::TILDE
);
364 SETCONST( pKey
, "KEY_QUOTELEFT", com::sun::star::awt::Key::QUOTELEFT
);
369 RscEnum
* RscTypCont::InitTriState()
372 pTriState
= new RscEnum( pHS
->getID( "EnumTriState" ), RSC_NOTYPE
);
374 SETCONST( pTriState
, "STATE_NOCHECK", TRISTATE_FALSE
);
375 SETCONST( pTriState
, "STATE_CHECK", TRISTATE_TRUE
);
376 SETCONST( pTriState
, "STATE_DONTKNOW", TRISTATE_INDET
);
381 RscTupel
* RscTypCont::InitGeometry()
386 // Clientvariablen einfuegen
387 pTupel
= new RscTupel( pHS
->getID( "TupelDeltaSystem" ),
389 nId
= aNmTb
.Put( "X", VARNAME
);
390 pTupel
->SetVariable( nId
, &aShort
);
391 nId
= aNmTb
.Put( "Y", VARNAME
);
392 pTupel
->SetVariable( nId
, &aShort
);
393 nId
= aNmTb
.Put( "WIDTH", VARNAME
);
394 pTupel
->SetVariable( nId
, &aShort
);
395 nId
= aNmTb
.Put( "HEIGHT", VARNAME
);
396 pTupel
->SetVariable( nId
, &aShort
);
398 return static_cast<RscTupel
*>(pTupel
);
401 RscArray
* RscTypCont::InitLangGeometry( RscTupel
* pGeo
)
403 return new RscArray( pHS
->getID( "Lang_TupelGeometry" ), RSC_NOTYPE
, pGeo
, &aLangType
);
406 RscCont
* RscTypCont::InitStringList()
410 pCont
= new RscCont( pHS
->getID( "Chars[]" ), RSC_NOTYPE
);
411 pCont
->SetTypeClass( &aString
);
416 RscArray
* RscTypCont::InitLangStringList( RscCont
* pStrLst
)
418 return new RscArray( pHS
->getID( "Lang_CharsList" ),
419 RSC_NOTYPE
, pStrLst
, &aLangType
);
422 RscTupel
* RscTypCont::InitStringTupel()
427 // Clientvariablen einfuegen
428 pTupel
= new RscTupel( pHS
->getID( "CharsTupel" ), RSC_NOTYPE
, NULL
);
429 nId
= aNmTb
.Put( "FILTER", VARNAME
);
430 pTupel
->SetVariable( nId
, &aString
);
431 nId
= aNmTb
.Put( "MASK", VARNAME
);
432 pTupel
->SetVariable( nId
, &aString
);
434 return static_cast<RscTupel
*>(pTupel
);
437 RscTupel
* RscTypCont::InitStringLongTupel()
442 // Clientvariablen einfuegen
443 pTupel
= new RscTupel( pHS
->getID( "CharsLongTupel" ), RSC_NOTYPE
, NULL
);
444 nId
= aNmTb
.Put( "ItemText", VARNAME
);
445 pTupel
->SetVariable( nId
, &aString
);
446 nId
= aNmTb
.Put( "ItemId", VARNAME
);
447 pTupel
->SetVariable( nId
, &aEnumLong
);
449 return static_cast<RscTupel
*>(pTupel
);
452 RscCont
* RscTypCont::InitStringTupelList( RscTupel
* pTupelString
)
456 pCont
= new RscCont( pHS
->getID( "CharsCharsTupel[]" ), RSC_NOTYPE
);
457 pCont
->SetTypeClass( pTupelString
);
462 RscCont
* RscTypCont::InitStringLongTupelList( RscTupel
* pStringLong
)
466 pCont
= new RscCont( pHS
->getID( "CharsLongTupel[]" ), RSC_NOTYPE
);
467 pCont
->SetTypeClass( pStringLong
);
472 RscArray
* RscTypCont::InitLangStringTupelList( RscCont
* pStrTupelLst
)
474 return new RscArray( pHS
->getID( "Lang_CharsCharsTupel" ),
475 RSC_NOTYPE
, pStrTupelLst
, &aLangType
);
478 RscArray
* RscTypCont::InitLangStringLongTupelList( RscCont
* pStrLongTupelLst
)
480 return new RscArray( pHS
->getID( "Lang_CharsLongTupelList" ),
481 RSC_NOTYPE
, pStrLongTupelLst
, &aLangType
);
484 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */