sw/source/uibase/docvw/srcedtw.cxx |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d6a5214c70b82df5cef3cbac87a255c7f56b6726
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Oct 6 14:38:38 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Oct 6 17:52:53 2022 +0200

    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.gran...@collabora.co.uk>

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;

Reply via email to