diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-06 14:38:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-10-06 17:52:53 +0200 |
commit | d6a5214c70b82df5cef3cbac87a255c7f56b6726 (patch) | |
tree | 5d1c999f756582271e075f5b3b379bcadefac3d0 | |
parent | 28bd6ad2318208644c13d355e91977389053170f (diff) |
sal_uInt16->sal_Int32 for some index vars in lcl_Highlight
to match the possible length of OUString
Change-Id: I561d1a7685d10fbd3b404ec91b486a9f5eb54932
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141013
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/uibase/docvw/srcedtw.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/docvw/srcedtw.cxx b/sw/source/uibase/docvw/srcedtw.cxx index 71ee88e0ebbf..fa865a744aa8 100644 --- a/sw/source/uibase/docvw/srcedtw.cxx +++ b/sw/source/uibase/docvw/srcedtw.cxx @@ -79,11 +79,11 @@ static void lcl_Highlight(const OUString& rSource, TextPortions& aPortionList) const sal_Unicode cLF = 0x0a; const sal_Unicode cCR = 0x0d; - const sal_uInt16 nStrLen = rSource.getLength(); - sal_uInt16 nInsert = 0; // number of inserted portions - sal_uInt16 nActPos = 0; // position, where '<' was found - sal_uInt16 nPortStart = USHRT_MAX; // for the TextPortion - sal_uInt16 nPortEnd = 0; + const sal_Int32 nStrLen = rSource.getLength(); + sal_Int32 nInsert = 0; // number of inserted portions + sal_Int32 nActPos = 0; // position, where '<' was found + sal_Int32 nPortStart = SAL_MAX_INT32; // for the TextPortion + sal_Int32 nPortEnd = 0; TextPortion aText; while(nActPos < nStrLen) { @@ -160,7 +160,7 @@ static void lcl_Highlight(const OUString& rSource, TextPortions& aPortionList) if(svtools::HTMLUNKNOWN != eFoundType) { bool bFound = false; - for(sal_uInt16 i = nPortEnd; i < nStrLen; i++) + for(sal_Int32 i = nPortEnd; i < nStrLen; i++) if(cCloseBracket == rSource[i]) { bFound = true; |