summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-30 11:03:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-30 11:04:22 +0100
commit64b720dce8d3087ed62da815ecae1375b45149be (patch)
treef09933f2322c72ba3e30ea7ea1c9598fe7658eea /editeng
parentcfb09f556d7bc4d7341abf86c6e61af657235432 (diff)
Related: fdo#38838 remove UniString::SearchAscii
Change-Id: Icb7850aaabe59f96ea26a665a8d25617b2741d68
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx8
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 ) ||