summaryrefslogtreecommitdiff
path: root/rsc/source/res
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/source/res
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/source/res')
-rw-r--r--rsc/source/res/rscarray.cxx2
-rw-r--r--rsc/source/res/rscconst.cxx17
2 files changed, 7 insertions, 12 deletions
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 3efd01a3dad0..08dd08d4b8cc 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -339,7 +339,7 @@ void RscArray::WriteSrcHeader( const RSCINST & rInst, FILE * fOutput,
static void WriteSrc( RscInstNode * pNode, FILE * fOutput, RscTypCont * pTC,
sal_uInt32 nTab, const char * pVarName,
- CLASS_DATA pDfltData, RscConst * pTypeClass )
+ CLASS_DATA pDfltData, RscEnum * pTypeClass )
{
if( pNode )
{
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index 281c8b02ad3b..f791eb2b6b63 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -26,19 +26,19 @@
#include <rschash.hxx>
#include <tools/resid.hxx>
-RscConst::RscConst( Atom nId, RESOURCE_TYPE nTypeId )
+RscEnum::RscEnum( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, pVarArray(nullptr), nEntries(0)
{
}
-RscConst::~RscConst()
+RscEnum::~RscEnum()
{
if( pVarArray )
rtl_freeMemory( static_cast<void *>(pVarArray) );
}
-void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
+void RscEnum::SetConstant( Atom nVarName, sal_Int32 lValue )
{
if( pVarArray )
pVarArray = static_cast<VarEle *>(rtl_reallocateMemory( static_cast<void *>(pVarArray),
@@ -50,7 +50,7 @@ void RscConst::SetConstant( Atom nVarName, sal_Int32 lValue )
nEntries++;
}
-bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
+bool RscEnum::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
{
sal_uInt32 i = 0;
@@ -65,7 +65,7 @@ bool RscConst::GetConstValue( Atom nConst, sal_Int32 * pValue ) const
return false;
}
-bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
+bool RscEnum::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
{
sal_uInt32 i = 0;
@@ -80,7 +80,7 @@ bool RscConst::GetValueConst( sal_Int32 lValue, Atom * pConst ) const
return false;
}
-sal_uInt32 RscConst::GetConstPos( Atom nConst )
+sal_uInt32 RscEnum::GetConstPos( Atom nConst )
{
sal_uInt32 i = 0;
@@ -93,11 +93,6 @@ sal_uInt32 RscConst::GetConstPos( Atom nConst )
return nEntries;
}
-RscEnum::RscEnum( Atom nId, RESOURCE_TYPE nTypeId )
- : RscConst( nId, nTypeId )
-{
-}
-
ERRTYPE RscEnum::SetConst( const RSCINST & rInst, Atom nConst, sal_Int32 /*nVal*/ )
{
sal_uInt32 i = 0;