#include <ie_imp_Applix.h>
enum IE_Imp_Applix::Applix_content_t [private] |
enum IE_Imp_Applix::Applix_context_t [private] |
enum IE_Imp_Applix::Applix_tag_t [private] |
IE_Imp_Applix::IE_Imp_Applix | ( | PD_Document * | pDocument | ) |
IE_Imp_Applix::~IE_Imp_Applix | ( | ) |
void IE_Imp_Applix::_applixDecodeText | ( | const char * | buf, | |
size_t | len | |||
) | [private] |
Decode a Text tag.
buf | the buffer containing current reassembled line (ie not wrapped) | |
len | length of the content of buf |
References UT_GrowBuf::append(), IE_Imp::appendSpan(), UT_GrowBuf::getLength(), UT_GrowBuf::getPointer(), m_mbtowc, m_textBuf, UT_UCS4_mbtowc::mbtowc(), s_decodeToUCS(), UT_GrowBuf::truncate(), and UT_DEBUGMSG.
Referenced by _dispatchTag().
bool IE_Imp_Applix::_applixGetLine | ( | const UT_ByteBufPtr & | pBuf, | |
GsfInput * | fp | |||
) | [private] |
Read an ApplixLine pBuf a byte buffer
fp | the file to read from |
References APPLIX_MAX_LINE_LENGTH, fgets(), UT_ASSERT, and UT_DEBUGMSG.
Referenced by _parseFile().
void IE_Imp_Applix::_applixNewPara | ( | const char * | buf, | |
size_t | len | |||
) | [private] |
Insert a new paragraph tag.
buf | the buffer containing current reassembled line (ie not wrapped) | |
len | length of the content of buf |
References IE_Imp::appendSpan(), IE_Imp::appendStrux(), UT_GrowBuf::getLength(), UT_GrowBuf::getPointer(), m_textBuf, PTX_Block, and xxx_UT_DEBUGMSG.
Referenced by _dispatchTag().
void IE_Imp_Applix::_applixPageBreak | ( | const char * | buf, | |
size_t | len | |||
) | [private] |
Decode a Page Break tag.
buf | the buffer containing current reassembled line (ie not wrapped) | |
len | length of the content of buf |
References UT_GrowBuf::append(), IE_Imp::appendSpan(), UT_GrowBuf::getLength(), UT_GrowBuf::getPointer(), m_textBuf, and UT_GrowBuf::truncate().
Referenced by _dispatchTag().
void IE_Imp_Applix::_dispatchTag | ( | Applix_tag_t | tag, | |
const char * | buf, | |||
size_t | len | |||
) | [private] |
Dispatch the tag to the right handler.
tag | is the Applix tag value | |
buf | is the complete line for parsing. | |
len | buffer content length |
References _applixDecodeText(), _applixNewPara(), _applixPageBreak(), axCtxFlow, END_FLOW_T, END_STYLES_T, m_axContext, PAGE_BREAK_T, PARA_T, START_FLOW_T, START_STYLES_T, TEXT_T, and UT_DEBUGMSG.
Referenced by _parseFile().
UT_Error IE_Imp_Applix::_loadFile | ( | GsfInput * | fp | ) | [protected, virtual] |
Implements IE_Imp.
References _parseFile(), _writeHeader(), and X_CleanupIfError.
UT_Error IE_Imp_Applix::_parseFile | ( | GsfInput * | fp | ) | [protected] |
References _applixGetLine(), _dispatchTag(), APPLIX_LINE_LENGTH, NOT_A_TAG, and s_getTagName().
Referenced by _loadFile().
UT_Error IE_Imp_Applix::_writeHeader | ( | GsfInput * | fp | ) | [protected] |
References IE_Imp::appendStrux(), PTX_Block, PTX_Section, and X_ReturnNoMemIfError.
Referenced by _loadFile().
short IE_Imp_Applix::s_16bitsToUCS | ( | const char * | str, | |
size_t | len, | |||
UT_UCSChar * | c | |||
) | [static, private] |
Converts an ^yxx sequence for 8 bits chars to an UCSChar
str | the buffer containing the sequence without ^ in head | |
len | the actual length of the buffer not includin the trailing 0. Must be at least 3 |
c | the output char |
References UT_ASSERT.
Referenced by s_decodeToUCS().
short IE_Imp_Applix::s_8bitsToUCS | ( | const char * | str, | |
size_t | len, | |||
UT_UCSChar * | c | |||
) | [static, private] |
Converts an ^xx sequence for 8 bits chars to an UCSChar
str | the buffer containing the sequence without ^ in head | |
len | the actual length of the buffer not includin the trailing 0. Must be at least 2 |
c | the output char |
References UT_ASSERT.
Referenced by s_decodeToUCS().
short IE_Imp_Applix::s_decodeToUCS | ( | const char * | str, | |
size_t | len, | |||
UT_UCSChar * | c | |||
) | [static, private] |
Dispatch an ^yxx sequence to the right decoder
str | the buffer containing the sequence without ^ in head | |
len | the actual length of the buffer not includin the trailing 0. Must be at least 2 |
c | the output char |
References s_16bitsToUCS(), s_8bitsToUCS(), and UT_DEBUGMSG.
Referenced by _applixDecodeText().
IE_Imp_Applix::Applix_tag_t IE_Imp_Applix::s_getTagName | ( | const char * | str, | |
size_t | len | |||
) | [static, private] |
Get the tag from the buffer and return the tag value.
str | the buffer | |
len | the length of the buffer content |
References APPLIX_LINE_LENGTH, NOT_A_TAG, s_name_2_tag(), tag_Unknown, UT_DEBUGMSG, UT_UCS4_isspace(), and xxx_UT_DEBUGMSG.
Referenced by _parseFile().
IE_Imp_Applix::Applix_tag_t IE_Imp_Applix::s_name_2_tag | ( | const char * | name, | |
size_t | n | |||
) | [static, private] |
Convert a tag string to a tag value. For tokenization.
name | tag string | |
n | size of content |
References AX_STRN_CMP, axwords, IE_Imp_Applix::Applix_mapping_t::tag, and xxx_UT_DEBUGMSG.
Referenced by s_getTagName().
IE_Imp_Applix::Applix_mapping_t IE_Imp_Applix::axwords [static, private] |
Referenced by s_name_2_tag().
Applix_context_t IE_Imp_Applix::m_axContext [private] |
Referenced by _dispatchTag().
UT_UCS4_mbtowc IE_Imp_Applix::m_mbtowc [private] |
Referenced by _applixDecodeText().
UT_GrowBuf IE_Imp_Applix::m_textBuf [private] |
Referenced by _applixDecodeText(), _applixNewPara(), and _applixPageBreak().