tdf#114441 sal_uLong to better integer types
Change-Id: I55b45821cf67a99f97ba067a3d4923d76c19696e
Reviewed-on: https://gerrit.libreoffice.org/50204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 3b62c886..a4de8a2 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -799,7 +799,7 @@ Document::retrieveParagraphText(Paragraph const * pParagraph)
{
SolarMutexGuard aGuard;
::osl::MutexGuard aInternalGuard(GetMutex());
return m_rEngine.GetText(static_cast< ::sal_uLong >(pParagraph->getNumber()));
return m_rEngine.GetText(static_cast< ::sal_uInt32 >(pParagraph->getNumber()));
// numeric overflow cannot happen here
}
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 6d6ef01..c7eb307b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -420,7 +420,7 @@ void ModulWindow::LoadBasic()
if ( pStream )
{
AssertValidEditEngine();
sal_uLong nLines = CalcLineCount( *pStream );
sal_uInt32 nLines = CalcLineCount( *pStream );
// nLines*4: ReadText/Formatting/Highlighting/Formatting
GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE), nLines*4 );
GetEditEngine()->SetUpdateMode( false );
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 79428e1..653b27b 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -138,7 +138,7 @@ public:
ExtTextEngine* GetEditEngine() const { return pEditEngine.get(); }
TextView* GetEditView() const { return pEditView.get(); }
void CreateProgress( const OUString& rText, sal_uLong nRange );
void CreateProgress( const OUString& rText, sal_uInt32 nRange );
void DestroyProgress();
void ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted );
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 06604ba..a506a68 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -204,7 +204,7 @@ private:
class EditorWindow::ProgressInfo : public SfxProgress
{
public:
ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uLong nRange) :
ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uInt32 nRange) :
SfxProgress(pObjSh, rText, nRange),
nCurState(0)
{ }
@@ -1304,7 +1304,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted )
}
}
void EditorWindow::CreateProgress( const OUString& rText, sal_uLong nRange )
void EditorWindow::CreateProgress( const OUString& rText, sal_uInt32 nRange )
{
DBG_ASSERT( !pProgress, "ProgressInfo exists already" );
pProgress.reset(new ProgressInfo(
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index ea892bf..c12fb56 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -39,7 +39,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
{
bCreatingWindow = true;
sal_uLong nKey = 0;
sal_uInt16 nKey = 0;
VclPtr<DialogWindow> pWin;
OUString aLibName( rLibName );
OUString aDlgName( rDlgName );
@@ -97,7 +97,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
if( pWin )
{
pWin->GrabScrollBars( aHScrollBar.get(), aVScrollBar.get() );
pTabBar->InsertPage( static_cast<sal_uInt16>(nKey), aDlgName );
pTabBar->InsertPage( nKey, aDlgName );
pTabBar->Sort();
if ( !pCurWin )
SetCurWindow( pWin, false, false );
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index f8332d8..a770bd9 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -620,10 +620,10 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines )
}
}
sal_uLong CalcLineCount( SvStream& rStream )
sal_uInt32 CalcLineCount( SvStream& rStream )
{
sal_uLong nLFs = 0;
sal_uLong nCRs = 0;
sal_uInt32 nLFs = 0;
sal_uInt32 nCRs = 0;
char c;
rStream.Seek( 0 );
diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 454601d..fa30b4c 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -293,7 +293,7 @@ private:
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines );
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
sal_uLong CalcLineCount( SvStream& rStream );
sal_uInt32 CalcLineCount( SvStream& rStream );
bool QueryReplaceMacro( const OUString& rName, weld::Widget* pParent );
bool QueryDelMacro( const OUString& rName, weld::Widget* pParent );
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index 5872826..7ddc3e9 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -40,7 +40,7 @@ friend class SvTokenStream;
OString aString;
union
{
sal_uLong nLong;
sal_uInt64 nLong;
bool bBool;
char cChar;
SvStringHashEntry * pHash;
@@ -79,7 +79,7 @@ public:
? pHash->GetName()
: aString;
}
sal_uLong GetNumber() const { return nLong; }
sal_uInt64 GetNumber() const { return nLong; }
bool GetBool() const { return bBool; }
char GetChar() const { return cChar; }
@@ -124,7 +124,7 @@ class SvTokenStream
}
void FillTokenList();
sal_uLong GetNumber();
sal_uInt64 GetNumber();
bool MakeToken( SvToken & );
bool IsEof() const { return pInStream->eof(); }
void SetMax()
diff --git a/idl/source/cmptools/lex.cxx b/idl/source/cmptools/lex.cxx
index 2f1e550..599b061 100644
--- a/idl/source/cmptools/lex.cxx
+++ b/idl/source/cmptools/lex.cxx
@@ -148,9 +148,9 @@ char SvTokenStream::GetNextChar()
return nChar;
}
sal_uLong SvTokenStream::GetNumber()
sal_uInt64 SvTokenStream::GetNumber()
{
sal_uLong l = 0;
sal_uInt64 l = 0;
short nLog = 10;
if( '0' == c )