xref: /AOO41X/main/rsc/source/res/rscconst.cxx (revision 477794c15c6b4ddeee1d73cab1de4160cfe6efef)
1*477794c1SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*477794c1SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*477794c1SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*477794c1SAndrew Rist  * distributed with this work for additional information
6*477794c1SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*477794c1SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*477794c1SAndrew Rist  * "License"); you may not use this file except in compliance
9*477794c1SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*477794c1SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*477794c1SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*477794c1SAndrew Rist  * software distributed under the License is distributed on an
15*477794c1SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*477794c1SAndrew Rist  * KIND, either express or implied.  See the License for the
17*477794c1SAndrew Rist  * specific language governing permissions and limitations
18*477794c1SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*477794c1SAndrew Rist  *************************************************************/
21*477794c1SAndrew Rist 
22*477794c1SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_rsc.hxx"
26cdf0e10cSrcweir /****************** I N C L U D E S **************************************/
27cdf0e10cSrcweir 
28cdf0e10cSrcweir // C and C++ Includes.
29cdf0e10cSrcweir #include <cstdlib>
30cdf0e10cSrcweir #include <cstdio>
31cdf0e10cSrcweir #include <cstring>
32cdf0e10cSrcweir 
33cdf0e10cSrcweir // Solar Definitionen
34cdf0e10cSrcweir #include <tools/solar.h>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir // Programmabhaengige Includes.
37cdf0e10cSrcweir #include <rscconst.hxx>
38cdf0e10cSrcweir #include <rscall.h>
39cdf0e10cSrcweir #include <rschash.hxx>
40cdf0e10cSrcweir #include <tools/resid.hxx>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir /****************** C O D E **********************************************/
43cdf0e10cSrcweir /****************** R s c C o n s t **************************************/
44cdf0e10cSrcweir /*************************************************************************
45cdf0e10cSrcweir |*
46cdf0e10cSrcweir |*    RscConst::RscConst()
47cdf0e10cSrcweir |*
48cdf0e10cSrcweir |*    Beschreibung
49cdf0e10cSrcweir |*    Ersterstellung    MM 03.05.91
50cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.05.91
51cdf0e10cSrcweir |*
52cdf0e10cSrcweir *************************************************************************/
RscConst(Atom nId,sal_uInt32 nTypeId)53cdf0e10cSrcweir RscConst::RscConst( Atom nId, sal_uInt32 nTypeId )
54cdf0e10cSrcweir     : RscTop( nId, nTypeId )
55cdf0e10cSrcweir {
56cdf0e10cSrcweir     pVarArray = NULL;
57cdf0e10cSrcweir     nEntries = 0;
58cdf0e10cSrcweir }
59cdf0e10cSrcweir 
60cdf0e10cSrcweir /*************************************************************************
61cdf0e10cSrcweir |*
62cdf0e10cSrcweir |*    RscConst::~RscConst()
63cdf0e10cSrcweir |*
64cdf0e10cSrcweir |*    Beschreibung
65cdf0e10cSrcweir |*    Ersterstellung    MM 03.05.91
66cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.05.91
67cdf0e10cSrcweir |*
68cdf0e10cSrcweir *************************************************************************/
~RscConst()69cdf0e10cSrcweir RscConst::~RscConst()
70cdf0e10cSrcweir {
71cdf0e10cSrcweir     if( pVarArray )
72cdf0e10cSrcweir         rtl_freeMemory( (void *)pVarArray );
73cdf0e10cSrcweir }
74cdf0e10cSrcweir 
75cdf0e10cSrcweir /*************************************************************************
76cdf0e10cSrcweir |*
77cdf0e10cSrcweir |*    RscConst::GetClassType()
78cdf0e10cSrcweir |*
79cdf0e10cSrcweir |*    Beschreibung
80cdf0e10cSrcweir |*    Ersterstellung    MM 03.05.91
81cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.05.91
82cdf0e10cSrcweir |*
83cdf0e10cSrcweir *************************************************************************/
GetClassType() const84cdf0e10cSrcweir RSCCLASS_TYPE RscConst::GetClassType() const
85cdf0e10cSrcweir {
86cdf0e10cSrcweir 	return RSCCLASS_CONST;
87cdf0e10cSrcweir }
88cdf0e10cSrcweir 
89cdf0e10cSrcweir /*************************************************************************
90cdf0e10cSrcweir |*
91cdf0e10cSrcweir |*    RscConst::SetConstance()
92cdf0e10cSrcweir |*
93cdf0e10cSrcweir |*    Beschreibung
94cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
95cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
96cdf0e10cSrcweir |*
97cdf0e10cSrcweir *************************************************************************/
SetConstant(Atom nVarName,sal_Int32 lValue)98cdf0e10cSrcweir ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ){
99cdf0e10cSrcweir     if( pVarArray )
100cdf0e10cSrcweir         pVarArray = (VarEle *)
101cdf0e10cSrcweir             rtl_reallocateMemory( (void *)pVarArray,
102cdf0e10cSrcweir                 ((nEntries +1) * sizeof( VarEle )) );
103cdf0e10cSrcweir     else
104cdf0e10cSrcweir         pVarArray = (VarEle *)
105cdf0e10cSrcweir             rtl_allocateMemory( ((nEntries +1) * sizeof( VarEle )) );
106cdf0e10cSrcweir     pVarArray[ nEntries ].nId     = nVarName;
107cdf0e10cSrcweir     pVarArray[ nEntries ].lValue  = lValue;
108cdf0e10cSrcweir     nEntries++;
109cdf0e10cSrcweir 
110cdf0e10cSrcweir     return( ERR_OK );
111cdf0e10cSrcweir }
112cdf0e10cSrcweir 
113cdf0e10cSrcweir /*************************************************************************
114cdf0e10cSrcweir |*
115cdf0e10cSrcweir |*    RscConst::GetConstance()
116cdf0e10cSrcweir |*
117cdf0e10cSrcweir |*    Beschreibung
118cdf0e10cSrcweir |*    Ersterstellung    MM 15.05.91
119cdf0e10cSrcweir |*    Letzte Aenderung  MM 15.05.91
120cdf0e10cSrcweir |*
121cdf0e10cSrcweir *************************************************************************/
GetConstant(sal_uInt32 nPos)122cdf0e10cSrcweir Atom RscConst::GetConstant( sal_uInt32 nPos ){
123cdf0e10cSrcweir      if( nPos < nEntries )
124cdf0e10cSrcweir         return pVarArray[ nPos ].nId;
125cdf0e10cSrcweir     return( InvalidAtom );
126cdf0e10cSrcweir }
127cdf0e10cSrcweir 
128cdf0e10cSrcweir /*************************************************************************
129cdf0e10cSrcweir |*
130cdf0e10cSrcweir |*    RscConst::GetConstValue()
131cdf0e10cSrcweir |*
132cdf0e10cSrcweir |*    Beschreibung
133cdf0e10cSrcweir |*    Ersterstellung    MM 15.05.91
134cdf0e10cSrcweir |*    Letzte Aenderung  MM 15.05.91
135cdf0e10cSrcweir |*
136cdf0e10cSrcweir *************************************************************************/
GetConstValue(Atom nConst,sal_Int32 * pValue) const137cdf0e10cSrcweir sal_Bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
138cdf0e10cSrcweir {
139cdf0e10cSrcweir     sal_uInt32 i = 0;
140cdf0e10cSrcweir 
141cdf0e10cSrcweir     for( i = 0; i < nEntries; i++ )
142cdf0e10cSrcweir         if( pVarArray[ i ].nId == nConst )
143cdf0e10cSrcweir 		{
144cdf0e10cSrcweir             *pValue = pVarArray[ i ].lValue;
145cdf0e10cSrcweir 			return sal_True;
146cdf0e10cSrcweir 		}
147cdf0e10cSrcweir 	return sal_False;
148cdf0e10cSrcweir }
149cdf0e10cSrcweir 
150cdf0e10cSrcweir /*************************************************************************
151cdf0e10cSrcweir |*
152cdf0e10cSrcweir |*    RscConst::GetValueConst()
153cdf0e10cSrcweir |*
154cdf0e10cSrcweir |*    Beschreibung
155cdf0e10cSrcweir |*    Ersterstellung    MM 15.05.91
156cdf0e10cSrcweir |*    Letzte Aenderung  MM 15.05.91
157cdf0e10cSrcweir |*
158cdf0e10cSrcweir *************************************************************************/
GetValueConst(sal_Int32 lValue,Atom * pConst) const159cdf0e10cSrcweir sal_Bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
160cdf0e10cSrcweir {
161cdf0e10cSrcweir     sal_uInt32 i = 0;
162cdf0e10cSrcweir 
163cdf0e10cSrcweir     for( i = 0; i < nEntries; i++ )
164cdf0e10cSrcweir         if( pVarArray[ i ].lValue == lValue )
165cdf0e10cSrcweir 		{
166cdf0e10cSrcweir             *pConst = pVarArray[ i ].nId;
167cdf0e10cSrcweir 			return sal_True;
168cdf0e10cSrcweir 		}
169cdf0e10cSrcweir 	return sal_False;
170cdf0e10cSrcweir }
171cdf0e10cSrcweir 
172cdf0e10cSrcweir /*************************************************************************
173cdf0e10cSrcweir |*
174cdf0e10cSrcweir |*    RscConst::GetConstPos()
175cdf0e10cSrcweir |*
176cdf0e10cSrcweir |*    Beschreibung      Sucht die Position der Konstanten
177cdf0e10cSrcweir |*                      Return = nEntries, nicht gefunden
178cdf0e10cSrcweir |*                      Return = Position im Feld
179cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
180cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
181cdf0e10cSrcweir |*
182cdf0e10cSrcweir *************************************************************************/
GetConstPos(Atom nConst)183cdf0e10cSrcweir sal_uInt32 RscConst::GetConstPos( Atom nConst )
184cdf0e10cSrcweir {
185cdf0e10cSrcweir     sal_uInt32 i = 0;
186cdf0e10cSrcweir 
187cdf0e10cSrcweir     for( i = 0; i < nEntries; i++ )
188cdf0e10cSrcweir 	{
189cdf0e10cSrcweir         if( pVarArray[ i ].nId == nConst )
190cdf0e10cSrcweir             return( i );
191cdf0e10cSrcweir 	}
192cdf0e10cSrcweir 
193cdf0e10cSrcweir     return( nEntries );
194cdf0e10cSrcweir }
195cdf0e10cSrcweir 
196cdf0e10cSrcweir /*************************************************************************
197cdf0e10cSrcweir |*
198cdf0e10cSrcweir |*    RscEnum::WriteSyntax()
199cdf0e10cSrcweir |*
200cdf0e10cSrcweir |*    Beschreibung
201cdf0e10cSrcweir |*    Ersterstellung    MM 29.05.91
202cdf0e10cSrcweir |*    Letzte Aenderung  MM 29.05.91
203cdf0e10cSrcweir |*
204cdf0e10cSrcweir *************************************************************************/
WriteSyntax(FILE * fOutput,RscTypCont * pTC)205cdf0e10cSrcweir void RscConst::WriteSyntax( FILE * fOutput, RscTypCont * pTC )
206cdf0e10cSrcweir {
207cdf0e10cSrcweir 	RscTop::WriteSyntax( fOutput, pTC );
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 	sal_uInt32 i = 0;
210cdf0e10cSrcweir 	// Wenn eine Variable Maskierung hat, dann Maskenfeld
211cdf0e10cSrcweir 	fprintf( fOutput, "\t" );
212cdf0e10cSrcweir     for( i = 0; i < nEntries; i++ )
213cdf0e10cSrcweir 	{
214cdf0e10cSrcweir 		fprintf( fOutput, "%s, ", pHS->getString( pVarArray[ i ].nId ).getStr() );
215cdf0e10cSrcweir 		if( 3 == (i % 4) && i < sal_uInt32(nEntries -1) )
216cdf0e10cSrcweir 			fprintf( fOutput, "\n\t" );
217cdf0e10cSrcweir     };
218cdf0e10cSrcweir 	fprintf( fOutput, "\n" );
219cdf0e10cSrcweir }
220cdf0e10cSrcweir 
221cdf0e10cSrcweir //==================================================================
WriteRcAccess(FILE * fOutput,RscTypCont *,const char * pName)222cdf0e10cSrcweir void RscConst::WriteRcAccess
223cdf0e10cSrcweir (
224cdf0e10cSrcweir 	FILE * fOutput,
225cdf0e10cSrcweir 	RscTypCont * /*pTC*/,
226cdf0e10cSrcweir 	const char * pName
227cdf0e10cSrcweir )
228cdf0e10cSrcweir {
229cdf0e10cSrcweir     fprintf( fOutput, "\t\tSet%s( %s( ", pName, pHS->getString( GetId() ).getStr() );
230cdf0e10cSrcweir 	fprintf( fOutput, "*(short*)(pResData+nOffset) ) );\n" );
231cdf0e10cSrcweir     fprintf( fOutput, "\t\tnOffset += sizeof( short );\n" );
232cdf0e10cSrcweir }
233cdf0e10cSrcweir 
234cdf0e10cSrcweir /****************** R s c E n u m ****************************************/
235cdf0e10cSrcweir /*************************************************************************
236cdf0e10cSrcweir |*
237cdf0e10cSrcweir |*    RscEnum::RscEnum()
238cdf0e10cSrcweir |*
239cdf0e10cSrcweir |*    Beschreibung
240cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
241cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
242cdf0e10cSrcweir |*
243cdf0e10cSrcweir *************************************************************************/
RscEnum(Atom nId,sal_uInt32 nTypeId)244cdf0e10cSrcweir RscEnum::RscEnum( Atom nId, sal_uInt32 nTypeId )
245cdf0e10cSrcweir 			: RscConst( nId, nTypeId )
246cdf0e10cSrcweir {
247cdf0e10cSrcweir 	nSize = ALIGNED_SIZE( sizeof( RscEnumInst ) );
248cdf0e10cSrcweir }
249cdf0e10cSrcweir 
250cdf0e10cSrcweir /*************************************************************************
251cdf0e10cSrcweir |*
252cdf0e10cSrcweir |*    RscEnum::SetConst()
253cdf0e10cSrcweir |*
254cdf0e10cSrcweir |*    Beschreibung
255cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
256cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
257cdf0e10cSrcweir |*
258cdf0e10cSrcweir *************************************************************************/
SetConst(const RSCINST & rInst,Atom nConst,sal_Int32)259cdf0e10cSrcweir ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ )
260cdf0e10cSrcweir {
261cdf0e10cSrcweir     sal_uInt32 i = 0;
262cdf0e10cSrcweir 
263cdf0e10cSrcweir     if( nEntries != (i = GetConstPos( nConst )) )
264cdf0e10cSrcweir 	{
265cdf0e10cSrcweir         ((RscEnumInst *)rInst.pData)->nValue = i;
266cdf0e10cSrcweir         ((RscEnumInst *)rInst.pData)->bDflt = sal_False;
267cdf0e10cSrcweir         return( ERR_OK );
268cdf0e10cSrcweir     };
269cdf0e10cSrcweir 
270cdf0e10cSrcweir     return( ERR_RSCENUM );
271cdf0e10cSrcweir }
272cdf0e10cSrcweir 
273cdf0e10cSrcweir /*************************************************************************
274cdf0e10cSrcweir |*
275cdf0e10cSrcweir |*    RscEnum::SetNumber()
276cdf0e10cSrcweir |*
277cdf0e10cSrcweir |*    Beschreibung
278cdf0e10cSrcweir |*    Ersterstellung    MM 18.07.91
279cdf0e10cSrcweir |*    Letzte Aenderung  MM 18.07.91
280cdf0e10cSrcweir |*
281cdf0e10cSrcweir *************************************************************************/
SetNumber(const RSCINST & rInst,sal_Int32 lValue)282cdf0e10cSrcweir ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, sal_Int32 lValue )
283cdf0e10cSrcweir {
284cdf0e10cSrcweir     sal_uInt32  i = 0;
285cdf0e10cSrcweir 
286cdf0e10cSrcweir     for( i = 0; i < nEntries; i++ ){
287cdf0e10cSrcweir         if( (sal_Int32)pVarArray[ i ].lValue == lValue )
288cdf0e10cSrcweir             return( SetConst( rInst, pVarArray[ i ].nId, lValue ) );
289cdf0e10cSrcweir     };
290cdf0e10cSrcweir 
291cdf0e10cSrcweir     return( ERR_RSCENUM );
292cdf0e10cSrcweir }
293cdf0e10cSrcweir 
294cdf0e10cSrcweir /*************************************************************************
295cdf0e10cSrcweir |*
296cdf0e10cSrcweir |*    RscEnum::GetConst()
297cdf0e10cSrcweir |*
298cdf0e10cSrcweir |*    Beschreibung
299cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
300cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
301cdf0e10cSrcweir |*
302cdf0e10cSrcweir *************************************************************************/
GetConst(const RSCINST & rInst,Atom * pH)303cdf0e10cSrcweir ERRTYPE RscEnum::GetConst( const RSCINST & rInst, Atom * pH ){
304cdf0e10cSrcweir     *pH = pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].nId;
305cdf0e10cSrcweir     return( ERR_OK );
306cdf0e10cSrcweir }
307cdf0e10cSrcweir 
308cdf0e10cSrcweir /*************************************************************************
309cdf0e10cSrcweir |*
310cdf0e10cSrcweir |*    RscEnum::GetNumber()
311cdf0e10cSrcweir |*
312cdf0e10cSrcweir |*    Beschreibung
313cdf0e10cSrcweir |*    Ersterstellung    MM 16.09.91
314cdf0e10cSrcweir |*    Letzte Aenderung  MM 16.09.91
315cdf0e10cSrcweir |*
316cdf0e10cSrcweir *************************************************************************/
GetNumber(const RSCINST & rInst,sal_Int32 * pNumber)317cdf0e10cSrcweir ERRTYPE RscEnum::GetNumber( const RSCINST & rInst, sal_Int32 * pNumber ){
318cdf0e10cSrcweir     *pNumber = pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue;
319cdf0e10cSrcweir     return( ERR_OK );
320cdf0e10cSrcweir }
321cdf0e10cSrcweir 
322cdf0e10cSrcweir /*************************************************************************
323cdf0e10cSrcweir |*
324cdf0e10cSrcweir |*    RscEnum::Create()
325cdf0e10cSrcweir |*
326cdf0e10cSrcweir |*    Beschreibung
327cdf0e10cSrcweir |*    Ersterstellung    MM 03.04.91
328cdf0e10cSrcweir |*    Letzte Aenderung  MM 03.04.91
329cdf0e10cSrcweir |*
330cdf0e10cSrcweir *************************************************************************/
Create(RSCINST * pInst,const RSCINST & rDflt,sal_Bool bOwnClass)331cdf0e10cSrcweir RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass ){
332cdf0e10cSrcweir     RSCINST aInst;
333cdf0e10cSrcweir 
334cdf0e10cSrcweir     if( !pInst ){
335cdf0e10cSrcweir         aInst.pClass = this;
336cdf0e10cSrcweir         aInst.pData = (CLASS_DATA)
337cdf0e10cSrcweir                       rtl_allocateMemory( sizeof( RscEnumInst ) );
338cdf0e10cSrcweir     }
339cdf0e10cSrcweir     else
340cdf0e10cSrcweir         aInst = *pInst;
341cdf0e10cSrcweir     if( !bOwnClass && rDflt.IsInst() )
342cdf0e10cSrcweir         bOwnClass = rDflt.pClass->InHierarchy( this );
343cdf0e10cSrcweir 
344cdf0e10cSrcweir     if( bOwnClass )
345cdf0e10cSrcweir         memmove( aInst.pData, rDflt.pData, Size() );
346cdf0e10cSrcweir     else{
347cdf0e10cSrcweir         ((RscEnumInst *)aInst.pData)->nValue = 0;
348cdf0e10cSrcweir         ((RscEnumInst *)aInst.pData)->bDflt = sal_True;
349cdf0e10cSrcweir     }
350cdf0e10cSrcweir 
351cdf0e10cSrcweir     return( aInst );
352cdf0e10cSrcweir }
353cdf0e10cSrcweir 
354cdf0e10cSrcweir /*************************************************************************
355cdf0e10cSrcweir |*
356cdf0e10cSrcweir |*    RscEnum::IsValueDefault()
357cdf0e10cSrcweir |*
358cdf0e10cSrcweir |*    Beschreibung
359cdf0e10cSrcweir |*    Ersterstellung    MM 15.01.92
360cdf0e10cSrcweir |*    Letzte Aenderung  MM 15.01.92
361cdf0e10cSrcweir |*
362cdf0e10cSrcweir *************************************************************************/
IsValueDefault(const RSCINST & rInst,CLASS_DATA pDef)363cdf0e10cSrcweir sal_Bool RscEnum::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){
364cdf0e10cSrcweir     if( pDef ){
365cdf0e10cSrcweir         if( ((RscEnumInst*)rInst.pData)->nValue ==
366cdf0e10cSrcweir           ((RscEnumInst*)pDef)->nValue )
367cdf0e10cSrcweir         {
368cdf0e10cSrcweir             return sal_True;
369cdf0e10cSrcweir         }
370cdf0e10cSrcweir     }
371cdf0e10cSrcweir 
372cdf0e10cSrcweir     return sal_False;
373cdf0e10cSrcweir }
374cdf0e10cSrcweir 
375cdf0e10cSrcweir /*************************************************************************
376cdf0e10cSrcweir |*
377cdf0e10cSrcweir |*    RscEnum::WriteSrc()
378cdf0e10cSrcweir |*
379cdf0e10cSrcweir |*    Beschreibung
380cdf0e10cSrcweir |*    Ersterstellung    MM 08.04.91
381cdf0e10cSrcweir |*    Letzte Aenderung  MM 08.04.91
382cdf0e10cSrcweir |*
383cdf0e10cSrcweir *************************************************************************/
WriteSrc(const RSCINST & rInst,FILE * fOutput,RscTypCont *,sal_uInt32,const char *)384cdf0e10cSrcweir void RscEnum::WriteSrc( const RSCINST & rInst, FILE * fOutput,
385cdf0e10cSrcweir                          RscTypCont *, sal_uInt32, const char * )
386cdf0e10cSrcweir {
387cdf0e10cSrcweir     fprintf( fOutput, "%s", pHS->getString(
388cdf0e10cSrcweir              pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].nId ).getStr() );
389cdf0e10cSrcweir }
390cdf0e10cSrcweir 
391cdf0e10cSrcweir /*************************************************************************
392cdf0e10cSrcweir |*
393cdf0e10cSrcweir |*    RscEnum::WriteRc()
394cdf0e10cSrcweir |*
395cdf0e10cSrcweir |*    Beschreibung
396cdf0e10cSrcweir |*    Ersterstellung    MM 15.04.91
397cdf0e10cSrcweir |*    Letzte Aenderung  MM 15.04.91
398cdf0e10cSrcweir |*
399cdf0e10cSrcweir *************************************************************************/
WriteRc(const RSCINST & rInst,RscWriteRc & aMem,RscTypCont *,sal_uInt32,sal_Bool)400cdf0e10cSrcweir ERRTYPE RscEnum::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
401cdf0e10cSrcweir                           RscTypCont *, sal_uInt32, sal_Bool )
402cdf0e10cSrcweir {
403cdf0e10cSrcweir 	aMem.Put( (sal_Int32)pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue );
404cdf0e10cSrcweir     return( ERR_OK );
405cdf0e10cSrcweir }
406cdf0e10cSrcweir 
RscLangEnum()407cdf0e10cSrcweir RscLangEnum::RscLangEnum()
408cdf0e10cSrcweir         : RscEnum( pHS->getID( "LangEnum" ), RSC_NOTYPE ),
409cdf0e10cSrcweir           mnLangId( 0x400 )
410cdf0e10cSrcweir {
411cdf0e10cSrcweir }
412