summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorEike Rathke <er@openoffice.org>2000-12-08 16:01:26 +0000
committerEike Rathke <er@openoffice.org>2000-12-08 16:01:26 +0000
commiteb53979dcaddfdcf97f1081942a42ef81e022226 (patch)
treeaaa75d510ac4c2c3cfb9af11d9a6940169ad48a5 /unotools
parent3136b143947893fc961411f34c09a4700625c094 (diff)
#81304# include BASE_FORM in NumericTypeMask
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/charclass.hxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/unotools/inc/unotools/charclass.hxx b/unotools/inc/unotools/charclass.hxx
index e2c6661efe8f..9191a25a5f70 100644
--- a/unotools/inc/unotools/charclass.hxx
+++ b/unotools/inc/unotools/charclass.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: charclass.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: er $ $Date: 2000-10-29 17:15:02 $
+ * last change: $Author: er $ $Date: 2000-12-08 17:01:26 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,6 +112,15 @@ const sal_Int32 nCharClassLetterTypeMask =
nCharClassAlphaTypeMask |
::com::sun::star::i18n::KCharacterType::LETTER;
+const sal_Int32 nCharClassNumericType =
+ ::com::sun::star::i18n::KCharacterType::DIGIT;
+
+const sal_Int32 nCharClassNumericTypeMask =
+ nCharClassNumericType |
+ ::com::sun::star::i18n::KCharacterType::PRINTABLE |
+ ::com::sun::star::i18n::KCharacterType::BASE_FORM;
+
+
class CharClass
{
::com::sun::star::lang::Locale aLocale;
@@ -178,19 +187,17 @@ public:
/// whether type is pure numeric or not, e.g. return of getStringType
static inline sal_Bool isNumericType( sal_Int32 nType )
{
- return ((nType &
- ::com::sun::star::i18n::KCharacterType::DIGIT) != 0) &&
- ((nType & ~(::com::sun::star::i18n::KCharacterType::DIGIT |
- ::com::sun::star::i18n::KCharacterType::PRINTABLE)) == 0);
+ return ((nType & nCharClassNumericType) != 0) &&
+ ((nType & ~(nCharClassNumericTypeMask)) == 0);
}
/// whether type is pure alphanumeric or not, e.g. return of getStringType
static inline sal_Bool isAlphaNumericType( sal_Int32 nType )
{
return ((nType & (nCharClassAlphaType |
- ::com::sun::star::i18n::KCharacterType::DIGIT)) != 0) &&
+ nCharClassNumericType)) != 0) &&
((nType & ~(nCharClassAlphaTypeMask |
- ::com::sun::star::i18n::KCharacterType::DIGIT)) == 0);
+ nCharClassNumericTypeMask)) == 0);
}
/// whether type is pure letter or not, e.g. return of getStringType
@@ -204,9 +211,9 @@ public:
static inline sal_Bool isLetterNumericType( sal_Int32 nType )
{
return ((nType & (nCharClassLetterType |
- ::com::sun::star::i18n::KCharacterType::DIGIT)) != 0) &&
+ nCharClassNumericType)) != 0) &&
((nType & ~(nCharClassLetterTypeMask |
- ::com::sun::star::i18n::KCharacterType::DIGIT)) == 0);
+ nCharClassNumericTypeMask)) == 0);
}