Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MWAWFontConverterInternal::State Class Reference

the default font converter More...

## Classes
struct | UnicodeCache
| small structure to speedup unicode More...

## Public Member Functions
| State ()
| the constructor More...
int | getUnusedId ()
| returns an unused id More...
int | getId (std::string const &name, std::string family="")
| returns the identificator for a name, if not set creates one More...
std::string | getName (int macId)
| returns the name corresponding to an id or return std::string("") More...
int | unicode (int macId, unsigned char c)
int | unicode (int macId, unsigned char c, MWAWInputStreamPtr &input)
int | unicode (int macId, unsigned char c, unsigned char const *(&str), int len)
| converts a character in unicode, if needed can read the next input caracter in str More...
void | getOdtInfo (int macId, std::string &nm, int &deltaSize)
| final font name and a delta which can be used to change the size if no name is found, return "Times New Roman" More...
void | setCorrespondance (int macId, std::string const &name, std::string family="")
| fixes the name corresponding to an id More...

## Protected Member Functions
void | initMaps ()
| initializes the map More...
bool | updateCache (int macId)
| try to update the cache More...

## Protected Attributes
MWAWFontConverterInternal::Data::KnownConversion | m_knownConversion
| the basic conversion map More...
std::map< int, std::string > | m_idNameMap
| map sysid -> font name More...
std::map< std::string, int > | m_nameIdMap
| map font name -> sysid More...
long | m_nameIdCounter
| Internal: a counter modified when a new correspondance name<->id is found. More...
int | m_uniqueId
| a int used to create new id for a name More...
shared_ptr< MWAWFontSJISConverter > | m_sjisConverter
| a SJIS convertor to convert Shit-JIS font More...
struct MWAWFontConverterInternal::State::UnicodeCache | m_unicodeCache

## Detailed Description

the default font converter

## Constructor & Destructor Documentation

## ◆ State()

MWAWFontConverterInternal::State::State | ( |  | ) |
| inline

the constructor

## Member Function Documentation

## ◆ getId()

int MWAWFontConverterInternal::State::getId | ( | std::string const & | name,
|  | std::string | family = `""`
| ) |  |
| inline

returns the identificator for a name, if not set creates one

## ◆ getName()

std::string MWAWFontConverterInternal::State::getName | ( | int | macId | ) |
| inline

returns the name corresponding to an id or return std::string("")

## ◆ getOdtInfo()

void MWAWFontConverterInternal::State::getOdtInfo | ( | int | macId,
|  | std::string & | nm,
|  | int & | deltaSize
| ) |  |

final font name and a delta which can be used to change the size if no name is found, return "Times New Roman"

## ◆ getUnusedId()

int MWAWFontConverterInternal::State::getUnusedId | ( |  | ) |
| inline

returns an unused id

## ◆ initMaps()

void MWAWFontConverterInternal::State::initMaps | ( |  | ) |
| protected

initializes the map

## ◆ setCorrespondance()

void MWAWFontConverterInternal::State::setCorrespondance | ( | int | macId,
|  | std::string const & | name,
|  | std::string | family = `""`
| ) |  |
| inline

fixes the name corresponding to an id

## ◆ unicode() [1/3]

int MWAWFontConverterInternal::State::unicode | ( | int | macId,
|  | unsigned char | c
| ) |  |

## ◆ unicode() [2/3]

int MWAWFontConverterInternal::State::unicode | ( | int | macId,
|  | unsigned char | c,
|  | MWAWInputStreamPtr & | input
| ) |  |

## ◆ unicode() [3/3]

int MWAWFontConverterInternal::State::unicode | ( | int | macId,
|  | unsigned char | c,
|  | unsigned char const *& | str,
|  | int | len
| ) |  |

converts a character in unicode, if needed can read the next input caracter in str

Returns
  -1 if the character is not transformed

## ◆ updateCache()

bool MWAWFontConverterInternal::State::updateCache | ( | int | macId | ) |
| protected

try to update the cache

## Member Data Documentation

## ◆ m_idNameMap

std::map<int, std::string> MWAWFontConverterInternal::State::m_idNameMap
| protected

map sysid -> font name

## ◆ m_knownConversion

MWAWFontConverterInternal::Data::KnownConversion MWAWFontConverterInternal::State::m_knownConversion
| protected

the basic conversion map

## ◆ m_nameIdCounter

long MWAWFontConverterInternal::State::m_nameIdCounter
| protected

Internal: a counter modified when a new correspondance name<->id is found.

## ◆ m_nameIdMap

std::map<std::string, int> MWAWFontConverterInternal::State::m_nameIdMap
| protected

map font name -> sysid

## ◆ m_sjisConverter

shared_ptr<MWAWFontSJISConverter> MWAWFontConverterInternal::State::m_sjisConverter
| protected

a SJIS convertor to convert Shit-JIS font

## ◆ m_unicodeCache

struct MWAWFontConverterInternal::State::UnicodeCache MWAWFontConverterInternal::State::m_unicodeCache
| protected

## ◆ m_uniqueId

int MWAWFontConverterInternal::State::m_uniqueId
| protected

a int used to create new id for a name

The documentation for this class was generated from the following file:

- MWAWFontConverter.cxx