summaryrefslogtreecommitdiff
path: root/rsc/source/res
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-10-11 08:15:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-11 08:43:33 +0000
commitd0304a8f57b3fe0065193a2a3f7089f414b1ffd9 (patch)
tree6ac18f078dc91b56ae7db204028c15089113339c /rsc/source/res
parent52dfb06b194bf890510352a98540c64bc3d44b70 (diff)
remove some conversion operator methods
which, in these cases, only serve to make the code harder to read Change-Id: Ic9bcf42545b4fcfd60a535fb63956092d392f469 Reviewed-on: https://gerrit.libreoffice.org/29685 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/rscclobj.cxx4
-rw-r--r--rsc/source/res/rsccont.cxx6
-rw-r--r--rsc/source/res/rscmgr.cxx2
-rw-r--r--rsc/source/res/rscrange.cxx2
4 files changed, 7 insertions, 7 deletions
diff --git a/rsc/source/res/rscclobj.cxx b/rsc/source/res/rscclobj.cxx
index 993be7fbd285..80969f704553 100644
--- a/rsc/source/res/rscclobj.cxx
+++ b/rsc/source/res/rscclobj.cxx
@@ -95,14 +95,14 @@ ObjNode * ObjNode::DelObjNode( RscTop * pClass, sal_uLong nFileKey )
sal_uInt32 ObjNode::GetId() const
{
- return (sal_uInt32)(long)aRscId;
+ return aRscId.GetNumber();
}
bool ObjNode::IsConsistent()
{
bool bRet = true;
- if( (long)aRscId > 0x7FFF || (long)aRscId < 1 )
+ if( aRscId.GetNumber() > 0x7FFF || aRscId.GetNumber() < 1 )
{
bRet = false;
}
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index a48767089f0e..1f4ce70df5d0 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -506,7 +506,7 @@ ERRTYPE RscBaseCont::SetRef( const RSCINST & rInst, const RscId & rRefId )
aError = GetElement( rInst, RscId(), pTypeClass1, RSCINST(), &aTmpI );
aError = aTmpI.pClass->GetRef( aTmpI, &aId );
if( aError.IsOk() )
- aError = aTmpI.pClass->SetNumber( aTmpI, rRefId );
+ aError = aTmpI.pClass->SetNumber( aTmpI, rRefId.GetNumber() );
}
if( aError.IsError() )
@@ -534,8 +534,8 @@ bool RscBaseCont::IsConsistent( const RSCINST & rInst )
{
if( !bNoId )
{
- if( (sal_Int32)pClassData->pEntries[ i ].aName > 0x7FFF ||
- (sal_Int32)pClassData->pEntries[ i ].aName < 1 )
+ if( (sal_Int32)pClassData->pEntries[ i ].aName.GetNumber() > 0x7FFF ||
+ (sal_Int32)pClassData->pEntries[ i ].aName.GetNumber() < 1 )
{
bRet = false;
}
diff --git a/rsc/source/res/rscmgr.cxx b/rsc/source/res/rscmgr.cxx
index 2de220dca5f1..33f805830718 100644
--- a/rsc/source/res/rscmgr.cxx
+++ b/rsc/source/res/rscmgr.cxx
@@ -233,7 +233,7 @@ ERRTYPE RscMgr::WriteRcHeader( const RSCINST & rInst, RscWriteRc & rMem,
sal_uInt32 nLocalOff; // local offset
};
*/
- sal_uInt32 nID = rId;
+ sal_uInt32 nID = rId.GetNumber();
rMem.PutAt( nOldSize, nID );
rMem.PutAt( nOldSize +4, (sal_uInt32)rInst.pClass->GetTypId() );
rMem.PutAt( nOldSize +8, (sal_uInt32)(rMem.Size() - nOldSize) );
diff --git a/rsc/source/res/rscrange.cxx b/rsc/source/res/rscrange.cxx
index d243ca8a4be7..1f99bed6b786 100644
--- a/rsc/source/res/rscrange.cxx
+++ b/rsc/source/res/rscrange.cxx
@@ -345,7 +345,7 @@ ERRTYPE RscIdRange::SetRef( const RSCINST & rInst, const RscId & rRscId )
ERRTYPE aError;
if( rRscId.IsId() )
{
- aError = SetNumber( rInst, rRscId );
+ aError = SetNumber( rInst, rRscId.GetNumber() );
if( aError.IsOk() )
{
*reinterpret_cast<RscId *>(rInst.pData) = rRscId;