Defines | Functions | Variables

ie_exp_HTML_util.cpp File Reference

#include "ie_exp_HTML_util.h"
#include "ut_std_string.h"
#include "MathSVGScript.h"


#define SEPARATOR   "/"


UT_UTF8String s_string_to_url (const UT_String &str)
UT_UTF8String s_string_to_url (const UT_UTF8String &str)
bool is_CSS (const char *prop_name, const char **prop_default)
void s_removeWhiteSpace (const char *text, std::string &utf8str, bool bLowerCase)
UT_UTF8String ConvertToClean (const UT_UTF8String &str)
bool getPropertySize (const PP_AttrProp *pAP, const gchar *szWidthProp, const gchar *szHeightProp, const gchar **szWidth, double &widthPercentage, const gchar **szHeight, double dPageWidthInches, double dSecLeftMarginInches, double dSecRightMarginInches, double dCellWidthInches, ie_Table &tableHelper)
UT_UTF8String getStyleSizeString (const gchar *szWidth, double widthPercentage, UT_Dimension widthDim, const gchar *szHeight, UT_Dimension heightDim, bool bUseScale)


const char s_DTD_XHTML_AWML [] = "!DOCTYPE html PUBLIC \"-//ABISOURCE//DTD XHTML plus AWML 2.2//EN\" \"\""
const char s_DTD_XHTML [] = "!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"\""
const char s_DTD_HTML4 [] = "!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"\""
const char s_Delimiter [] = "======================================================="
const char * s_Header [2]
const char s_HeaderCompact [] = "Created by Abiword,"
bool m_bSecondPass = false
bool m_bInAFENote = false
bool m_bInAnnotation = false
UT_UTF8String sStyleSheet = "}"
const char * s_prop_list []
const UT_uint32 s_PropListLen = G_N_ELEMENTS(s_prop_list) - 2

Define Documentation

#define SEPARATOR   "/"

Function Documentation

UT_UTF8String ConvertToClean ( const UT_UTF8String str  ) 
bool getPropertySize ( const PP_AttrProp pAP,
const gchar *  szWidthProp,
const gchar *  szHeightProp,
const gchar **  szWidth,
double &  widthPercentage,
const gchar **  szHeight,
double  dPageWidthInches,
double  dSecLeftMarginInches,
double  dSecRightMarginInches,
double  dCellWidthInches,
ie_Table tableHelper 
UT_UTF8String getStyleSizeString ( const gchar *  szWidth,
double  widthPercentage,
UT_Dimension  widthDim,
const gchar *  szHeight,
UT_Dimension  heightDim,
bool  bUseScale 
bool is_CSS ( const char *  prop_name,
const char **  prop_default 

This function returns true if the given property is a valid CSS property. It is based on the list in pp_Property.cpp, and, as such, is quite brittle.

prop_default may be zero on return, indicating that the default is not fixed

References s_prop_list, and s_PropListLen.

Referenced by IE_Exp_HTML_Listener::_makeStylesheet(), and IE_Exp_HTML_StyleTree::IE_Exp_HTML_StyleTree().

void s_removeWhiteSpace ( const char *  text,
std::string &  utf8str,
bool  bLowerCase 

This function copies a string to a new string, removing all the white space in the process.

References UT_tolower().

Referenced by IE_Exp_HTML_StyleTree::IE_Exp_HTML_StyleTree().

UT_UTF8String s_string_to_url ( const UT_String str  ) 

References UT_String::c_str().

Referenced by s_string_to_url().

UT_UTF8String s_string_to_url ( const UT_UTF8String str  ) 

Variable Documentation

bool m_bInAFENote = false
bool m_bInAnnotation = false
bool m_bSecondPass = false
const char s_Delimiter[] = "======================================================="
const char s_DTD_HTML4[] = "!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"\""
const char s_DTD_XHTML[] = "!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"\""
const char s_DTD_XHTML_AWML[] = "!DOCTYPE html PUBLIC \"-//ABISOURCE//DTD XHTML plus AWML 2.2//EN\" \"\""
const char* s_Header[2]
Initial value:
"Created by AbiWord, a free, Open Source wordprocessor. ",
"For more information visit   "
const char s_HeaderCompact[] = "Created by Abiword,"
const char* s_prop_list[]
Initial value:
    "background-color", "transparent",
    "color",            "",
    "font-family",      "",
    "font-size",        "medium",
    "font-style",       "normal",
    "font-variant",     "normal",
    "font-weight",      "normal",
    "height",           "auto",
    "margin-bottom",    "0pt",
    "margin-left",      "0pt",
    "margin-right",     "0pt",
    "margin-top",       "0pt",
    "orphans",          "2",
    "text-align",       "",
    "text-decoration",  "none",
    "text-transform",   "none",
    "text-indent",      "0in",
    "vertical-align",   "baseline",
    "widows",           "2",
    "width",            "auto",
    0, 0

Referenced by IE_Exp_HTML_StyleTree::IE_Exp_HTML_StyleTree(), and is_CSS().

const UT_uint32 s_PropListLen = G_N_ELEMENTS(s_prop_list) - 2

Referenced by is_CSS().