diff options
-rw-r--r-- | include/svtools/svparser.hxx | 15 | ||||
-rw-r--r-- | svtools/source/svhtml/parhtml.cxx | 22 | ||||
-rw-r--r-- | svtools/source/svrtf/svparser.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 4 |
5 files changed, 29 insertions, 30 deletions
diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx index 35da5bd51ad8..0941c4e6d99b 100644 --- a/include/svtools/svparser.hxx +++ b/include/svtools/svparser.hxx @@ -22,7 +22,6 @@ #include <svtools/svtdllapi.h> #include <tools/link.hxx> #include <tools/ref.hxx> -#include <tools/solar.h> #include <tools/long.hxx> #include <rtl/textenc.h> #include <rtl/ustring.hxx> @@ -49,8 +48,8 @@ class SVT_DLLPUBLIC SvParser : public SvRefBase protected: SvStream& rInput; OUString aToken; // scanned token - sal_uLong nlLineNr; // current line number - sal_uLong nlLinePos; // current column number + sal_uInt32 nlLineNr; // current line number + sal_uInt32 nlLinePos; // current column number std::unique_ptr<SvParser_Impl<T>> pImplData; // internal data tools::Long m_nTokenIndex; // current token index to detect loops for seeking backwards @@ -107,12 +106,12 @@ public: SvParserState GetStatus() const; // StatusInfo - sal_uLong GetLineNr() const; - sal_uLong GetLinePos() const; + sal_uInt32 GetLineNr() const; + sal_uInt32 GetLinePos() const; void IncLineNr(); - sal_uLong IncLinePos(); - void SetLineNr( sal_uLong nlNum ); - void SetLinePos( sal_uLong nlPos ); + sal_uInt32 IncLinePos(); + void SetLineNr( sal_uInt32 nlNum ); + void SetLinePos( sal_uInt32 nlPos ); sal_uInt32 GetNextChar(); // Return next Unicode codepoint in UTF32. void RereadLookahead(); 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; } diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index ff6086e1ac1f..1473697a07ad 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -171,8 +171,8 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame static constexpr tools::Long nMinPrtLine = 0; // This Line must not be underrun when printing // Hack for table cells stretching multiple pages - sal_uLong mnAllLines :24; // Line count for the Paint (including nThisLines) - sal_uLong mnThisLines :8; // Count of Lines of the Frame + sal_uInt32 mnAllLines :24; // Line count for the Paint (including nThisLines) + sal_uInt32 mnThisLines :8; // Count of Lines of the Frame // The x position for flys anchored at this paragraph. // These values are calculated in SwTextFrame::CalcBaseOfstForFly() diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 6a63cc26500b..acd1b1b4f5be 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -3756,7 +3756,7 @@ sal_uInt16 SwTextFrame::GetLineCount(TextFrameIndex const nPos) void SwTextFrame::ChgThisLines() { // not necessary to format here (GetFormatted etc.), because we have to come from there! - sal_uLong nNew = 0; + sal_uInt32 nNew = 0; const SwLineNumberInfo &rInf = GetDoc().GetLineNumberInfo(); if ( !GetText().isEmpty() && HasPara() ) { @@ -3765,7 +3765,7 @@ void SwTextFrame::ChgThisLines() if ( rInf.IsCountBlankLines() ) { aLine.Bottom(); - nNew = static_cast<sal_uLong>(aLine.GetLineNr()); + nNew = aLine.GetLineNr(); } else { |