summaryrefslogtreecommitdiff
path: root/rsc/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-04-20 14:05:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-04-21 11:45:59 +0200
commit76a3df733ebe016d8adf681d1cf591970d6f2a64 (patch)
tree05ee35a96782a22661dac66195687d3ea4ff0158 /rsc/inc
parentdc2598b7b45638847ac81c1b53bdbe43e5acef19 (diff)
loplugin:mergeclasses RscConst with RscEnum
Change-Id: I7bd35df0751c9ffce076848edd5373e00815dbc5 Reviewed-on: https://gerrit.libreoffice.org/36772 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc/inc')
-rw-r--r--rsc/inc/rscconst.hxx22
-rw-r--r--rsc/inc/rscdb.hxx4
2 files changed, 10 insertions, 16 deletions
diff --git a/rsc/inc/rscconst.hxx b/rsc/inc/rscconst.hxx
index b9678751e452..a9ce5040a168 100644
--- a/rsc/inc/rscconst.hxx
+++ b/rsc/inc/rscconst.hxx
@@ -25,9 +25,13 @@
#include <rsctop.hxx>
#include <tools/resid.hxx>
-class RscConst : public RscTop
+class RscEnum : public RscTop
{
-protected:
+ struct RscEnumInst
+ {
+ sal_uInt32 nValue; // constant position in the array
+ bool bDflt; // is default
+ };
struct VarEle
{
Atom nId; // constant name
@@ -36,24 +40,14 @@ protected:
VarEle * pVarArray; // pointer to the field with constant
sal_uInt32 nEntries; // number of entries in field
public:
- RscConst( Atom nId, RESOURCE_TYPE nTypId );
- virtual ~RscConst() override;
+ RscEnum( Atom nId, RESOURCE_TYPE nTypId );
+ virtual ~RscEnum() override;
// sets the allowed values
void SetConstant( Atom nVarName, sal_Int32 lValue );
bool GetConstValue( Atom nConstId, sal_Int32 * pVal ) const;
bool GetValueConst( sal_Int32 nValue, Atom * pConstId ) const;
sal_uInt32 GetConstPos( Atom nConstId );
-};
-class RscEnum : public RscConst
-{
- struct RscEnumInst
- {
- sal_uInt32 nValue; // constant position in the array
- bool bDflt; // is default
- };
-public:
- RscEnum( Atom nId, RESOURCE_TYPE nTypId );
RSCINST Create( RSCINST * pInst, const RSCINST & rDfltInst, bool bOwnClass = false ) override;
sal_uInt32 Size() const override { return ALIGNED_SIZE(sizeof(RscEnumInst)); }
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index d9b222154c9a..0fbe8064fc9d 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -77,8 +77,8 @@ class RscTypCont
aSysLst; // list of system resources
void Init(); // initializes classes and tables
- void SETCONST( RscConst *, const char *, sal_uInt32 );
- void SETCONST( RscConst *, Atom, sal_uInt32 );
+ void SETCONST( RscEnum *, const char *, sal_uInt32 );
+ void SETCONST( RscEnum *, Atom, sal_uInt32 );
RscEnum * InitFieldUnitsType();
RscTupel * InitStringLongTupel();
static RscCont * InitStringLongTupelList( RscTupel * pStringLongTupel );