[ooo-build-commit] .: patches/dev300

René Engelhard rene at kemper.freedesktop.org
Wed Jul 28 14:04:54 PDT 2010


 patches/dev300/apply                                |    2 
 patches/dev300/editeng.dont-freeze-in-autocorr.diff |   46 ++++++++++++++++++++
 2 files changed, 48 insertions(+)

New commits:
commit 401082f1ac4a03d167811c401b9a126b58596909
Author: Rene Engelhard <rene at debian.org>
Date:   Wed Jul 28 16:23:34 2010 +0200

    fix i#i113461
    
    * patches/dev300/apply:
    * patches/dev300/editeng.dont-freeze-in-autocorr.diff:

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 96eddf1..2893c8b 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2432,6 +2432,8 @@ statusbar-fancy-modified-status-starmath.diff, i#103862, kohei
 statusbar-fancy-modified-status-svx.diff,      i#103862, kohei
 statusbar-fancy-modified-status-sw.diff,       i#103862, kohei
 
+[ Fixes ]
+editeng.dont-freeze-in-autocorr.diff, i#113461
 
 [ UnitTesting ]
 SectionOwner => jholesov
diff --git a/patches/dev300/editeng.dont-freeze-in-autocorr.diff b/patches/dev300/editeng.dont-freeze-in-autocorr.diff
new file mode 100644
index 0000000..289505e
--- /dev/null
+++ b/patches/dev300/editeng.dont-freeze-in-autocorr.diff
@@ -0,0 +1,46 @@
+# HG changeset patch
+# Parent f08e0746219b133571e5903b94a77d2fe71b7db1
+#i113461# do not freeze after erasing non-breaking space inserted by French AutoCorrection
+
+diff -r f08e0746219b -r 80209fb60358 editeng/source/misc/svxacorr.cxx
+--- editeng/source/misc/svxacorr.cxx	Wed Jul 28 13:18:57 2010 +0200
++++ editeng/source/misc/svxacorr.cxx	Wed Jul 28 13:19:27 2010 +0200
+@@ -1243,27 +1243,25 @@
+                 else if ( bIsNextRun && !IsAutoCorrectChar( cChar ) )
+                 {
+                     // Remove the NBSP if it wasn't an autocorrection
+-                    if ( NeedsHardspaceAutocorr( rTxt.GetChar( nInsPos - 1 ) ) && 
++                    if ( nInsPos != 0 && NeedsHardspaceAutocorr( rTxt.GetChar( nInsPos - 1 ) ) &&
+                             cChar != ' ' && cChar != '\t' && cChar != CHAR_HARDBLANK )
+                     {
+                         // Look for the last HARD_SPACE
+                         xub_StrLen nPos = nInsPos - 1;
+-                        bool bFound = false;
+-                        while ( nPos != STRING_NOTFOUND  && !bFound )
++                        bool bContinue = true;
++                        while ( bContinue )
+                         {
+-                            sal_Unicode cTmpChar = rTxt.GetChar( nPos );
++                            const sal_Unicode cTmpChar = rTxt.GetChar( nPos );
+                             if ( cTmpChar == CHAR_HARDBLANK )
+-                                bFound = true;
+-                            else if ( !NeedsHardspaceAutocorr( cTmpChar ) )
+-                                nPos = STRING_NOTFOUND;
++                            {
++                                rDoc.Delete( nPos, nPos + 1 );
++                                nRet = AddNonBrkSpace;
++                                bContinue = false;
++                            }
++                            else if ( !NeedsHardspaceAutocorr( cTmpChar ) || nPos == 0 )
++                                bContinue = false;
+                             nPos--;
+                         }
+-
+-                        if ( bFound && nPos != STRING_NOTFOUND )
+-                        {
+-                            rDoc.Delete( nPos + 1, nPos + 2 );
+-                            nRet = AddNonBrkSpace;
+-                        }
+                     }
+                 }
+             }


More information about the ooo-build-commit mailing list