diff options
author | siddheshpatil777 <siddheshpatil777@gmail.com> | 2021-01-06 14:14:33 +0400 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-01-21 16:36:00 +0100 |
commit | 5419b894a2e791de24d10f0c4433a807e175e7a0 (patch) | |
tree | 72cdf2b9648a18d711c53bb0d36ffb550ec0850d /idl | |
parent | 21138573fcc6e300a446ffba8cfde00198fb249e (diff) |
tdf#114441: Convert use of sal_uLong to better integer types
Change-Id: I14742675541a315e72191df4ee38c35373b39d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108842
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'idl')
-rw-r--r-- | idl/inc/database.hxx | 4 | ||||
-rw-r--r-- | idl/source/objects/bastype.cxx | 2 | ||||
-rw-r--r-- | idl/source/prj/database.cxx | 22 | ||||
-rw-r--r-- | idl/source/prj/parser.cxx | 4 |
4 files changed, 16 insertions, 16 deletions
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx index 79d289bee697..dcdf935931c5 100644 --- a/idl/inc/database.hxx +++ b/idl/inc/database.hxx @@ -111,8 +111,8 @@ public: void SetAndWriteError( SvTokenStream & rInStm, const OString& rError ); void Push( SvMetaObject * pObj ); sal_uInt32 GetUniqueId() { return ++nUniqueId; } - bool FindId( const OString& rIdName, sal_uLong * pVal ); - void InsertId( const OString& rIdName, sal_uLong nVal ); + bool FindId( const OString& rIdName, sal_uInt32 * pVal ); + void InsertId( const OString& rIdName, sal_uInt32 nVal ); bool ReadIdFile( std::string_view rFileName ); SvMetaType * FindType( std::string_view rName ); diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index 0dddd98d5323..c68fa513ef0f 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -83,7 +83,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase, if( rTok.IsIdentifier() ) { - sal_uLong n; + sal_uInt32 n; if( !rBase.FindId( rTok.GetString(), &n ) ) rBase.SetAndWriteError( rInStm, "no value for identifier <" + getString() + "> " ); setString(rTok.GetString()); diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx index 6075a2da5fbd..56e05665b7f8 100644 --- a/idl/source/prj/database.cxx +++ b/idl/source/prj/database.cxx @@ -108,7 +108,7 @@ void SvIdlDataBase::Push( SvMetaObject * pObj ) GetStack().push_back( pObj ); } -bool SvIdlDataBase::FindId( const OString& rIdName, sal_uLong * pVal ) +bool SvIdlDataBase::FindId( const OString& rIdName, sal_uInt32 * pVal ) { if( pIdTable ) { @@ -122,7 +122,7 @@ bool SvIdlDataBase::FindId( const OString& rIdName, sal_uLong * pVal ) return false; } -void SvIdlDataBase::InsertId( const OString& rIdName, sal_uLong nVal ) +void SvIdlDataBase::InsertId( const OString& rIdName, sal_uInt32 nVal ) { if( !pIdTable ) pIdTable.reset( new SvStringHashTable ); @@ -163,7 +163,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName ) throw SvParseException( "unexpected token after define", rTok ); aDefName = rTok.GetString(); - sal_uLong nVal = 0; + sal_uInt32 nVal = 0; bool bOk = true; while( bOk ) { @@ -183,7 +183,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName ) } else if( rTok.IsIdentifier() ) { - sal_uLong n; + sal_uInt32 n; if( FindId( rTok.GetString(), &n ) ) nVal += n; else @@ -317,10 +317,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr SvToken& rTok = rInStm.GetToken_Next(); if( rTok.IsIdentifier() ) { - sal_uLong n; + sal_uInt32 n; if( FindId( rTok.GetString(), &n ) ) { - for( sal_uLong i = 0; i < aSlotList.size(); i++ ) + for( size_t i = 0; i < aSlotList.size(); i++ ) { SvMetaSlot * pSlot = aSlotList[i]; if( pSlot->GetSlotId().getString() == rTok.GetString() ) @@ -340,10 +340,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr SvMetaAttribute* SvIdlDataBase::FindKnownAttr( const SvIdentifier& rId ) { - sal_uLong n; + sal_uInt32 n; if( FindId( rId.getString(), &n ) ) { - for( sal_uLong i = 0; i < aSlotList.size(); i++ ) + for( size_t i = 0; i < aSlotList.size(); i++ ) { SvMetaSlot * pSlot = aSlotList[i]; if( pSlot->GetSlotId().getString() == rId.getString() ) @@ -372,7 +372,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm ) SvMetaClass * SvIdlDataBase::FindKnownClass( std::string_view aName ) { - for( sal_uLong n = 0; n < aClassList.size(); n++ ) + for( size_t n = 0; n < aClassList.size(); n++ ) { SvMetaClass * pClass = aClassList[n]; if( pClass->GetName() == aName ) @@ -392,7 +392,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm ) // error treatment OUString aFileName( rInStm.GetFileName() ); OStringBuffer aErrorText; - sal_uLong nRow = 0, nColumn = 0; + sal_uInt64 nRow = 0, nColumn = 0; rInStm.SeekToMax(); SvToken& rTok = rInStm.GetToken(); @@ -468,7 +468,7 @@ bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm ) // reset all tmp variables for writing WriteReset(); SvMemoryStream aTmpStm( 256000, 256000 ); - sal_uLong n; + size_t n; for( n = 0; n < GetModuleList().size(); n++ ) { SvMetaModule * pModule = GetModuleList()[n]; diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx index 7053cd905a07..28652c736c39 100644 --- a/idl/source/prj/parser.cxx +++ b/idl/source/prj/parser.cxx @@ -188,7 +188,7 @@ void SvIdlParser::ReadStruct() xAttr->aType = ReadKnownType(); xAttr->SetName(ReadIdentifier()); xAttr->aSlotId.setString(ReadIdentifier()); - sal_uLong n; + sal_uInt32 n; if( !rBase.FindId( xAttr->aSlotId.getString(), &n ) ) throw SvParseException( rInStm, "no value for identifier <" + xAttr->aSlotId.getString() + "> " ); xAttr->aSlotId.SetValue(n); @@ -449,7 +449,7 @@ void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr ) void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId) { rSlotId.setString( ReadIdentifier() ); - sal_uLong n; + sal_uInt32 n; if( !rBase.FindId( rSlotId.getString(), &n ) ) throw SvParseException( rInStm, "no value for identifier <" + rSlotId.getString() + "> " ); rSlotId.SetValue(n); |