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:
committed by
Michael Stahl
parent
21138573fc
commit
5419b894a2
@@ -313,7 +313,7 @@ bool Outliner::IsInUndo() const
|
||||
return pEditEngine->IsInUndo();
|
||||
}
|
||||
|
||||
sal_uLong Outliner::GetLineCount( sal_Int32 nParagraph ) const
|
||||
sal_uInt32 Outliner::GetLineCount( sal_Int32 nParagraph ) const
|
||||
{
|
||||
return pEditEngine->GetLineCount( nParagraph );
|
||||
}
|
||||
@@ -323,7 +323,7 @@ sal_Int32 Outliner::GetLineLen( sal_Int32 nParagraph, sal_Int32 nLine ) const
|
||||
return pEditEngine->GetLineLen( nParagraph, nLine );
|
||||
}
|
||||
|
||||
sal_uLong Outliner::GetLineHeight( sal_Int32 nParagraph )
|
||||
sal_uInt32 Outliner::GetLineHeight( sal_Int32 nParagraph )
|
||||
{
|
||||
return pEditEngine->GetLineHeight( nParagraph );
|
||||
}
|
||||
|
@@ -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 );
|
||||
|
@@ -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());
|
||||
|
@@ -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];
|
||||
|
@@ -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);
|
||||
|
@@ -855,9 +855,9 @@ public:
|
||||
const Link<Outliner*,void>& GetEndMovingHdl() const {return aEndMovingHdl;}
|
||||
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_uLong GetLineHeight( sal_Int32 nParagraph );
|
||||
sal_uInt32 GetLineHeight( sal_Int32 nParagraph );
|
||||
|
||||
ErrCode Read( SvStream& rInput, const OUString& rBaseURL, EETextFormat, SvKeyValueIterator* pHTTPHeaderAttrs = nullptr );
|
||||
|
||||
|
Reference in New Issue
Block a user