diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-05-02 18:00:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-02 19:33:14 +0200 |
commit | 6549aa9afa7f39b45a0d402d83f4975f37bcc2fb (patch) | |
tree | 289b30fe2cef993a0b22af25cd4837dd69e8c357 /svtools | |
parent | 211a63a780659b404541cae619d10f204a8bfe65 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 22 | ||||
-rw-r--r-- | svtools/source/svrtf/svparser.cxx | 14 |
2 files changed, 18 insertions, 18 deletions
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<sal_uInt32> &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<aValue.getLength(); i++ ) { sal_Unicode c = aValue[ i ]; @@ -397,7 +397,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) else { sal_uInt64 nStreamPos = rInput.Tell(); - sal_uLong nLinePos = GetLinePos(); + sal_uInt32 nLinePos = GetLinePos(); sal_uInt32 cChar = 0U; if( '#' == (nNextCh = GetNextChar()) ) @@ -515,7 +515,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) static_cast<sal_uInt64>(nPos+1)*GetCharSize(), "Wrong stream position" ); DBG_ASSERT( nlLinePos-nLinePos == - static_cast<sal_uLong>(nPos+1), + static_cast<sal_uInt32>(nPos+1), "Wrong line position" ); rInput.Seek( nStreamPos ); nlLinePos = nLinePos; @@ -553,7 +553,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) static_cast<sal_uInt64>(nPos+1)*GetCharSize(), "Wrong stream position" ); DBG_ASSERT( nlLinePos-nLinePos == - static_cast<sal_uLong>(nPos+1), + static_cast<sal_uInt32>(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<T>::~SvParser() } template<typename T> SvParserState SvParser<T>::GetStatus() const { return eState; } -template<typename T> sal_uLong SvParser<T>::GetLineNr() const { return nlLineNr; } -template<typename T> sal_uLong SvParser<T>::GetLinePos() const { return nlLinePos; } +template<typename T> sal_uInt32 SvParser<T>::GetLineNr() const { return nlLineNr; } +template<typename T> sal_uInt32 SvParser<T>::GetLinePos() const { return nlLinePos; } template<typename T> void SvParser<T>::IncLineNr() { ++nlLineNr; } -template<typename T> sal_uLong SvParser<T>::IncLinePos() { return ++nlLinePos; } -template<typename T> void SvParser<T>::SetLineNr( sal_uLong nlNum ) { nlLineNr = nlNum; } -template<typename T> void SvParser<T>::SetLinePos( sal_uLong nlPos ) { nlLinePos = nlPos; } +template<typename T> sal_uInt32 SvParser<T>::IncLinePos() { return ++nlLinePos; } +template<typename T> void SvParser<T>::SetLineNr( sal_uInt32 nlNum ) { nlLineNr = nlNum; } +template<typename T> void SvParser<T>::SetLinePos( sal_uInt32 nlPos ) { nlLinePos = nlPos; } template<typename T> bool SvParser<T>::IsParserWorking() const { return SvParserState::Working == eState; } template<typename T> rtl_TextEncoding SvParser<T>::GetSrcEncoding() const { return eSrcEnc; } template<typename T> void SvParser<T>::SetSwitchToUCS2( bool bSet ) { bSwitchToUCS2 = bSet; } |