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>
This commit is contained in:
parent
28bd6ad231
commit
d6a5214c70
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue