[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - editeng/source
Caolán McNamara
caolanm at redhat.com
Fri Sep 2 16:29:21 UTC 2016
editeng/source/misc/svxacorr.cxx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit 4edd7ed8bc2c75a23babe9893fdbe58dd7bcf562
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
(cherry picked from commit 776e2e2635487523cd1757f382f54487b36b5ad3)
Reviewed-on: https://gerrit.libreoffice.org/28495
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 5545432..0bfd925 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -461,13 +461,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