Public Member Functions | Protected Member Functions | Private Attributes

IE_Imp_Psion Class Reference

#include <ie_imp_Psion.h>

Inheritance diagram for IE_Imp_Psion:
IE_Imp IE_Imp_Psion_TextEd IE_Imp_Psion_Word

List of all members.

Public Member Functions

 IE_Imp_Psion (PD_Document *pDocument)
 ~IE_Imp_Psion ()

Protected Member Functions

virtual UT_Error _loadFile (GsfInput *input)
UT_Error getCharacterAttributes (const psiconv_character_layout layout, UT_UTF8String &props)
UT_Error getParagraphAttributes (const psiconv_paragraph_layout layout, UT_UTF8String &props)
UT_Error applyCharacterAttributes (const psiconv_character_layout layout)
UT_Error applyParagraphAttributes (const psiconv_paragraph_layout layout, const gchar *stylename)
UT_Error applyPageAttributes (const psiconv_page_layout_section layout, bool &with_header, bool &with_footer)
UT_Error prepareCharacters (const psiconv_ucs2 *input, int length, UT_UCS4String &text)
UT_Error readParagraphs (const psiconv_text_and_layout psiontext, const psiconv_word_styles_section style_sec)
UT_Error applyStyles (const psiconv_word_styles_section style_sec)
UT_Error processHeaderFooter (const psiconv_page_layout_section layout, bool with_header, bool with_footer)
UT_Error insertImage (const psiconv_in_line_layout in_line)
UT_Error insertObject (const psiconv_in_line_layout in_line)
virtual UT_Error parseFile (const psiconv_file psionfile)=0

Private Attributes

bool list

Constructor & Destructor Documentation

IE_Imp_Psion::IE_Imp_Psion ( PD_Document pDocument  )  [inline]
IE_Imp_Psion::~IE_Imp_Psion (  )  [inline]

Member Function Documentation

UT_Error IE_Imp_Psion::_loadFile ( GsfInput *  fp  )  [protected, virtual]

Import a file with the given filename from disk.

Implements IE_Imp.

References parseFile().

UT_Error IE_Imp_Psion::applyCharacterAttributes ( const psiconv_character_layout  layout  )  [protected]

Get all character-related attributes and add them to the document.

It does an appendFmt setting the current character attributes. The next appendSpan will use these settings.

References IE_Imp::appendFmt(), getCharacterAttributes(), UT_DEBUGMSG, UT_return_val_if_fail, and UT_UTF8String::utf8_str().

Referenced by readParagraphs().

UT_Error IE_Imp_Psion::applyPageAttributes ( const psiconv_page_layout_section  layout,
bool &  with_header,
bool &  with_footer 
) [protected]

Add the page attributes to the documents

Set all page (section) attributes, and do an appendStrux(PTX_Section,...) These settings are global for the whole document: Psion documents contain only one single section.

References IE_Imp::appendStrux(), IE_Imp::getDoc(), PTX_Section, UT_DEBUGMSG, UT_return_val_if_fail, UT_std_string_sprintf(), UT_UTF8String_sprintf(), and UT_UTF8String::utf8_str().

Referenced by IE_Imp_Psion_TextEd::parseFile(), and IE_Imp_Psion_Word::parseFile().

UT_Error IE_Imp_Psion::applyParagraphAttributes ( const psiconv_paragraph_layout  layout,
const gchar *  stylename 
) [protected]

Get all paragraph-related attributes and add them to the document.

It does an appendStrux setting the current paragraph attributes and opening a new paragraph. Several special cases are handled here too, mostly for bullets.

References PD_Document::appendList(), IE_Imp::appendObject(), IE_Imp::appendSpan(), IE_Imp::appendStrux(), IE_Imp::getDoc(), getParagraphAttributes(), global_listid, list, PTO_Field, PTX_Block, UCS_TAB, UT_DEBUGMSG, UT_IE_IMPORTERROR, UT_return_val_if_fail, and UT_UTF8String::utf8_str().

Referenced by readParagraphs().

UT_Error IE_Imp_Psion::applyStyles ( const psiconv_word_styles_section  style_sec  )  [protected]
UT_Error IE_Imp_Psion::getCharacterAttributes ( const psiconv_character_layout  layout,
UT_UTF8String props 
) [protected]

Get all character-related attributes and append them to props.

If props is not empty, we start with '; ', else we do not.

References UT_UTF8String::appendUCS4(), UT_UTF8String::length(), UT_return_val_if_fail, and UT_UTF8String_sprintf().

Referenced by applyCharacterAttributes(), and applyStyles().

UT_Error IE_Imp_Psion::getParagraphAttributes ( const psiconv_paragraph_layout  layout,
UT_UTF8String props 
) [protected]

Get all paragraph-related attributes and append them to props.

If props is not empty, we start with '; ', else we do not.

References UT_UTF8String::length(), UT_ASSERT, UT_IE_IMPORTERROR, UT_return_val_if_fail, and UT_UTF8String_sprintf().

Referenced by applyParagraphAttributes(), and applyStyles().

UT_Error IE_Imp_Psion::insertImage ( const psiconv_in_line_layout  in_line  )  [protected]

Insert an image in the current document.

The image is found in an in_line Psiconv element.

References IE_Imp::appendObject(), IE_Imp::getDoc(), PD_Document::getUID(), UT_UniqueId::Image, PTO_Image, UT_DEBUGMSG, UT_IE_IMPORTERROR, UT_UTF8String_sprintf(), and UT_UTF8String::utf8_str().

Referenced by insertObject().

UT_Error IE_Imp_Psion::insertObject ( const psiconv_in_line_layout  in_line  )  [protected]

Insert an object.

At the moment, we only handle images. All other objects are ignored.

References insertImage(), and UT_DEBUGMSG.

Referenced by readParagraphs().

virtual UT_Error IE_Imp_Psion::parseFile ( const psiconv_file  psionfile  )  [protected, pure virtual]

Implemented in IE_Imp_Psion_Word, and IE_Imp_Psion_TextEd.

Referenced by _loadFile().

UT_Error IE_Imp_Psion::prepareCharacters ( const psiconv_ucs2 *  input,
int  length,
UT_UCS4String text 
) [protected]

References UT_DEBUGMSG, and UT_UCS4String::utf8_str().

Referenced by readParagraphs().

UT_Error IE_Imp_Psion::processHeaderFooter ( const psiconv_page_layout_section  layout,
bool  with_header,
bool  with_footer 
) [protected]
UT_Error IE_Imp_Psion::readParagraphs ( const psiconv_text_and_layout  psiontext,
const psiconv_word_styles_section  style_sec 
) [protected]

Member Data Documentation

bool IE_Imp_Psion::list [private]

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