From 9307b65407c1c50f3be8bbe5a664700e945a7efb Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 7 Nov 2013 16:59:04 +0000 Subject: safe STRING_MAXLEN -> -1 conversion Change-Id: If07e632e81e1fda98f587b3c34b009144126d7ef --- sw/source/ui/lingu/hhcwrp.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx index 0b7d9ba489b6..28e159acaac3 100644 --- a/sw/source/ui/lingu/hhcwrp.cxx +++ b/sw/source/ui/lingu/hhcwrp.cxx @@ -603,7 +603,7 @@ void SwHHCWrapper::Convert() // not work. Thus since chinese conversion is not interactive we start // at the begin of the paragraph to solve the problem, i.e. have the // TextConversion service get those characters together in the same call. - xub_StrLen nStartIdx = STRING_MAXLEN; + sal_Int32 nStartIdx = -1; if (editeng::HangulHanjaConversion::IsChinese( GetSourceLanguage() ) ) nStartIdx = 0; else @@ -618,11 +618,11 @@ void SwHHCWrapper::Convert() if (aBoundary.startPos < aText.getLength() && aBoundary.startPos != aBoundary.endPos) { - nStartIdx = static_cast< xub_StrLen >(aBoundary.startPos ); + nStartIdx = aBoundary.startPos; } } - if (STRING_MAXLEN != nStartIdx) + if (nStartIdx != -1) *m_pConvArgs->pStartIdx = nStartIdx; } } -- cgit