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/uchar.h>
#include "unicode_data.h"
#include <rtl/character.hxx>
#include <o3tl/string_view.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 >
static T getScriptType (const sal_Unicode ch, const L *typeList, T unknownType)
 
 IsType (unicode::isControl, CONTROLMASK) IsType(unicode
 

Macro Definition Documentation

◆ ALPHAMASK

#define ALPHAMASK
Value:
bit(UnicodeType::MODIFIER_LETTER)|\
bit(UnicodeType::OTHER_LETTER)
#define TITLEMASK
Definition: unicode.cxx:201
#define LOWERMASK
Definition: unicode.cxx:199
#define UPPERMASK
Definition: unicode.cxx:197

Definition at line 203 of file unicode.cxx.

◆ bit

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

Definition at line 195 of file unicode.cxx.

◆ CONTROLMASK

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

Definition at line 211 of file unicode.cxx.

◆ CONTROLSPACE

#define CONTROLSPACE
Value:
bit(0x09)|bit(0x0a)|bit(0x0b)|bit(0x0c)|bit(0x0d)|\
bit(0x1c)|bit(0x1d)|bit(0x1e)|bit(0x1f)

◆ IsType

#define IsType (   func,
  mask 
)
Value:
bool func( const sal_uInt32 ch) {\
return (bit(getUnicodeType(ch)) & (mask)) != 0;\
}

Definition at line 216 of file unicode.cxx.

◆ LOWERMASK

#define LOWERMASK   bit(UnicodeType::LOWERCASE_LETTER)

Definition at line 199 of file unicode.cxx.

◆ SPACEMASK

#define SPACEMASK
Value:
bit(UnicodeType::SPACE_SEPARATOR)|\
bit(UnicodeType::LINE_SEPARATOR)|\
bit(UnicodeType::PARAGRAPH_SEPARATOR)

Definition at line 207 of file unicode.cxx.

◆ TITLEMASK

#define TITLEMASK   bit(UnicodeType::TITLECASE_LETTER)

Definition at line 201 of file unicode.cxx.

◆ UPPERMASK

#define UPPERMASK   bit(UnicodeType::UPPERCASE_LETTER)

Definition at line 197 of file unicode.cxx.

Function Documentation

◆ getScriptType()

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

◆ IsType()

IsType ( unicode::isControl  ,
CONTROLMASK   
)

Definition at line 221 of file unicode.cxx.

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