diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-02 22:16:48 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2014-02-03 07:44:28 +0000 |
commit | 3cbfcee36dd16e451d76c561eaaaee0ff29b01a5 (patch) | |
tree | 7377a9e1d8cd56279104429abce73aec334569d5 /svtools | |
parent | 5c39b6b997ddc85e6848efc230a427a124b97264 (diff) |
xub_StrLen and tools/string.hxx final straw
Thre is still some 0xffff limit left and possibly some
less than gracefully handled overflow/error cases
Change-Id: I00957ee3a30b02f73918ea49d7353056263dc638
Reviewed-on: https://gerrit.libreoffice.org/7787
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/edit/editsyntaxhighlighter.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index 178a13c4b733..f62a428fcad4 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -49,8 +49,8 @@ void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText) void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) { TextSelection aCurrentPos = GetTextView()->GetSelection(); - xub_StrLen nStartPos = aCurrentPos.GetStart().GetIndex(); - sal_uLong nStartPara = aCurrentPos.GetStart().GetPara(); + sal_Int32 nStartPos = aCurrentPos.GetStart().GetIndex(); + sal_Int32 nStartPara = aCurrentPos.GetStart().GetPara(); sal_uInt16 nCount = 0; int nChar = -1; @@ -81,7 +81,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) if (nChar != -1) { - for (long nPara = nStartPara; nPara>=0; --nPara) + for (sal_Int32 nPara = nStartPara; nPara >= 0; --nPara) { if (nStartPos == 0) continue; @@ -91,7 +91,7 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) if (aLine.isEmpty()) continue; - for (sal_Int32 i = ((sal_uLong)nPara==nStartPara) ? nStartPos-1 : aLine.getLength()-1; i>0; --i) + for (sal_Int32 i = (nPara==nStartPara) ? nStartPos-1 : aLine.getLength()-1; i>0; --i) { if (aLine[i] == nChar) { |