[Libreoffice-commits] core.git: editeng/source idl/inc idl/source include/editeng
siddheshpatil777 (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jan 21 15:36:41 UTC 2021
editeng/source/outliner/outlin2.cxx | 4 ++--
idl/inc/database.hxx | 4 ++--
idl/source/objects/bastype.cxx | 2 +-
idl/source/prj/database.cxx | 22 +++++++++++-----------
idl/source/prj/parser.cxx | 4 ++--
include/editeng/outliner.hxx | 4 ++--
6 files changed, 20 insertions(+), 20 deletions(-)
New commits:
commit 5419b894a2e791de24d10f0c4433a807e175e7a0
Author: siddheshpatil777 <siddheshpatil777 at gmail.com>
AuthorDate: Wed Jan 6 14:14:33 2021 +0400
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Thu Jan 21 16:36:00 2021 +0100
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 at allotropia.de>
diff --git a/editeng/source/outliner/outlin2.cxx b/editeng/source/outliner/outlin2.cxx
index ff3d1583a5f1..df2e50389d3f 100644
--- a/editeng/source/outliner/outlin2.cxx
+++ b/editeng/source/outliner/outlin2.cxx
@@ -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 );
}
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);
diff --git a/include/editeng/outliner.hxx b/include/editeng/outliner.hxx
index cfcfe85191d6..c8a1736cd85a 100644
--- a/include/editeng/outliner.hxx
+++ b/include/editeng/outliner.hxx
@@ -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 );
More information about the Libreoffice-commits
mailing list