diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-08-30 12:38:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-08-30 12:47:44 +0100 |
commit | 776e2e2635487523cd1757f382f54487b36b5ad3 (patch) | |
tree | 567e1102ef3fd782a5202e658e5b4c5c04508d19 | |
parent | 45b89f4ebb0d3070d45a88ac033879fd11997976 (diff) |
Resolves: tdf#96369 don't superscript ordinals for mixed text and numbers
e.g. 5th is ok, but foo5th is not
this is basically a regression from
commit 17e6b8fd05af8fff86847c0ef1e8cc9ad013a1bd
Date: Thu Apr 7 13:33:48 2011 +0200
where the older code would only do the conversion if the string
before the number was comprised of non-letters, so go back
to that logic.
Change-Id: I928c365eb11891e78331bbd165dbdb9541ac0361
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 08cc36ebefcb..86f9afdc7adb 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -468,13 +468,12 @@ bool SvxAutoCorrect::FnChgOrdinalNumber( bool bFoundEnd = false; bool isValidNumber = true; sal_Int32 i = nEndPos; - while (i > nSttPos) { i--; bool isDigit = rCC.isDigit(rTxt, i); if (bFoundEnd) - isValidNumber |= isDigit; + isValidNumber &= (isDigit | !rCC.isLetter(rTxt, i)); if (isDigit && !bFoundEnd) { |