summaryrefslogtreecommitdiff
path: root/rsc/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 19:09:17 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-14 07:31:08 +0000
commit2b70fb58be039fbd05ea833a40b1b3e9f922e45c (patch)
tree76a80a96d8c3270159f54dbb27bb6139f433365e /rsc/source
parented8773a201bc4954050b87f6d2952525831d3499 (diff)
Use o3tl::strong_int on RESOURCE_TYPE
Change-Id: I42690c07a611e031963ff41942f530af4a5c672a Reviewed-on: https://gerrit.libreoffice.org/34220 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'rsc/source')
-rw-r--r--rsc/source/parser/rscdb.cxx8
-rw-r--r--rsc/source/res/rscarray.cxx4
-rw-r--r--rsc/source/res/rscclass.cxx6
-rw-r--r--rsc/source/res/rscconst.cxx4
-rw-r--r--rsc/source/res/rsccont.cxx8
-rw-r--r--rsc/source/res/rscflag.cxx4
-rw-r--r--rsc/source/res/rscmgr.cxx2
-rw-r--r--rsc/source/res/rscrange.cxx10
-rw-r--r--rsc/source/res/rscstr.cxx2
-rw-r--r--rsc/source/res/rsctop.cxx2
10 files changed, 25 insertions, 25 deletions
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 1675cc4f8d1e..9aa11931019e 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -44,7 +44,7 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
, aSearchPath( rSearchPath )
, nUniqueId(256)
, nFilePos( 0 )
- , nPMId(RSC_VERSIONCONTROL +1) // at least one more
+ , nPMId(RSC_VERSIONCONTROL + RESOURCE_TYPE(1)) // at least one more
, aBool( pHS->getID( "sal_Bool" ), RSC_NOTYPE )
, aShort( pHS->getID( "short" ), RSC_NOTYPE )
, aUShort( pHS->getID( "sal_uInt16" ), RSC_NOTYPE )
@@ -300,17 +300,17 @@ void RscEnumerateObj::WriteRcFile( RscWriteRc & rMem, FILE * fOut )
/*
struct RSHEADER_TYPE{
sal_uInt32 nId; // resource identifier
- sal_uInt32 nRT; // resource type
+ RESOURCE_TYPE nRT; // resource type
sal_uInt32 nGlobOff; // global offset
sal_uInt32 nLocalOff; // local offset
} aHeader;
*/
sal_uInt32 nId = rMem.GetLong( 0 );
- sal_uInt32 nRT = rMem.GetLong( 4 );
+ RESOURCE_TYPE nRT(rMem.GetLong( 4 ));
// table is filled with nId and nRT
- pTypCont->PutTranslatorKey( (sal_uInt64(nRT) << 32) + sal_uInt64(nId) );
+ pTypCont->PutTranslatorKey( (sal_uInt64(sal_uInt32(nRT)) << 32) + sal_uInt64(nId) );
if( nRT == RSC_VERSIONCONTROL )
{ // always comes last
diff --git a/rsc/source/res/rscarray.cxx b/rsc/source/res/rscarray.cxx
index 3348807ec984..817a8c1dd935 100644
--- a/rsc/source/res/rscarray.cxx
+++ b/rsc/source/res/rscarray.cxx
@@ -44,7 +44,7 @@ sal_uInt32 RscInstNode::GetId() const
return nTypeId;
}
-RscArray::RscArray( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, RscEnum * pTypeCl )
+RscArray::RscArray( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuper, RscEnum * pTypeCl )
: RscTop( nId, nTypeId, pSuper )
, pTypeClass(pTypeCl)
, nOffInstData(RscTop::Size())
@@ -422,7 +422,7 @@ ERRTYPE RscArray::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
return aError;
}
-RscLangArray::RscLangArray( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper,
+RscLangArray::RscLangArray( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuper,
RscEnum * pTypeCl )
: RscArray( nId, nTypeId, pSuper, pTypeCl )
{
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index fc1d08e1a967..12fb7952f45f 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -28,7 +28,7 @@
#include <tools/rcid.h>
#include <tools/rc.h>
-RscClass::RscClass( Atom nId, sal_uInt32 nTypeId, RscTop * pSuperCl )
+RscClass::RscClass( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuperCl )
: RscTop( nId, nTypeId, pSuperCl )
, nSuperSize(RscTop::Size())
, nSize(nSuperSize + ALIGNED_SIZE(sizeof(RscClassInst )))
@@ -642,7 +642,7 @@ ERRTYPE RscClass::WriteRc( const RSCINST & rInst,
return aError;
}
-RscSysDepend::RscSysDepend( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper )
+RscSysDepend::RscSysDepend( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuper )
: RscClass( nId, nTypeId, pSuper )
{
}
@@ -693,7 +693,7 @@ ERRTYPE RscSysDepend::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
return aError;
}
-RscTupel::RscTupel( Atom nId, sal_uInt32 nTypeId )
+RscTupel::RscTupel( Atom nId, RESOURCE_TYPE nTypeId )
: RscClass( nId, nTypeId, nullptr )
{
}
diff --git a/rsc/source/res/rscconst.cxx b/rsc/source/res/rscconst.cxx
index f45045b9d1da..32aa1898ae93 100644
--- a/rsc/source/res/rscconst.cxx
+++ b/rsc/source/res/rscconst.cxx
@@ -26,7 +26,7 @@
#include <rschash.hxx>
#include <tools/resid.hxx>
-RscConst::RscConst( Atom nId, sal_uInt32 nTypeId )
+RscConst::RscConst( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, pVarArray(nullptr), nEntries(0)
{
@@ -98,7 +98,7 @@ sal_uInt32 RscConst::GetConstPos( Atom nConst )
return nEntries;
}
-RscEnum::RscEnum( Atom nId, sal_uInt32 nTypeId )
+RscEnum::RscEnum( Atom nId, RESOURCE_TYPE nTypeId )
: RscConst( nId, nTypeId )
{
}
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index 2ffa8d3d83e9..6c389e788f47 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -35,7 +35,7 @@ void ENTRY_STRUCT::Destroy()
}
}
-RscBaseCont::RscBaseCont( Atom nId, sal_uInt32 nTypeId,
+RscBaseCont::RscBaseCont( Atom nId, RESOURCE_TYPE nTypeId,
bool bNoIdent )
: RscTop(nId, nTypeId, nullptr)
, pTypeClass(nullptr), pTypeClass1(nullptr)
@@ -719,7 +719,7 @@ ERRTYPE RscBaseCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
return aError;
}
-RscContWriteSrc::RscContWriteSrc( Atom nId, sal_uInt32 nTypeId )
+RscContWriteSrc::RscContWriteSrc( Atom nId, RESOURCE_TYPE nTypeId )
: RscBaseCont( nId, nTypeId, true )
{
}
@@ -746,7 +746,7 @@ void RscContWriteSrc::WriteSrc( const RSCINST & rInst, FILE * fOutput,
fprintf( fOutput, "}" );
}
-RscCont::RscCont( Atom nId, sal_uInt32 nTypeId )
+RscCont::RscCont( Atom nId, RESOURCE_TYPE nTypeId )
: RscContWriteSrc( nId, nTypeId )
{
}
@@ -769,7 +769,7 @@ ERRTYPE RscCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
return aError;
}
-RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId )
+RscContExtraData::RscContExtraData( Atom nId, RESOURCE_TYPE nTypeId )
: RscContWriteSrc( nId, nTypeId )
{
}
diff --git a/rsc/source/res/rscflag.cxx b/rsc/source/res/rscflag.cxx
index 4ac6473294cc..d1d8afde9440 100644
--- a/rsc/source/res/rscflag.cxx
+++ b/rsc/source/res/rscflag.cxx
@@ -24,7 +24,7 @@
#include <rscflag.hxx>
-RscFlag::RscFlag( Atom nId, sal_uInt32 nTypeId )
+RscFlag::RscFlag( Atom nId, RESOURCE_TYPE nTypeId )
: RscConst( nId, nTypeId )
{
}
@@ -292,7 +292,7 @@ ERRTYPE RscFlag::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
return ERR_OK;
}
-RscClient::RscClient( Atom nId, sal_uInt32 nTypeId, RscFlag * pClass,
+RscClient::RscClient( Atom nId, RESOURCE_TYPE nTypeId, RscFlag * pClass,
Atom nConstantId )
: RscTop(nId, nTypeId), pRefClass(pClass), nConstId(nConstantId)
{
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 33f805830718..c123a93cd256 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -26,7 +26,7 @@
#include <rscmgr.hxx>
#include <rscdb.hxx>
-RscMgr::RscMgr( Atom nId, sal_uInt32 nTypeId, RscTop * pSuperCl )
+RscMgr::RscMgr( Atom nId, RESOURCE_TYPE nTypeId, RscTop * pSuperCl )
: RscClass( nId, nTypeId, pSuperCl )
{
}
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index 6273eabde3f9..403e7bcc8790 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -24,7 +24,7 @@
#include <rscrange.hxx>
-RscRange::RscRange( Atom nId, sal_uInt32 nTypeId )
+RscRange::RscRange( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, nMin(0), nMax(0)
{
@@ -135,7 +135,7 @@ ERRTYPE RscRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
return ERR_OK;
}
-RscLongRange::RscLongRange( Atom nId, sal_uInt32 nTypeId )
+RscLongRange::RscLongRange( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, nMin(0), nMax(0)
{
@@ -241,7 +241,7 @@ ERRTYPE RscLongRange::WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
return ERR_OK;
}
-RscLongEnumRange::RscLongEnumRange( Atom nId, sal_uInt32 nTypeId )
+RscLongEnumRange::RscLongEnumRange( Atom nId, RESOURCE_TYPE nTypeId )
: RscLongRange( nId, nTypeId )
{
}
@@ -252,7 +252,7 @@ ERRTYPE RscLongEnumRange::SetConst( const RSCINST & rInst, Atom /*nConst*/,
return SetNumber( rInst, nValue );
}
-RscIdRange::RscIdRange( Atom nId, sal_uInt32 nTypeId )
+RscIdRange::RscIdRange( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, nMin(0), nMax(0)
{
@@ -389,7 +389,7 @@ bool RscIdRange::IsConsistent( const RSCINST & rInst )
}
-RscBool::RscBool( Atom nId, sal_uInt32 nTypeId )
+RscBool::RscBool( Atom nId, RESOURCE_TYPE nTypeId )
: RscRange( nId, nTypeId )
{
RscRange::SetRange( 0, 1 );
diff --git a/rsc/source/res/rscstr.cxx b/rsc/source/res/rscstr.cxx
index f03bf4e8d350..dc54561ebfd0 100644
--- a/rsc/source/res/rscstr.cxx
+++ b/rsc/source/res/rscstr.cxx
@@ -28,7 +28,7 @@
#include <rtl/textcvt.h>
#include <rtl/textenc.h>
-RscString::RscString( Atom nId, sal_uInt32 nTypeId )
+RscString::RscString( Atom nId, RESOURCE_TYPE nTypeId )
: RscTop( nId, nTypeId )
, pRefClass(nullptr)
{
diff --git a/rsc/source/res/rsctop.cxx b/rsc/source/res/rsctop.cxx
index 6117bf9c1d62..3d48b8e6b7c4 100644
--- a/rsc/source/res/rsctop.cxx
+++ b/rsc/source/res/rsctop.cxx
@@ -22,7 +22,7 @@
#include <string.h>
#include <rsctop.hxx>
-RscTop::RscTop( Atom nId, sal_uInt32 nTypIdent, RscTop * pSuperCl )
+RscTop::RscTop( Atom nId, RESOURCE_TYPE nTypIdent, RscTop * pSuperCl )
: RefNode( nId )
, pSuperClass( pSuperCl )
, nTypId( nTypIdent )