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>
This commit is contained in:
siddheshpatil777
2021-01-06 14:14:33 +04:00
committed by Michael Stahl
parent 21138573fc
commit 5419b894a2
6 changed files with 20 additions and 20 deletions

View File

@@ -313,7 +313,7 @@ bool Outliner::IsInUndo() const
return pEditEngine->IsInUndo(); return pEditEngine->IsInUndo();
} }
sal_uLong Outliner::GetLineCount( sal_Int32 nParagraph ) const sal_uInt32 Outliner::GetLineCount( sal_Int32 nParagraph ) const
{ {
return pEditEngine->GetLineCount( nParagraph ); return pEditEngine->GetLineCount( nParagraph );
} }
@@ -323,7 +323,7 @@ sal_Int32 Outliner::GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const
return pEditEngine->GetLineLen( nParagraph, nLine ); return pEditEngine->GetLineLen( nParagraph, nLine );
} }
sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph ) sal_uInt32 Outliner::GetLineHeight( sal_Int32 nParagraph )
{ {
return pEditEngine->GetLineHeight( nParagraph ); return pEditEngine->GetLineHeight( nParagraph );
} }

View File

@@ -111,8 +111,8 @@ public:
void SetAndWriteError( SvTokenStream & rInStm, const OString& rError ); void SetAndWriteError( SvTokenStream & rInStm, const OString& rError );
void Push( SvMetaObject * pObj ); void Push( SvMetaObject * pObj );
sal_uInt32 GetUniqueId() { return ++nUniqueId; } sal_uInt32 GetUniqueId() { return ++nUniqueId; }
bool FindId( const OString& rIdName, sal_uLong * pVal ); bool FindId( const OString& rIdName, sal_uInt32 * pVal );
void InsertId( const OString& rIdName, sal_uLong nVal ); void InsertId( const OString& rIdName, sal_uInt32 nVal );
bool ReadIdFile( std::string_view rFileName ); bool ReadIdFile( std::string_view rFileName );
SvMetaType * FindType( std::string_view rName ); SvMetaType * FindType( std::string_view rName );

View File

