#include "ie_exp_Psion.h"
#include "ut_string.h"
#include "ut_stringbuf.h"
#include "ut_bytebuf.h"
#include "ut_units.h"
#include "ut_debugmsg.h"
#include "ut_wctomb.h"
#include "ut_assert.h"
#include "pt_Types.h"
#include "pd_Document.h"
#include "pp_AttrProp.h"
#include "px_ChangeRecord.h"
#include "px_CR_Object.h"
#include "px_CR_Span.h"
#include "px_CR_Strux.h"
#include "pd_Style.h"
#include "fd_Field.h"
#include "png.h"
#include <psiconv/generate.h>
Classes | |
struct | _bb |
Functions | |
static psiconv_ucs2 * | utf8_to_ucs2 (const gchar *input) |
static int | hexDigitToDec (char in) |
static void | parseColor (const char *input, psiconv_color color) |
static void | parseTab (char *input, psiconv_tab tab) |
static bool | parseTabs (const char *input, psiconv_tab_list tabs) |
static bool | parseFont (const char *fontname, psiconv_font font) |
static bool | updateCharacterLayout (const PP_AttrProp *pAP, psiconv_character_layout layout) |
static bool | updateParagraphLayout (const PP_AttrProp *pAP, psiconv_paragraph_layout layout) |
static void | read_png_data (png_structp png_ptr, png_bytep data, png_size_t length) |
static int hexDigitToDec | ( | char | in | ) | [static] |
Translate a hex digit character token to its decimal value
Referenced by parseColor().
static void parseColor | ( | const char * | input, | |
psiconv_color | color | |||
) | [static] |
Parse a color value
The color is in the input parameter, in AbiWord format. Example formats: 000000 ffffff ab6e10
References hexDigitToDec().
Referenced by updateCharacterLayout().
static bool parseFont | ( | const char * | fontname, | |
psiconv_font | font | |||
) | [static] |
static void parseTab | ( | char * | input, | |
psiconv_tab | tab | |||
) | [static] |
Parse a single tab (clobbering the input!)
The tab is in the input parameter, in AbiWord format Example formats: 7.315cm/C 6.4322in/R Note that the input string is changed for efficiency reasons. As this function is only meant to be called from parseTabs, that is no problem.
References DIM_CM, and UT_convertToDimension().
Referenced by parseTabs().
static bool parseTabs | ( | const char * | input, | |
psiconv_tab_list | tabs | |||
) | [static] |
Parse all tabs
The tabs are in the input parameter, in AbiWord format. Example format: 7.315cm/C,14.641cm/R
References parseTab().
Referenced by updateParagraphLayout().
static void read_png_data | ( | png_structp | png_ptr, | |
png_bytep | data, | |||
png_size_t | length | |||
) | [static] |
Auxiliary function for use with libpng: read data from a ByteBuf.
This function reads data for use with libpng. The data was put into a ByteBuf. Libpng does not tell us what data we have already read, so we must remember that ourselves. That is why we use the ultra-ugly _bb.
References _bb::iCurPos, _bb::pBB, and UT_DEBUGMSG.
Referenced by PL_Psion_Listener::_insertImage().
static bool updateCharacterLayout | ( | const PP_AttrProp * | pAP, | |
psiconv_character_layout | layout | |||
) | [static] |
Update all character layout with the properties pointed to.
References DIM_PT, gchar, PP_AttrProp::getProperty(), parseColor(), parseFont(), and UT_convertToDimension().
Referenced by PL_Psion_Listener::_addInLine(), PL_Psion_Listener::_openParagraph(), and PL_Psion_Listener::_setStyleLayout().
static bool updateParagraphLayout | ( | const PP_AttrProp * | pAP, | |
psiconv_paragraph_layout | layout | |||
) | [static] |
Update all paragraph layout with the properties pointed to.
References DIM_CM, DIM_PT, gchar, PP_AttrProp::getProperty(), parseTabs(), and UT_convertToDimension().
Referenced by PL_Psion_Listener::_openParagraph(), and PL_Psion_Listener::_setStyleLayout().
static psiconv_ucs2* utf8_to_ucs2 | ( | const gchar * | input | ) | [static] |
Convert a AbiWord UTF8 string to a Psiconv UCS2 string.
Returns NULL on error.
References tls_tunnel::read(), and UT_convert().
Referenced by PL_Psion_Listener::_insertImage(), PL_Psion_Listener::_openParagraph(), PL_Psion_Listener::_processStyles(), and parseFont().