From 6549aa9afa7f39b45a0d402d83f4975f37bcc2fb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 2 May 2021 18:00:32 +0200 Subject: sal_uLong->sal_uInt32 in SvParser Change-Id: Ibe5599e1cc136330a8e9c089c7cc66d0ef4bc966 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115002 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/svhtml/parhtml.cxx | 22 +++++++++++----------- svtools/source/svrtf/svparser.cxx | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) (limited to 'svtools') diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 6796c6ca8738..d9f64c4541d9 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -134,7 +134,7 @@ void HTMLOption::GetNumbers( std::vector &rNumbers ) const // This is a very simplified scanner: it only searches all // numerals in the string. bool bInNum = false; - sal_uLong nNum = 0; + sal_uInt32 nNum = 0; for( sal_Int32 i=0; i(nPos+1)*GetCharSize(), "Wrong stream position" ); DBG_ASSERT( nlLinePos-nLinePos == - static_cast(nPos+1), + static_cast(nPos+1), "Wrong line position" ); rInput.Seek( nStreamPos ); nlLinePos = nLinePos; @@ -553,7 +553,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) static_cast(nPos+1)*GetCharSize(), "Wrong stream position" ); DBG_ASSERT( nlLinePos-nLinePos == - static_cast(nPos+1), + static_cast(nPos+1), "Wrong line position" ); rInput.Seek( nStreamPos ); nlLinePos = nLinePos; @@ -810,8 +810,8 @@ HtmlTokenId HTMLParser::GetNextRawToken() // and remember position in stream. sal_uInt64 nStreamPos = rInput.Tell(); - sal_uLong nLineNr = GetLineNr(); - sal_uLong nLinePos = GetLinePos(); + sal_uInt32 nLineNr = GetLineNr(); + sal_uInt32 nLinePos = GetLinePos(); // Start of an end token? bool bOffState = false; @@ -1041,8 +1041,8 @@ HtmlTokenId HTMLParser::GetNextToken_() case '<': { sal_uInt64 nStreamPos = rInput.Tell(); - sal_uLong nLineNr = GetLineNr(); - sal_uLong nLinePos = GetLinePos(); + sal_uInt32 nLineNr = GetLineNr(); + sal_uInt32 nLinePos = GetLinePos(); bool bOffState = false; if( '/' == (nNextCh = GetNextChar()) ) @@ -1113,8 +1113,8 @@ HtmlTokenId HTMLParser::GetNextToken_() if( '>'!=nNextCh ) aToken += " "; sal_uInt64 nCStreamPos = 0; - sal_uLong nCLineNr = 0; - sal_uLong nCLinePos = 0; + sal_uInt32 nCLineNr = 0; + sal_uInt32 nCLinePos = 0; sal_Int32 nCStrLen = 0; bool bDone = false; @@ -1220,7 +1220,7 @@ HtmlTokenId HTMLParser::GetNextToken_() nRet = HtmlTokenId::UNKNOWNCONTROL_ON; sal_uInt64 nCStreamPos = rInput.Tell(); - sal_uLong nCLineNr = GetLineNr(), nCLinePos = GetLinePos(); + sal_uInt32 nCLineNr = GetLineNr(), nCLinePos = GetLinePos(); bool bDone = false; // Read until closing %>. If not found restart at first >. diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index c24e60f71209..301e2961d923 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -35,8 +35,8 @@ struct SvParser_Impl { OUString aToken; // gescanntes Token sal_uInt64 nFilePos; // actual position in stream - sal_uLong nlLineNr; // actual line number - sal_uLong nlLinePos; // actual column number + sal_uInt32 nlLineNr; // actual line number + sal_uInt32 nlLinePos; // actual column number tools::Long nTokenValue; // extra value (RTF) bool bTokenHasValue; // indicates whether nTokenValue is valid T nToken; // actual Token @@ -112,12 +112,12 @@ SvParser::~SvParser() } template SvParserState SvParser::GetStatus() const { return eState; } -template sal_uLong SvParser::GetLineNr() const { return nlLineNr; } -template sal_uLong SvParser::GetLinePos() const { return nlLinePos; } +template sal_uInt32 SvParser::GetLineNr() const { return nlLineNr; } +template sal_uInt32 SvParser::GetLinePos() const { return nlLinePos; } template void SvParser::IncLineNr() { ++nlLineNr; } -template sal_uLong SvParser::IncLinePos() { return ++nlLinePos; } -template void SvParser::SetLineNr( sal_uLong nlNum ) { nlLineNr = nlNum; } -template void SvParser::SetLinePos( sal_uLong nlPos ) { nlLinePos = nlPos; } +template sal_uInt32 SvParser::IncLinePos() { return ++nlLinePos; } +template void SvParser::SetLineNr( sal_uInt32 nlNum ) { nlLineNr = nlNum; } +template void SvParser::SetLinePos( sal_uInt32 nlPos ) { nlLinePos = nlPos; } template bool SvParser::IsParserWorking() const { return SvParserState::Working == eState; } template rtl_TextEncoding SvParser::GetSrcEncoding() const { return eSrcEnc; } template void SvParser::SetSwitchToUCS2( bool bSet ) { bSwitchToUCS2 = bSet; } -- cgit