diff options
author | Laurent Balland-Poirier <laurent.balland-poirier@laposte.net> | 2013-09-22 00:19:12 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-09-23 22:44:33 +0200 |
commit | 1ca4b1bae11704a1119a9c680c6ae5b85ea1b31e (patch) | |
tree | 07878bf8f78e3a3c8c5e21712820cac77ce34f4d /svl/source | |
parent | 7e0676734319ad62d1ee2d762fa3f5de71ee9a02 (diff) |
fdo#54686 Treat hard blank as soft blank in number
AutoCorrect option "Add non-breaking space in French..." insert
non-breaking space (hard blank) and avoid recognition of percent
number and time number. This patch treats hard blanks as soft blank
in number format recognition
Rev.#1: change #define to const variable. Same change in svxaccor
Rev.#2: improvements
Reviewed-on: https://gerrit.libreoffice.org/6015
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit 2f4d7eacabd62db35777682bcca353e142e024bf)
Signed-off-by: Eike Rathke <erack@redhat.com>
Conflicts:
editeng/source/misc/svxacorr.cxx
svl/source/numbers/zforfind.cxx
Change-Id: I30c2c36778cb53a0238a0829043dad4d709f97d2
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/numbers/zforfind.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx index bd68ab4d3f3f..a2d625fa2fb1 100644 --- a/svl/source/numbers/zforfind.cxx +++ b/svl/source/numbers/zforfind.cxx @@ -65,6 +65,8 @@ const sal_uInt8 ImpSvNumberInputScan::nMatchedUsedAsReturn = 0x10; * would work, together with the nTimezonePos handling in GetTimeRef(). */ #define NF_RECOGNIZE_ISO8601_TIMEZONES 0 +static const sal_Unicode cNonBreakingSpace = 0xA0; + //--------------------------------------------------------------------------- // Konstruktor @@ -480,7 +482,7 @@ inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString, if ( nPos < rString.getLength() ) { register const sal_Unicode* p = rString.getStr() + nPos; - while ( *p == ' ' ) + while ( *p == ' ' || *p == cNonBreakingSpace ) { nPos++; p++; |