From 54b81bc2644fa89dd57d35bea74dce13157975cb Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 7 Jun 2011 17:52:02 +0100 Subject: fix auto-correction crash - fdo#38000 --- editeng/source/misc/svxacorr.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'editeng') diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index b0a489b6279a..4bf43cffc102 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -518,7 +518,7 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber( bool validNumber = true; xub_StrLen i = nEndPos; - do + while ( i > nSttPos ) { i--; bool isDigit = rCC.isDigit( rTxt, i ); @@ -531,7 +531,6 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber( nNumEnd = i; } } - while ( i > nSttPos ); if ( foundEnd && validNumber ) { sal_Int32 nNum = rTxt.Copy( nSttPos, nNumEnd - nSttPos + 1 ).ToInt32( ); -- cgit