summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2006-08-01 14:52:32 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2006-08-01 14:52:32 +0000
commit4ee100a0b360c35e9ec7dea9e239437569b495f9 (patch)
treeabce2e167aedb0c98eab7bdc9de41a76e4c38c38 /xmloff
parent33a52a668f3f47f06459f4c7e8eb0f529ff43d6f (diff)
INTEGRATION: CWS numberx204 (1.41.18); FILE MERGED
2006/07/21 13:09:22 er 1.41.18.1: #i58725# lcl_ValidChar: treat space equal to non-breaking space separator
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlnumfi.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 195f882a9bb9..88ed8f2e724d 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: xmlnumfi.cxx,v $
*
- * $Revision: 1.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: rt $ $Date: 2006-07-25 09:55:03 $
+ * last change: $Author: ihi $ $Date: 2006-08-01 15:52:32 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -784,10 +784,14 @@ sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent
{
sal_uInt16 nFormatType = rParent.GetType();
+ // Treat space equal to non-breaking space separator.
+ const sal_Unicode cNBSP = 0x00A0;
+ sal_Unicode cTS;
if ( ( nFormatType == XML_TOK_STYLES_NUMBER_STYLE ||
nFormatType == XML_TOK_STYLES_CURRENCY_STYLE ||
nFormatType == XML_TOK_STYLES_PERCENTAGE_STYLE ) &&
- cChar == rParent.GetLocaleData().getNumThousandSep().GetChar(0) )
+ (cChar == (cTS = rParent.GetLocaleData().getNumThousandSep().GetChar(0)) ||
+ (cChar == ' ' && cTS == cNBSP)) )
{
// #i22394# Extra occurrences of thousands separator must be quoted, so they
// aren't mis-interpreted as display-factor.