diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 1cccc7bfa633..ee0083c9a2e4 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -590,10 +590,10 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash( bool bEnDash = (eLang == LANGUAGE_HUNGARIAN || eLang == LANGUAGE_FINNISH); if( ((cEmDash && !bEnDash) || (cEnDash && bEnDash)) && 4 <= nEndPos - nSttPos ) { - String sTmp( rTxt.copy( nSttPos, nEndPos - nSttPos ) ); - xub_StrLen nFndPos = sTmp.SearchAscii( "--" ); - if( STRING_NOTFOUND != nFndPos && nFndPos && - nFndPos + 2 < sTmp.Len() && + OUString sTmp( rTxt.copy( nSttPos, nEndPos - nSttPos ) ); + sal_Int32 nFndPos = sTmp.indexOf("--"); + if( nFndPos != -1 && nFndPos && + nFndPos + 2 < sTmp.getLength() && ( rCC.isLetterNumeric( sTmp, nFndPos - 1 ) || lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nFndPos - 1 ] )) && ( rCC.isLetterNumeric( sTmp, nFndPos + 2 ) || |