summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2013-09-22 00:19:12 +0200
committerEike Rathke <erack@redhat.com>2013-09-23 20:34:46 +0000
commit2f4d7eacabd62db35777682bcca353e142e024bf (patch)
treecc3ba98108f8752d8680271d158873ef52e4a546 /svl
parentdf58558769bb2286393db3b6e2ff1604cca92fea (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 Change-Id: I30c2c36778cb53a0238a0829043dad4d709f97d2 Reviewed-on: https://gerrit.libreoffice.org/6015 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/numbers/zforfind.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 381a2604bf62..3004211a3071 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;
+
ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
:
pUpperMonthText( NULL ),
@@ -459,7 +461,7 @@ inline void ImpSvNumberInputScan::SkipBlanks( const OUString& rString,
if ( nPos < rString.getLength() )
{
const sal_Unicode* p = rString.getStr() + nPos;
- while ( *p == ' ' )
+ while ( *p == ' ' || *p == cNonBreakingSpace )
{
nPos++;
p++;