#include <kohyphen.h>
Graphe de collaboration de KoHyphenator:
Fonctions membres publiques | |
~KoHyphenator () | |
bool | checkHyphenPos (const QString &str, int pos, const QString &lang) const |
char * | hyphens (const QString &str, const QString &lang) const |
QString | hyphenate (const QString &str, const QString &lang) const |
Fonctions membres publiques statiques | |
static KoHyphenator * | self () |
Types privés | |
typedef QMap< QString, EncodingStruct > | EncodingMap |
Fonctions membres privées | |
QTextCodec * | codecForLang (const QString &lang) const |
KoHyphenator () | |
HyphenDict * | dict (const QString &lang) const |
Attributs privés | |
QMap< QString, HyphenDict * > | dicts |
EncodingMap | encodings |
Attributs privés statiques | |
static KoHyphenator * | s_self |
Classes | |
struct | EncodingStruct |
The KoHyphenator class provides an interface to the libhnj hyphenation library.
Libhnj library was written for TeX and adopted to use with OpenOffice. This library tries to adopt it for KDE.
It handles the hyphenation dictionary loading for the specified language. QString -> char* conversion is done by using of settings in dicts.xml file in datadir/koffice/hyphdicts (dictionaries are also located there).
The hyphenate() functions returns QString containing hyphenation chars (0xad) or char* in format of hnj_hyphen_hyphenate() function from libhnj library.
Définition à la ligne 59 du fichier kohyphen.h.
typedef QMap<QString, EncodingStruct> KoHyphenator::EncodingMap [private] |
Définition à la ligne 126 du fichier kohyphen.h.
KoHyphenator::~KoHyphenator | ( | ) |
Définition à la ligne 89 du fichier kohyphen.cpp.
Références dicts, et hnj_hyphen_free().
Voici le graphe d'appel pour cette fonction :
KoHyphenator::KoHyphenator | ( | ) | [private] |
KoHyphenator * KoHyphenator::self | ( | ) | [static] |
Returns the single KoHyphenator instance (singleton pattern) Beware that this might throw an exception in case of an installation problem! Catch KoHyphenatorExceptions!
Définition à la ligne 41 du fichier kohyphen.cpp.
Références kohyphensd, et s_self.
Référencé par KoTextFormatter::KoTextFormatter(), et main().
Voici le graphe d'appel pour cette fonction :
bool KoHyphenator::checkHyphenPos | ( | const QString & | str, | |
int | pos, | |||
const QString & | lang | |||
) | const |
Checks if the letter in position pos is placed before the hyphen.
Can be used to check if the line break at given position should be forced and automatic hyphen added.
Définition à la ligne 153 du fichier kohyphen.cpp.
Références hyphens().
Voici le graphe d'appel pour cette fonction :
char * KoHyphenator::hyphens | ( | const QString & | str, | |
const QString & | lang | |||
) | const |
Returns the pointer to the string in hnj_hyphen_hyphenate() format (that is hyphenation function from underlying libhnj library).
The string is array of integer numbers. Each odd number marks that hyphen can be added after the character in the position of that number. The returned string must be deleted with "delete[] x;"
For example, for the string "example" the returning value is "01224400".
str | String to be hyphenated. | |
lang | Language for the hyphenation dictionary to be loaded. Language: two chars containing the ISO 639-1 code (for example "en", "uk", etc.) (could be lang_COUNTRY as well). |
Définition à la ligne 98 du fichier kohyphen.cpp.
Références codecForLang(), dict(), hnj_hyphen_hyphenate(), et KoHyphenatorException::message().
Référencé par checkHyphenPos(), et KoTextFormatterCore::format().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QString KoHyphenator::hyphenate | ( | const QString & | str, | |
const QString & | lang | |||
) | const |
Hyphenates the string str and returns the string with hyphenation marks in it.
str | String to be hyphenated. | |
lang | Language for the hyphenation dictionary to be loaded. Language: two chars containing the ISO 639-1 code (for example "en", "uk", etc.) (could be lang_COUNTRY as well). |
Définition à la ligne 118 du fichier kohyphen.cpp.
Références codecForLang(), dict(), hnj_hyphen_hyphenate(), et KoHyphenatorException::message().
Référencé par check_hyphenation(), et main().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QTextCodec * KoHyphenator::codecForLang | ( | const QString & | lang | ) | const [private] |
lang
. Définition à la ligne 211 du fichier kohyphen.cpp.
Références encodings.
Référencé par hyphenate(), et hyphens().
Voici le graphe d'appel pour cette fonction :
HyphenDict * KoHyphenator::dict | ( | const QString & | lang | ) | const [private] |
Définition à la ligne 170 du fichier kohyphen.cpp.
Références dicts, encodings, et hnj_hyphen_load().
Référencé par hyphenate(), et hyphens().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QMap<QString, HyphenDict*> KoHyphenator::dicts [private] |
EncodingMap KoHyphenator::encodings [mutable, private] |
Définition à la ligne 127 du fichier kohyphen.h.
Référencé par codecForLang(), dict(), et KoHyphenator().
KoHyphenator * KoHyphenator::s_self [static, private] |