LibreOffice Module i18nutil (master)  1
Macros | Functions
unicode.cxx File Reference
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/languagetagicu.hxx>
#include <i18nutil/unicode.hxx>
#include <sal/log.hxx>
#include <unicode/numfmt.h>
#include "unicode_data.h"
#include <rtl/character.hxx>
#include <memory>
Include dependency graph for unicode.cxx:

Go to the source code of this file.

Macros

#define bit(name)    (1U << name)
 
#define UPPERMASK   bit(UnicodeType::UPPERCASE_LETTER)
 
#define LOWERMASK   bit(UnicodeType::LOWERCASE_LETTER)
 
#define TITLEMASK   bit(UnicodeType::TITLECASE_LETTER)
 
#define ALPHAMASK
 
#define SPACEMASK
 
#define CONTROLMASK
 
#define IsType(func, mask)
 
#define CONTROLSPACE
 

Functions

template<class L , typename T >
staticgetScriptType (const sal_Unicode ch, const L *typeList, T unknownType)
 
 IsType (unicode::isControl, CONTROLMASK) IsType(unicode
 

Macro Definition Documentation

#define ALPHAMASK
Value:
bit(UnicodeType::MODIFIER_LETTER)|\
bit(UnicodeType::OTHER_LETTER)
#define LOWERMASK
Definition: unicode.cxx:102
#define TITLEMASK
Definition: unicode.cxx:104
#define UPPERMASK
Definition: unicode.cxx:100

Definition at line 106 of file unicode.cxx.

#define bit (   name)    (1U << name)

Definition at line 98 of file unicode.cxx.

Referenced by IsType().

#define CONTROLMASK
Value:
bit(UnicodeType::CONTROL)|\
bit(UnicodeType::FORMAT)|\
bit(UnicodeType::LINE_SEPARATOR)|\
bit(UnicodeType::PARAGRAPH_SEPARATOR)
#define bit(name)
Definition: unicode.cxx:98

Definition at line 114 of file unicode.cxx.

#define CONTROLSPACE
Value:
bit(0x09)|bit(0x0a)|bit(0x0b)|bit(0x0c)|bit(0x0d)|\
bit(0x1c)|bit(0x1d)|bit(0x1e)|bit(0x1f)
#define bit(name)
Definition: unicode.cxx:98

Referenced by IsType().

#define IsType (   func,
  mask 
)
Value:
bool func( const sal_Unicode ch) {\
return (bit(getUnicodeType(ch)) & (mask)) != 0;\
}
sal_uInt16 sal_Unicode
#define bit(name)
Definition: unicode.cxx:98

Definition at line 119 of file unicode.cxx.

#define LOWERMASK   bit(UnicodeType::LOWERCASE_LETTER)

Definition at line 102 of file unicode.cxx.

#define SPACEMASK
Value:
bit(UnicodeType::SPACE_SEPARATOR)|\
bit(UnicodeType::LINE_SEPARATOR)|\
bit(UnicodeType::PARAGRAPH_SEPARATOR)
#define bit(name)
Definition: unicode.cxx:98

Definition at line 110 of file unicode.cxx.

#define TITLEMASK   bit(UnicodeType::TITLECASE_LETTER)

Definition at line 104 of file unicode.cxx.

#define UPPERMASK   bit(UnicodeType::UPPERCASE_LETTER)

Definition at line 100 of file unicode.cxx.

Function Documentation

template<class L , typename T >
static T getScriptType ( const sal_Unicode  ch,
const L *  typeList,
unknownType 
)
static

Definition at line 39 of file unicode.cxx.

References from, i, type, UnicodeScriptType, UnicodeScriptTypeFrom, and UnicodeScriptTypeTo.

Referenced by unicode::getUnicodeScriptType().

IsType ( unicode::isControl  ,
CONTROLMASK   
)

Definition at line 124 of file unicode.cxx.

References bit, CONTROLSPACE, and unicode::isSpace().