summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@novell.com>2011-06-07 17:52:02 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-06-07 17:53:04 +0100
commit54b81bc2644fa89dd57d35bea74dce13157975cb (patch)
treef1d295b28387bca5b056d18adf7875b7f21076f5 /editeng
parent49fa826e25415442c6ca4b18039f2dc63fab8280 (diff)
fix auto-correction crash - fdo#38000
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx3
1 files changed, 1 insertions, 2 deletions
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( );