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) ...@@ -799,7 +799,7 @@ Document::retrieveParagraphText(Paragraph const * pParagraph)
{ {
SolarMutexGuard aGuard; SolarMutexGuard aGuard;
::osl::MutexGuard aInternalGuard(GetMutex()); ::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 // numeric overflow cannot happen here
} }
......
...@@ -420,7 +420,7 @@ void ModulWindow::LoadBasic() ...@@ -420,7 +420,7 @@ void ModulWindow::LoadBasic()
if ( pStream ) if ( pStream )
{ {
AssertValidEditEngine(); AssertValidEditEngine();
sal_uLong nLines = CalcLineCount( *pStream ); sal_uInt32 nLines = CalcLineCount( *pStream );
// nLines*4: ReadText/Formatting/Highlighting/Formatting // nLines*4: ReadText/Formatting/Highlighting/Formatting
GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE), nLines*4 ); GetEditorWindow().CreateProgress( IDEResId(RID_STR_GENERATESOURCE), nLines*4 );
GetEditEngine()->SetUpdateMode( false ); GetEditEngine()->SetUpdateMode( false );
......
...@@ -138,7 +138,7 @@ public: ...@@ -138,7 +138,7 @@ public:
ExtTextEngine* GetEditEngine() const { return pEditEngine.get(); } ExtTextEngine* GetEditEngine() const { return pEditEngine.get(); }
TextView* GetEditView() const { return pEditView.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 DestroyProgress();
void ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted ); void ParagraphInsertedDeleted( sal_uLong nNewPara, bool bInserted );
......
...@@ -204,7 +204,7 @@ private: ...@@ -204,7 +204,7 @@ private:
class EditorWindow::ProgressInfo : public SfxProgress class EditorWindow::ProgressInfo : public SfxProgress
{ {
public: public:
ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uLong nRange) : ProgressInfo (SfxObjectShell* pObjSh, OUString const& rText, sal_uInt32 nRange) :
SfxProgress(pObjSh, rText, nRange), SfxProgress(pObjSh, rText, nRange),
nCurState(0) nCurState(0)
{ } { }
...@@ -1304,7 +1304,7 @@ void EditorWindow::ParagraphInsertedDeleted( sal_uLong nPara, bool bInserted ) ...@@ -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" ); DBG_ASSERT( !pProgress, "ProgressInfo exists already" );
pProgress.reset(new ProgressInfo( pProgress.reset(new ProgressInfo(
......
...@@ -39,7 +39,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const ...@@ -39,7 +39,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
{ {
bCreatingWindow = true; bCreatingWindow = true;
sal_uLong nKey = 0; sal_uInt16 nKey = 0;
VclPtr<DialogWindow> pWin; VclPtr<DialogWindow> pWin;
OUString aLibName( rLibName ); OUString aLibName( rLibName );
OUString aDlgName( rDlgName ); OUString aDlgName( rDlgName );
...@@ -97,7 +97,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const ...@@ -97,7 +97,7 @@ VclPtr<DialogWindow> Shell::CreateDlgWin( const ScriptDocument& rDocument, const
if( pWin ) if( pWin )
{ {
pWin->GrabScrollBars( aHScrollBar.get(), aVScrollBar.get() ); pWin->GrabScrollBars( aHScrollBar.get(), aVScrollBar.get() );
pTabBar->InsertPage( static_cast<sal_uInt16>(nKey), aDlgName ); pTabBar->InsertPage( nKey, aDlgName );
pTabBar->Sort(); pTabBar->Sort();
if ( !pCurWin ) if ( !pCurWin )
SetCurWindow( pWin, false, false ); SetCurWindow( pWin, false, false );
......
...@@ -620,10 +620,10 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines ) ...@@ -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_uInt32 nLFs = 0;
sal_uLong nCRs = 0; sal_uInt32 nCRs = 0;
char c; char c;
rStream.Seek( 0 ); rStream.Seek( 0 );
......
...@@ -293,7 +293,7 @@ private: ...@@ -293,7 +293,7 @@ private:
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines ); void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines );
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName ); 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 QueryReplaceMacro( const OUString& rName, weld::Widget* pParent );
bool QueryDelMacro( const OUString& rName, weld::Widget* pParent ); bool QueryDelMacro( const OUString& rName, weld::Widget* pParent );
......
...@@ -40,7 +40,7 @@ friend class SvTokenStream; ...@@ -40,7 +40,7 @@ friend class SvTokenStream;
OString aString; OString aString;
union union
{ {
sal_uLong nLong; sal_uInt64 nLong;
bool bBool; bool bBool;
char cChar; char cChar;
SvStringHashEntry * pHash; SvStringHashEntry * pHash;
...@@ -79,7 +79,7 @@ public: ...@@ -79,7 +79,7 @@ public:
? pHash->GetName() ? pHash->GetName()
: aString; : aString;
} }
sal_uLong GetNumber() const { return nLong; } sal_uInt64 GetNumber() const { return nLong; }
bool GetBool() const { return bBool; } bool GetBool() const { return bBool; }
char GetChar() const { return cChar; } char GetChar() const { return cChar; }
...@@ -124,7 +124,7 @@ class SvTokenStream ...@@ -124,7 +124,7 @@ class SvTokenStream
} }
void FillTokenList(); void FillTokenList();
sal_uLong GetNumber(); sal_uInt64 GetNumber();
bool MakeToken( SvToken & ); bool MakeToken( SvToken & );
bool IsEof() const { return pInStream->eof(); } bool IsEof() const { return pInStream->eof(); }
void SetMax() void SetMax()
......
...@@ -148,9 +148,9 @@ char SvTokenStream::GetNextChar() ...@@ -148,9 +148,9 @@ char SvTokenStream::GetNextChar()
return nChar; return nChar;
} }
sal_uLong SvTokenStream::GetNumber() sal_uInt64 SvTokenStream::GetNumber()
{ {
sal_uLong l = 0; sal_uInt64 l = 0;
short nLog = 10; short nLog = 10;
if( '0' == c ) 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