summaryrefslogtreecommitdiff
path: root/rsc/inc/rscrange.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'rsc/inc/rscrange.hxx')
-rw-r--r--rsc/inc/rscrange.hxx97
1 files changed, 0 insertions, 97 deletions
diff --git a/rsc/inc/rscrange.hxx b/rsc/inc/rscrange.hxx
index bed213f8c80f..202b86f98e08 100644
--- a/rsc/inc/rscrange.hxx
+++ b/rsc/inc/rscrange.hxx
@@ -24,43 +24,6 @@
#include <rschash.hxx>
#include <rsctop.hxx>
-class RscRange : public RscTop
-{
-protected:
- struct RscRangeInst
- {
- sal_uInt16 nValue; // nValue = output value - nMin
- bool bDflt; // is default
- };
- sal_Int32 nMin; // range minimum value
- sal_Int32 nMax; // range maximum value
-public:
- RscRange( Atom nId, RESOURCE_TYPE nTypId );
- virtual RSCCLASS_TYPE GetClassType() const override;
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
- // sets the allowed range
- void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
- // returns the class size in bytes
- sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscRangeInst)); }
- // an assignment to a variable
- virtual void SetToDefault( const RSCINST & rInst ) override
- {
- reinterpret_cast<RscRangeInst*>(rInst.pData)->bDflt = true;
- }
- bool IsDefault( const RSCINST & rInst) override
- {
- return reinterpret_cast<RscRangeInst*>(rInst.pData)->bDflt;
- };
- // sets as default
- bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override;
- ERRTYPE SetNumber( const RSCINST &, sal_Int32 ) override;
- ERRTYPE GetNumber( const RSCINST &, sal_Int32 * ) override;
- void WriteSrc( const RSCINST &, FILE * fOutput,
- RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
- ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 ) override;
-};
-
class RscLongRange : public RscTop
{
protected:
@@ -73,7 +36,6 @@ protected:
sal_Int32 nMax; // range maximum value
public:
RscLongRange( Atom nId, RESOURCE_TYPE nTypId );
- virtual RSCCLASS_TYPE GetClassType() const override;
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
// sets the allowed range
void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum );
@@ -108,65 +70,6 @@ public:
sal_Int32 nValue ) override;
};
-class RscIdRange : public RscTop
-{
-protected:
- sal_Int32 nMin; // range minimum value
- sal_Int32 nMax; // range maximum value
-public:
- RscIdRange( Atom nId, RESOURCE_TYPE nTypId );
- virtual RSCCLASS_TYPE GetClassType() const override;
- // sets the allowed range
- void SetRange( sal_Int32 nMinimum, sal_Int32 nMaximum )
- {
- nMin = nMinimum;
- nMax = nMaximum;
- }
- RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
- void Destroy( const RSCINST & rInst ) override;
- sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscId)); }
- virtual void SetToDefault( const RSCINST & rInst ) override
- {
- reinterpret_cast<RscId*>(rInst.pData)->aExp.cUnused = true;
- }
- bool IsDefault( const RSCINST & rInst) override
- {
- //cUnused is used as default identifier
- return reinterpret_cast<RscId*>(rInst.pData)->aExp.cUnused;
- }
- // sets as default
- bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override;
- ERRTYPE SetNumber( const RSCINST &, sal_Int32 ) override;
- ERRTYPE GetNumber( const RSCINST &, sal_Int32 * ) override;
- ERRTYPE SetRef( const RSCINST &, const RscId & rRscId ) override;
- ERRTYPE GetRef( const RSCINST & rInst, RscId * ) override;
- void WriteSrc( const RSCINST &, FILE * fOutput,
- RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
- ERRTYPE WriteRc( const RSCINST &, RscWriteRc & aMem,
- RscTypCont * pTC, sal_uInt32 ) override;
- bool IsConsistent( const RSCINST & rInst ) override;
-};
-
-class RscBool : public RscRange
-{
-public:
- RscBool( Atom nId, RESOURCE_TYPE nTypId );
- virtual RSCCLASS_TYPE GetClassType() const override;
- ERRTYPE SetBool( const RSCINST & rInst, bool b ) override
- {
- return SetNumber( rInst, (sal_Int32)b );
- };
- ERRTYPE GetBool( const RSCINST & rInst, bool * pB) override
- {
- sal_Int32 l;
- GetNumber( rInst, &l );
- *pB = (0 != l);
- return ERR_OK;
- };
- void WriteSrc( const RSCINST &, FILE * fOutput,
- RscTypCont * pTC, sal_uInt32 nTab, const char * ) override;
-};
-
#endif // INCLUDED_RSC_INC_RSCRANGE_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */