diff options
Diffstat (limited to 'rsc/inc')
-rw-r--r-- | rsc/inc/rscall.h | 7 | ||||
-rw-r--r-- | rsc/inc/rscarray.hxx | 2 | ||||
-rw-r--r-- | rsc/inc/rscclass.hxx | 3 | ||||
-rw-r--r-- | rsc/inc/rscconst.hxx | 1 | ||||
-rw-r--r-- | rsc/inc/rsccont.hxx | 1 | ||||
-rw-r--r-- | rsc/inc/rscdb.hxx | 8 | ||||
-rw-r--r-- | rsc/inc/rscflag.hxx | 104 | ||||
-rw-r--r-- | rsc/inc/rscrange.hxx | 97 | ||||
-rw-r--r-- | rsc/inc/rscstr.hxx | 1 | ||||
-rw-r--r-- | rsc/inc/rsctop.hxx | 4 |
10 files changed, 0 insertions, 228 deletions
diff --git a/rsc/inc/rscall.h b/rsc/inc/rscall.h index 1591d1f114e3..d8222b7c1d31 100644 --- a/rsc/inc/rscall.h +++ b/rsc/inc/rscall.h @@ -62,13 +62,6 @@ namespace o3tl { template<> struct typed_flags<CommandFlags> : is_typed_flags<CommandFlags, 0x327f> {}; } - -/******************* T y p e s *******************************************/ -enum RSCCLASS_TYPE { RSCCLASS_BOOL, RSCCLASS_STRING, RSCCLASS_NUMBER, - RSCCLASS_CONST, RSCCLASS_COMPLEX, RSCCLASS_ENUMARRAY }; - -typedef void (* VarEnumCallbackProc)( void * pData, RSCCLASS_TYPE, Atom ); - /******************* S t r u c t s ***************************************/ struct RSCINST { diff --git a/rsc/inc/rscarray.hxx b/rsc/inc/rscarray.hxx index 32d138675fe0..01a5ddf8795e 100644 --- a/rsc/inc/rscarray.hxx +++ b/rsc/inc/rscarray.hxx @@ -62,7 +62,6 @@ public: RscArray( Atom nId, RESOURCE_TYPE nTypId, RscTop * pSuper, RscEnum * pTypeClass ); virtual ~RscArray() override; - virtual RSCCLASS_TYPE GetClassType() const override; virtual RscTop * GetTypeClass() const override; RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override; @@ -96,7 +95,6 @@ class RscLangArray : public RscArray public: RscLangArray( Atom nId, RESOURCE_TYPE nTypId, RscTop * pSuper, RscEnum * pTypeClass ); - virtual RSCCLASS_TYPE GetClassType() const override; }; #endif // INCLUDED_RSC_INC_RSCARRAY_HXX diff --git a/rsc/inc/rscclass.hxx b/rsc/inc/rscclass.hxx index 59b3980c33e5..2e81aa24ac6a 100644 --- a/rsc/inc/rscclass.hxx +++ b/rsc/inc/rscclass.hxx @@ -57,14 +57,11 @@ public: RscClass( Atom nId, RESOURCE_TYPE nTypId, RscTop * pSuperCl ); virtual ~RscClass() override; - virtual RSCCLASS_TYPE GetClassType() const override; - void Pre_dtor() override; ERRTYPE SetVariable( Atom nVarName, RscTop * pClass, RSCINST * pDflt = nullptr, RSCVAR nVarType = RSCVAR::NONE, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ) override; - virtual void EnumVariables( void * pData, VarEnumCallbackProc ) override; RSCINST GetVariable( const RSCINST & rInst, Atom nVarName, const RSCINST & rInitInst, bool bInitDflt = false, diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx index 1b65f60e509a..b9678751e452 100644 --- a/rsc/inc/rscconst.hxx +++ b/rsc/inc/rscconst.hxx @@ -38,7 +38,6 @@ protected: public: RscConst( Atom nId, RESOURCE_TYPE nTypId ); virtual ~RscConst() override; - virtual RSCCLASS_TYPE GetClassType() const override; // sets the allowed values void SetConstant( Atom nVarName, sal_Int32 lValue ); bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const; diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx index 005daa44856f..c1cf83700a11 100644 --- a/rsc/inc/rsccont.hxx +++ b/rsc/inc/rsccont.hxx @@ -56,7 +56,6 @@ public: RscBaseCont( Atom nId, RESOURCE_TYPE nTypId, bool bNoId ); virtual ~RscBaseCont() override; - virtual RSCCLASS_TYPE GetClassType() const override; void SetTypeClass( RscTop * pClass ) { pTypeClass = pClass; diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx index 0da0a6dbaac2..f56ba91f122f 100644 --- a/rsc/inc/rscdb.hxx +++ b/rsc/inc/rscdb.hxx @@ -23,7 +23,6 @@ #include <rscall.h> #include <rsckey.hxx> #include <rscconst.hxx> -#include <rscflag.hxx> #include <rscrange.hxx> #include <rscstr.hxx> #include <rscarray.hxx> @@ -89,17 +88,10 @@ class RscTypCont RscTop * InitClassMgr(); RscTop * InitClassString( RscTop * pSuper ); RscTop * InitClassBitmap( RscTop * pSuper ); - RscTop * InitClassMenuItem( RscTop * pSuper ); - RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem ); public: - RscBool aBool; - RscRange aShort; - RscRange aUShort; RscLongEnumRange aEnumLong; - RscIdRange aIdNoZeroUShort; RscString aString; - RscString aStringLiteral; RscLangEnum aLangType; RscLangArray aLangString; diff --git a/rsc/inc/rscflag.hxx b/rsc/inc/rscflag.hxx deleted file mode 100644 index de006bf2dee2..000000000000 --- a/rsc/inc/rscflag.hxx +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_RSC_INC_RSCFLAG_HXX -#define INCLUDED_RSC_INC_RSCFLAG_HXX - -#include <rscall.h> -#include <rscerror.h> -#include <rschash.hxx> -#include <rscconst.hxx> - -/******************* R s c F l a g ***************************************/ -class RscFlag : public RscConst -{ - struct RscFlagInst - { - sal_uInt32 nFlags; - sal_uInt32 nDfltFlags; - }; - RSCINST CreateBasic( RSCINST * pInst ); -public: - RscFlag( Atom nId, RESOURCE_TYPE nTypId ); - RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override; - RSCINST CreateClient( RSCINST * pInst, const RSCINST & rDflt, - bool bOwnClass, Atom nConsId ); - sal_uInt32 Size() const override; - - virtual void SetToDefault( const RSCINST & rInst ) override; - bool IsDefault( const RSCINST & rInst ) override; - bool IsDefault( const RSCINST & rInst, Atom nConstId ); - - // whether the flag is set - bool IsSet( const RSCINST & rInst, Atom nConstId ); - - // sets as default - bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override; - bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef, - Atom nConstId ); - - ERRTYPE SetConst( const RSCINST & rInst, Atom nValueId, - sal_Int32 nValue ) override; - ERRTYPE SetNotConst( const RSCINST & rInst, Atom nConstId ) override; - void WriteSrc( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, const char * ) override; - ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem, - RscTypCont * pTC, sal_uInt32 ) override; -}; - -/******************* R s c C l i e n t ***********************************/ -class RscClient : public RscTop -{ - RscFlag * pRefClass; // class which is used as server - Atom nConstId; // id of the value to set -public: - RscClient( Atom nId, RESOURCE_TYPE nTypId, RscFlag * pClass, - Atom nConstantId ); - virtual RSCCLASS_TYPE GetClassType() const override; - RSCINST Create( RSCINST * pInst, const RSCINST & rDflt, bool bOwnClass = false ) override; - sal_uInt32 Size() const override { return pRefClass->Size(); } - - // an assignment to a variable - bool IsDefault( const RSCINST & rInst ) override { - return pRefClass->IsDefault( rInst, nConstId ); - }; - // sets as default - bool IsValueDefault( const RSCINST & rInst, CLASS_DATA pDef ) override - { - return pRefClass->IsValueDefault( rInst, - pDef, nConstId ); - } - ERRTYPE SetBool( const RSCINST & rInst, bool bValue ) override - { - if( bValue ) - return pRefClass->SetConst( rInst, nConstId, sal_Int32(bValue) ); - else - return pRefClass->SetNotConst( rInst, nConstId ); - } - ERRTYPE GetBool( const RSCINST & rInst, bool * pB ) override - { - *pB = pRefClass->IsSet( rInst, nConstId ); - return ERR_OK; - } - void WriteSrc( const RSCINST & rInst, FILE * fOutput, - RscTypCont * pTC, sal_uInt32 nTab, const char * ) override; -}; - -#endif // INCLUDED_RSC_INC_RSCFLAG_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 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: */ diff --git a/rsc/inc/rscstr.hxx b/rsc/inc/rscstr.hxx index 322eedb3be8f..5ae1d17aa92d 100644 --- a/rsc/inc/rscstr.hxx +++ b/rsc/inc/rscstr.hxx @@ -35,7 +35,6 @@ class RscString : public RscTop }; public: RscString( Atom nId, RESOURCE_TYPE nTypId ); - virtual RSCCLASS_TYPE GetClassType() const override; void SetRefClass( RscTop * pClass ) { pRefClass = pClass; } RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override; diff --git a/rsc/inc/rsctop.hxx b/rsc/inc/rsctop.hxx index 43f118ed98d5..e9dab39dbf1c 100644 --- a/rsc/inc/rsctop.hxx +++ b/rsc/inc/rsctop.hxx @@ -66,7 +66,6 @@ public: void SetCallPar( const OString& rPar1, const OString& rPar2, const OString& rParType ); RscTop* GetRefClass() const { return pRefClass; } - virtual RSCCLASS_TYPE GetClassType() const = 0; RSCINST const & GetDefault(); // preparation fro the destructor call @@ -92,9 +91,6 @@ public: RSCVAR nVarType = RSCVAR::NONE, sal_uInt32 nMask = 0, Atom nDataBaseName = InvalidAtom ); - // enumerate all variables - virtual void EnumVariables( void * pData, VarEnumCallbackProc ); - // returns variable instance // returned pData, pClass may be NULL virtual RSCINST GetVariable( const RSCINST & rInst, Atom nVarName, |