From 96710f8e466d44047ea4ac9cb8c70dc7664f5c73 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 18 Mar 2014 16:12:40 +0200 Subject: convert OUString::match to OUString::endsWith Convert code like: rTxt.match( "---", rTxt.getLength()-3 ) to: rTxt.endsWith( "---" ) Change-Id: Iada74c5e714f7234f25b326526843a36255d5599 --- editeng/source/misc/svxacorr.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'editeng/source') diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 320a9994f595..f6c935e6e417 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -1322,8 +1322,7 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, // since LibO 4.1, '-' is a word separator // fdo#67742 avoid "--" to be replaced by "–" if next is "-" - if( rTxt.getLength() >= 3 && - rTxt.match( OUString("---"), rTxt.getLength()-3 ) ) + if( rTxt.endsWith( "---" ) ) break; bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos, *this, pPara ); -- cgit