diff options
Diffstat (limited to 'rsc/source/res/rscconst.cxx')
-rw-r--r-- | rsc/source/res/rscconst.cxx | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx index bbcf8e8f07e4..2564c69f9e15 100644 --- a/rsc/source/res/rscconst.cxx +++ b/rsc/source/res/rscconst.cxx @@ -17,29 +17,15 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -/****************** I N C L U D E S **************************************/ - -// C and C++ Includes. #include <cstdlib> #include <cstdio> #include <cstring> -// Solar Definitionen -#include <tools/solar.h> - -// Programmabhaengige Includes. #include <rscconst.hxx> #include <rscall.h> #include <rschash.hxx> #include <tools/resid.hxx> -/****************** C O D E **********************************************/ -/****************** R s c C o n s t **************************************/ -/************************************************************************* -|* -|* RscConst::RscConst() -|* -*************************************************************************/ RscConst::RscConst( Atom nId, sal_uInt32 nTypeId ) : RscTop( nId, nTypeId ) { @@ -47,32 +33,17 @@ RscConst::RscConst( Atom nId, sal_uInt32 nTypeId ) nEntries = 0; } -/************************************************************************* -|* -|* RscConst::~RscConst() -|* -*************************************************************************/ RscConst::~RscConst() { if( pVarArray ) rtl_freeMemory( (void *)pVarArray ); } -/************************************************************************* -|* -|* RscConst::GetClassType() -|* -*************************************************************************/ RSCCLASS_TYPE RscConst::GetClassType() const { return RSCCLASS_CONST; } -/************************************************************************* -|* -|* RscConst::SetConstance() -|* -*************************************************************************/ ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ){ if( pVarArray ) pVarArray = (VarEle *) @@ -88,22 +59,12 @@ ERRTYPE RscConst::SetConstant( Atom nVarName, sal_Int32 lValue ){ return( ERR_OK ); } -/************************************************************************* -|* -|* RscConst::GetConstance() -|* -*************************************************************************/ Atom RscConst::GetConstant( sal_uInt32 nPos ){ if( nPos < nEntries ) return pVarArray[ nPos ].nId; return( InvalidAtom ); } -/************************************************************************* -|* -|* RscConst::GetConstValue() -|* -*************************************************************************/ sal_Bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const { sal_uInt32 i = 0; @@ -117,11 +78,6 @@ sal_Bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const return sal_False; } -/************************************************************************* -|* -|* RscConst::GetValueConst() -|* -*************************************************************************/ sal_Bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const { sal_uInt32 i = 0; @@ -135,15 +91,6 @@ sal_Bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const return sal_False; } -/************************************************************************* -|* -|* RscConst::GetConstPos() -|* -|* Beschreibung Sucht die Position der Konstanten -|* Return = nEntries, nicht gefunden -|* Return = Position im Feld -|* -*************************************************************************/ sal_uInt32 RscConst::GetConstPos( Atom nConst ) { sal_uInt32 i = 0; @@ -157,57 +104,12 @@ sal_uInt32 RscConst::GetConstPos( Atom nConst ) return( nEntries ); } -/************************************************************************* -|* -|* RscEnum::WriteSyntax() -|* -*************************************************************************/ -void RscConst::WriteSyntax( FILE * fOutput, RscTypCont * pTC ) -{ - RscTop::WriteSyntax( fOutput, pTC ); - - sal_uInt32 i = 0; - // Wenn eine Variable Maskierung hat, dann Maskenfeld - fprintf( fOutput, "\t" ); - for( i = 0; i < nEntries; i++ ) - { - fprintf( fOutput, "%s, ", pHS->getString( pVarArray[ i ].nId ).getStr() ); - if( 3 == (i % 4) && i < sal_uInt32(nEntries -1) ) - fprintf( fOutput, "\n\t" ); - }; - fprintf( fOutput, "\n" ); -} - -//================================================================== -void RscConst::WriteRcAccess -( - FILE * fOutput, - RscTypCont * /*pTC*/, - const char * pName -) -{ - fprintf( fOutput, "\t\tSet%s( %s( ", pName, pHS->getString( GetId() ).getStr() ); - fprintf( fOutput, "*(short*)(pResData+nOffset) ) );\n" ); - fprintf( fOutput, "\t\tnOffset += sizeof( short );\n" ); -} - -/****************** R s c E n u m ****************************************/ -/************************************************************************* -|* -|* RscEnum::RscEnum() -|* -*************************************************************************/ RscEnum::RscEnum( Atom nId, sal_uInt32 nTypeId ) : RscConst( nId, nTypeId ) { nSize = ALIGNED_SIZE( sizeof( RscEnumInst ) ); } -/************************************************************************* -|* -|* RscEnum::SetConst() -|* -*************************************************************************/ ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ ) { sal_uInt32 i = 0; @@ -222,11 +124,6 @@ ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal* return( ERR_RSCENUM ); } -/************************************************************************* -|* -|* RscEnum::SetNumber() -|* -*************************************************************************/ ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, sal_Int32 lValue ) { sal_uInt32 i = 0; @@ -239,31 +136,16 @@ ERRTYPE RscEnum::SetNumber( const RSCINST & rInst, sal_Int32 lValue ) return( ERR_RSCENUM ); } -/************************************************************************* -|* -|* RscEnum::GetConst() -|* -*************************************************************************/ ERRTYPE RscEnum::GetConst( const RSCINST & rInst, Atom * pH ){ *pH = pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].nId; return( ERR_OK ); } -/************************************************************************* -|* -|* RscEnum::GetNumber() -|* -*************************************************************************/ ERRTYPE RscEnum::GetNumber( const RSCINST & rInst, sal_Int32 * pNumber ){ *pNumber = pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].lValue; return( ERR_OK ); } -/************************************************************************* -|* -|* RscEnum::Create() -|* -*************************************************************************/ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnClass ){ RSCINST aInst; @@ -287,11 +169,6 @@ RSCINST RscEnum::Create( RSCINST * pInst, const RSCINST & rDflt, sal_Bool bOwnCl return( aInst ); } -/************************************************************************* -|* -|* RscEnum::IsValueDefault() -|* -*************************************************************************/ sal_Bool RscEnum::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){ if( pDef ){ if( ((RscEnumInst*)rInst.pData)->nValue == @@ -304,11 +181,6 @@ sal_Bool RscEnum::IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ){ return sal_False; } -/************************************************************************* -|* -|* RscEnum::WriteSrc() -|* -*************************************************************************/ void RscEnum::WriteSrc( const RSCINST & rInst, FILE * fOutput, RscTypCont *, sal_uInt32, const char * ) { @@ -316,11 +188,6 @@ void RscEnum::WriteSrc( const RSCINST & rInst, FILE * fOutput, pVarArray[ ((RscEnumInst *)rInst.pData)->nValue ].nId ).getStr() ); } -/************************************************************************* -|* -|* RscEnum::WriteRc() -|* -*************************************************************************/ ERRTYPE RscEnum::WriteRc( const RSCINST & rInst, RscWriteRc & aMem, RscTypCont *, sal_uInt32, sal_Bool ) { |