diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-03-17 12:35:14 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-03-17 12:35:14 +0000 |
commit | d4294c127ade247ffbc20619966f2a9360924d31 (patch) | |
tree | 13848b4fda221a145b6e9a24a5cedce1c39d2875 /basic | |
parent | 34bb8071849d76abdc87792f278c2d024a485cd5 (diff) |
INTEGRATION: CWS jl5vba (1.3.94); FILE MERGED
2004/01/21 09:28:59 ab 1.3.94.1: #111934# Merge to src680, for tasks see message INTEGRATION: CWS ab02vba (1.3.6)
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/inc/scanner.hxx | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/basic/source/inc/scanner.hxx b/basic/source/inc/scanner.hxx index 7d3014e3e2a5..357a8962a66b 100644 --- a/basic/source/inc/scanner.hxx +++ b/basic/source/inc/scanner.hxx @@ -2,9 +2,9 @@ * * $RCSfile: scanner.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: rt $ $Date: 2003-04-23 16:57:54 $ + * last change: $Author: obo $ $Date: 2004-03-17 13:35:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,7 @@ protected: BOOL bHash; // TRUE: # eingelesen BOOL bError; // TRUE: Fehler generieren BOOL bUsedForHilite; // TRUE: Nutzung fuer Highlighting + BOOL bCompatible; // TRUE: OPTION Compatible void GenError( SbError ); public: @@ -113,6 +114,7 @@ public: void EnableErrors() { bError = FALSE; } BOOL IsHash() { return bHash; } + BOOL IsCompatible() { return bCompatible; } BOOL WhiteSpace() { return bSpaces; } short GetErrors() { return nErrors; } short GetLine() { return nLine; } @@ -132,12 +134,29 @@ public: double GetDbl() { return nVal; } }; +class IsoLatinLetterTable +{ + bool IsLetterTab[256]; + +public: + IsoLatinLetterTable( void ); + + inline bool isLetter( sal_Unicode c ) + { + bool bRet = IsLetterTab[c]; + return bRet; + } +}; + class BasicSimpleCharClass { + static IsoLatinLetterTable aLetterTable; + public: - static BOOL isAlpha( sal_Unicode c ) + static BOOL isAlpha( sal_Unicode c, bool bCompatible ) { - BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + BOOL bRet = (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') + || (bCompatible && aLetterTable.isLetter( c )); return bRet; } @@ -147,12 +166,11 @@ public: return bRet; } - static BOOL isAlphaNumeric( sal_Unicode c ) + static BOOL isAlphaNumeric( sal_Unicode c, bool bCompatible ) { - BOOL bRet = isDigit( c ) || isAlpha( c ); + BOOL bRet = isDigit( c ) || isAlpha( c, bCompatible ); return bRet; } }; - #endif |