@@ -83,7 +83,7 @@ void SvIdentifier::ReadSvIdl( SvIdlDataBase & rBase,
if( rTok.IsIdentifier() ) if( rTok.IsIdentifier() )
{ {
sal_uLong n; sal_uInt32 n;
if( !rBase.FindId( rTok.GetString(), &n ) ) if( !rBase.FindId( rTok.GetString(), &n ) )
rBase.SetAndWriteError( rInStm, "no value for identifier <" + getString() + "> " ); rBase.SetAndWriteError( rInStm, "no value for identifier <" + getString() + "> " );
setString(rTok.GetString()); setString(rTok.GetString());

View File

@@ -108,7 +108,7 @@ void SvIdlDataBase::Push( SvMetaObject * pObj )
GetStack().push_back( 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 ) if( pIdTable )
{ {
@@ -122,7 +122,7 @@ bool SvIdlDataBase::FindId( const OString& rIdName, sal_uLong * pVal )
return false; return false;
} }
void SvIdlDataBase::InsertId( const OString& rIdName, sal_uLong nVal ) void SvIdlDataBase::InsertId( const OString& rIdName, sal_uInt32 nVal )
{ {
if( !pIdTable ) if( !pIdTable )
pIdTable.reset( new SvStringHashTable ); pIdTable.reset( new SvStringHashTable );
@@ -163,7 +163,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName )
throw SvParseException( "unexpected token after define", rTok ); throw SvParseException( "unexpected token after define", rTok );
aDefName = rTok.GetString(); aDefName = rTok.GetString();
sal_uLong nVal = 0; sal_uInt32 nVal = 0;
bool bOk = true; bool bOk = true;
while( bOk ) while( bOk )
{ {
@@ -183,7 +183,7 @@ bool SvIdlDataBase::ReadIdFile( std::string_view rOFileName )
} }
else if( rTok.IsIdentifier() ) else if( rTok.IsIdentifier() )
{ {
sal_uLong n; sal_uInt32 n;
if( FindId( rTok.GetString(), &n ) ) if( FindId( rTok.GetString(), &n ) )
nVal += n; nVal += n;
else else
@@ -317,10 +317,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
SvToken& rTok = rInStm.GetToken_Next(); SvToken& rTok = rInStm.GetToken_Next();
if( rTok.IsIdentifier() ) if( rTok.IsIdentifier() )
{ {
sal_uLong n; sal_uInt32 n;
if( FindId( rTok.GetString(), &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]; SvMetaSlot * pSlot = aSlotList[i];
if( pSlot->GetSlotId().getString() == rTok.GetString() ) if( pSlot->GetSlotId().getString() == rTok.GetString() )
@@ -340,10 +340,10 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
SvMetaAttribute* SvIdlDataBase::FindKnownAttr( const SvIdentifier& rId ) SvMetaAttribute* SvIdlDataBase::FindKnownAttr( const SvIdentifier& rId )
{ {
sal_uLong n; sal_uInt32 n;
if( FindId( rId.getString(), &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]; SvMetaSlot * pSlot = aSlotList[i];
if( pSlot->GetSlotId().getString() == rId.getString() ) if( pSlot->GetSlotId().getString() == rId.getString() )
@@ -372,7 +372,7 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
SvMetaClass * SvIdlDataBase::FindKnownClass( std::string_view aName ) 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]; SvMetaClass * pClass = aClassList[n];
if( pClass->GetName() == aName ) if( pClass->GetName() == aName )
@@ -392,7 +392,7 @@ void SvIdlDataBase::WriteError( SvTokenStream & rInStm )
// error treatment // error treatment
OUString aFileName( rInStm.GetFileName() ); OUString aFileName( rInStm.GetFileName() );
OStringBuffer aErrorText; OStringBuffer aErrorText;
sal_uLong nRow = 0, nColumn = 0; sal_uInt64 nRow = 0, nColumn = 0;
rInStm.SeekToMax(); rInStm.SeekToMax();
SvToken& rTok = rInStm.GetToken(); SvToken& rTok = rInStm.GetToken();
@@ -468,7 +468,7 @@ bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
// reset all tmp variables for writing // reset all tmp variables for writing
WriteReset(); WriteReset();
SvMemoryStream aTmpStm( 256000, 256000 ); SvMemoryStream aTmpStm( 256000, 256000 );
sal_uLong n; size_t n;
for( n = 0; n < GetModuleList().size(); n++ ) for( n = 0; n < GetModuleList().size(); n++ )
{ {
SvMetaModule * pModule = GetModuleList()[n]; SvMetaModule * pModule = GetModuleList()[n];

View File

@@ -188,7 +188,7 @@ void SvIdlParser::ReadStruct()
xAttr->aType = ReadKnownType(); xAttr->aType = ReadKnownType();
xAttr->SetName(ReadIdentifier()); xAttr->SetName(ReadIdentifier());
xAttr->aSlotId.setString(ReadIdentifier()); xAttr->aSlotId.setString(ReadIdentifier());
sal_uLong n; sal_uInt32 n;
if( !rBase.FindId( xAttr->aSlotId.getString(), &n ) ) if( !rBase.FindId( xAttr->aSlotId.getString(), &n ) )
throw SvParseException( rInStm, "no value for identifier <" + xAttr->aSlotId.getString() + "> " ); throw SvParseException( rInStm, "no value for identifier <" + xAttr->aSlotId.getString() + "> " );
xAttr->aSlotId.SetValue(n); xAttr->aSlotId.SetValue(n);
@@ -449,7 +449,7 @@ void SvIdlParser::ReadInterfaceOrShellMethod( SvMetaAttribute& rAttr )
void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId) void SvIdlParser::ReadSlotId(SvIdentifier& rSlotId)
{ {
rSlotId.setString( ReadIdentifier() ); rSlotId.setString( ReadIdentifier() );
sal_uLong n; sal_uInt32 n;
if( !rBase.FindId( rSlotId.getString(), &n ) ) if( !rBase.FindId( rSlotId.getString(), &n ) )
throw SvParseException( rInStm, "no value for identifier <" + rSlotId.getString() + "> " ); throw SvParseException( rInStm, "no value for identifier <" + rSlotId.getString() + "> " );
rSlotId.SetValue(n); rSlotId.SetValue(n);

View File

@@ -855,9 +855,9 @@ public:
const Link<Outliner*,void>& GetEndMovingHdl() const {return aEndMovingHdl;} const Link<Outliner*,void>& GetEndMovingHdl() const {return aEndMovingHdl;}
void SetEndMovingHdl( const Link<Outliner*,void>& rLink){aEndMovingHdl=rLink;} void SetEndMovingHdl( const Link<Outliner*,void>& rLink){aEndMovingHdl=rLink;}
sal_uLong GetLineCount( sal_Int32 nParagraph ) const; sal_uInt32 GetLineCount( sal_Int32 nParagraph ) const;
sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const; sal_Int32 GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const;
sal_uLong GetLineHeight( sal_Int32 nParagraph ); sal_uInt32 GetLineHeight( sal_Int32 nParagraph );
ErrCode Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr ); ErrCode Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );