Functions | Variables

ie_imp_Psion.cpp File Reference

#include "ie_imp_Psion.h"
#include "ut_types.h"
#include "ut_assert.h"
#include "ut_debugmsg.h"
#include "ut_std_string.h"
#include "ut_string.h"
#include "ut_units.h"
#include "ut_string_class.h"
#include "pd_Document.h"
#include "xap_EncodingManager.h"
#include "png.h"
#include <psiconv/parse.h>

Functions

static gchar * prepare_style_name (const psiconv_string_t input)
static void write_png_data (png_structp png_ptr, png_bytep data, png_size_t length)
static void write_png_flush (png_structp)

Variables

static const gchar * global_listid = "1000"
static IE_SuffixConfidence IE_Imp_Psion_Word_Sniffer__SuffixConfidence []
static IE_SuffixConfidence IE_Imp_Psion_TextEd_Sniffer__SuffixConfidence []

Function Documentation

static gchar* prepare_style_name ( const psiconv_string_t  input  )  [static]

Translate the stylename in UCS2 to a sanitized UTF8 string.

The input is a psiconv UCS2 string; the output an Abiword UTF8 string. Special characters are filtered away.

Returns:
NULL if input is NULL or something went horribly wrong, the UTF8 string otherwise.

References gchar, and UT_convert().

Referenced by IE_Imp_Psion::applyStyles(), and IE_Imp_Psion::readParagraphs().

static void write_png_data ( png_structp  png_ptr,
png_bytep  data,
png_size_t  length 
) [static]

Write data to the PNG stream

This is a callback function for the PNG library. It is called when some data needs to writting to the PNG file. We have implemented it as writing to a ByteBuf.

References UT_ByteBuf::append(), and UT_DEBUGMSG.

static void write_png_flush ( png_structp   )  [static]

Flush the PNG stream

This is a callback function for the PNG library. It is called when writing of the PNG file is finished. Nothing needs to be done.


Variable Documentation

const gchar* global_listid = "1000" [static]
Initial value:
 {
    { "psitext",    UT_CONFIDENCE_PERFECT   },
    { "",   UT_CONFIDENCE_ZILCH         }
}

Look at the extension to guess whether this is a Psion TextEd file. Actually, the Psion itself does not use extensions (much), so I just made up my own convention (.psitext) here. It's better than nothing.

Initial value:
 {
    { "psiword",    UT_CONFIDENCE_PERFECT   },
    { "",       UT_CONFIDENCE_ZILCH         }
}

Look at the extension to guess whether this is a Psion Word file.

Actually, the Psion itself does not use extensions (much), so I just made up my own convention (.psiword) here. It's better than nothing.