diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-30 11:03:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-30 11:04:22 +0100 |
commit | 64b720dce8d3087ed62da815ecae1375b45149be (patch) | |
tree | f09933f2322c72ba3e30ea7ea1c9598fe7658eea /editeng | |
parent | cfb09f556d7bc4d7341abf86c6e61af657235432 (diff) |
Related: fdo#38838 remove UniString::SearchAscii
Change-Id: Icb7850aaabe59f96ea26a665a8d25617b2741d68
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 ) || |