[Libreoffice-commits] core.git: editeng/source
Caolán McNamara
caolanm at redhat.com
Tue Aug 30 11:48:09 UTC 2016
editeng/source/misc/svxacorr.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 776e2e2635487523cd1757f382f54487b36b5ad3
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 30 12:38:27 2016 +0100
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
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 08cc36e..86f9afd 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)
{
More information about the Libreoffice-commits
mailing list