summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-03-12 20:29:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-14 06:08:20 +0000
commitb24a9f8b3537ee5c200c1d52fc51157f1ac55e9d (patch)
treece5a92947fdc7c93732652b5c69c9d932b1270f6 /tools
parent41c7ee5f0a3d0e128134665d709fd46e663fd373 (diff)
make o3tl::strong_int constructor explicit
Could have sworn I did this originally, somehow it got lost. Also fix a thinko in tools::ResId I introduced in commit 2b70fb58be039fbd05ea833a40b1b3e9f922e45c "Use o3tl::strong_int on RESOURCE_TYPE" Change-Id: Id3b39962255297010cd1feaaca6d822168311081 Reviewed-on: https://gerrit.libreoffice.org/35108 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/rc/resmgr.cxx4
-rw-r--r--tools/source/ref/pstm.cxx16
2 files changed, 10 insertions, 10 deletions
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 29e3751f6e42..55f50ece4c69 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -671,7 +671,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
aStr.append('\n');
aStr.append(" Class: ");
- aStr.append(OUStringToOString(GetTypeRes_Impl(ResId(nRT, *pNewResMgr)),
+ aStr.append(OUStringToOString(GetTypeRes_Impl(ResId((sal_uInt32)nRT, *pNewResMgr)),
RTL_TEXTENCODING_UTF8));
aStr.append(", Id: ");
aStr.append(static_cast<sal_Int32>(nId));
@@ -682,7 +682,7 @@ void ResMgr::RscError_Impl( const sal_Char* pMessage, ResMgr* pResMgr,
{
aStr.append(" [ Class: ");
aStr.append(OUStringToOString(GetTypeRes_Impl(
- ResId(rResStack[nDepth].pResource->GetRT(), *pNewResMgr)),
+ ResId((sal_uInt32)rResStack[nDepth].pResource->GetRT(), *pNewResMgr)),
RTL_TEXTENCODING_UTF8));
aStr.append(", Id: ");
aStr.append(static_cast<sal_Int32>(
diff --git a/tools/source/ref/pstm.cxx b/tools/source/ref/pstm.cxx
index 3a7435de81bf..c025ed96e132 100644
--- a/tools/source/ref/pstm.cxx
+++ b/tools/source/ref/pstm.cxx
@@ -54,10 +54,10 @@ SvCreateInstancePersist SvClassManager::Get( sal_Int32 nClassId )
SvPersistStream::SvPersistStream( SvClassManager & rMgr, SvStream * pStream )
: rClassMgr( rMgr )
, pStm( pStream )
- , aPUIdx( 1 )
+ , aPUIdx( UniqueIndex<SvPersistBase>::Index(1) )
, nStartIdx( 1 )
{
- DBG_ASSERT( nStartIdx != 0, "zero index not allowed" );
+ DBG_ASSERT( nStartIdx != Index(0), "zero index not allowed" );
m_isWritable = true;
if( pStm )
{
@@ -117,7 +117,7 @@ SvPersistStream::Index SvPersistStream::GetIndex( SvPersistBase * pObj ) const
PersistBaseMap::const_iterator it = aPTable.find( pObj );
if( it == aPTable.end() )
{
- return 0;
+ return Index(0);
}
return it->second;
}
@@ -357,18 +357,18 @@ static void ReadId
nClassId = 0;
rStm.ReadUChar( nHdr );
if( nHdr & P_ID_0 )
- nId = 0;
+ nId = SvPersistStream::Index(0);
else
{
if( (nHdr & P_VER_MASK) == 0 )
{
if( (nHdr & P_DBGUTIL) || !(nHdr & P_OBJ) )
- nId = SvPersistStream::ReadCompressed( rStm );
+ nId = SvPersistStream::Index(SvPersistStream::ReadCompressed( rStm ));
else
- nId = 0;
+ nId = SvPersistStream::Index(0);
}
else if( nHdr & P_ID )
- nId = SvPersistStream::ReadCompressed( rStm );
+ nId = SvPersistStream::Index(SvPersistStream::ReadCompressed( rStm ));
if( (nHdr & P_DBGUTIL) || (nHdr & P_OBJ) )
nClassId = (sal_uInt16)SvPersistStream::ReadCompressed( rStm );
@@ -429,7 +429,7 @@ void SvPersistStream::ReadObj
)
{
sal_uInt8 nHdr;
- Index nId = 0;
+ Index nId(0);
sal_uInt16 nClassId;
rpObj = nullptr; // specification: 0 in case of error