Kaydet (Commit) 0b49701f authored tarafından Shubham Verma's avatar Shubham Verma Kaydeden (comit) Michael Stahl

tdf#114441 sal_uLong to better integer types

Change-Id: I55b45821cf67a99f97ba067a3d4923d76c19696e
Reviewed-on: https://gerrit.libreoffice.org/50204Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 49c3bab7
......@@ -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
}
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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(
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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 );
......
......@@ -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()
......
......@@ -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 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment