StyleReader Class Reference
#include <stylereader.h>

Public Member Functions | |
| StyleReader (QString documentName, gtWriter *wr, bool textOnly, bool prefix, bool combineStyles=true) | |
| ~StyleReader () | |
| bool | updateStyle (gtStyle *style, gtStyle *parent2Style, const QString &key, const QString &value) |
| bool | startElement (const QString &, const QString &, const QString &name, const QXmlAttributes &attrs) |
| bool | endElement (const QString &, const QString &, const QString &name) |
| void | parse (QString fileName) |
| gtStyle * | getDefaultStyle (void) |
| gtStyle * | getStyle (const QString &name) |
| void | setStyle (const QString &name, gtStyle *style) |
| QString | getFont (const QString &key) |
| ListStyle * | getList (const QString &name) |
Static Public Member Functions | |
| static void | startElement (void *user_data, const xmlChar *fullname, const xmlChar **atts) |
| static void | endElement (void *user_data, const xmlChar *name) |
Private Member Functions | |
| double | getSize (QString s, double parentSize=-1) |
| void | styleProperties (const QXmlAttributes &attrs) |
| void | defaultStyle (const QXmlAttributes &attrs) |
| void | styleStyle (const QXmlAttributes &attrs) |
| void | tabStop (const QXmlAttributes &attrs) |
| void | setupFrameStyle () |
Private Attributes | |
| gtWriter * | writer |
| bool | importTextOnly |
| bool | usePrefix |
| bool | packStyles |
| bool | readProperties |
| QString | docname |
| StyleMap | styles |
| StyleMap | listParents |
| StyleMap | attrsStyles |
| CounterMap | pstyleCounts |
| FontMap | fonts |
| ListMap | lists |
| gtStyle * | currentStyle |
| gtStyle * | parentStyle |
| bool | inList |
| QString | currentList |
| ListStyle * | currentListStyle |
| bool | defaultStyleCreated |
Static Private Attributes | |
| static StyleReader * | sreader = NULL |
Detailed Description
Definition at line 120 of file odtim/stylereader.h.
Constructor & Destructor Documentation
| StyleReader::StyleReader | ( | QString | documentName, | |
| gtWriter * | wr, | |||
| bool | textOnly, | |||
| bool | prefix, | |||
| bool | combineStyles = true | |||
| ) |
Definition at line 40 of file odtim/stylereader.cpp.
References currentList, currentListStyle, currentStyle, defaultStyleCreated, docname, importTextOnly, inList, packStyles, parentStyle, readProperties, sreader, usePrefix, and writer.
| StyleReader::~StyleReader | ( | ) |
Member Function Documentation
| double StyleReader::getSize | ( | QString | s, | |
| double | parentSize = -1 | |||
| ) | [private] |
Definition at line 763 of file odtim/stylereader.cpp.
References gtMeasure::d2d(), SC_C, SC_IN, SC_MM, SC_P, and SC_PT.
Referenced by styleProperties(), tabStop(), and updateStyle().
| void StyleReader::styleProperties | ( | const QXmlAttributes & | attrs | ) | [private] |
Definition at line 234 of file odtim/stylereader.cpp.
References BLOCK, BOLD, CENTER, currentStyle, FORCED, getFont(), gtStyle::getFont(), gtParagraphStyle::getIndent(), gtWriter::getPreferredLineSpacing(), getSize(), gtFont::getSize(), inList, ITALIC, OUTLINE, parentStyle, readProperties, RIGHT, gtParagraphStyle::setAlignment(), gtFont::setColor(), gtParagraphStyle::setFirstLineIndent(), gtFont::setHscale(), gtParagraphStyle::setIndent(), gtFont::setKerning(), gtParagraphStyle::setLineSpacing(), gtFont::setName(), gtFont::setSize(), gtFont::setSlant(), gtParagraphStyle::setSpaceAbove(), gtParagraphStyle::setSpaceBelow(), gtFont::setStrokeColor(), gtFont::setWeight(), SMALL_CAPS, STRIKETHROUGH, styles, SUBSCRIPT, SUPERSCRIPT, gtStyle::target(), gtFont::toggleEffect(), UNDERLINE, and writer.
Referenced by startElement().
| void StyleReader::defaultStyle | ( | const QXmlAttributes & | attrs | ) | [private] |
Definition at line 218 of file odtim/stylereader.cpp.
References currentStyle, defaultStyleCreated, gtWriter::getDefaultStyle(), readProperties, gtParagraphStyle::setDefaultStyle(), gtStyle::setName(), and writer.
Referenced by startElement().
| void StyleReader::styleStyle | ( | const QXmlAttributes & | attrs | ) | [private] |
Definition at line 358 of file odtim/stylereader.cpp.
References currentStyle, defaultStyleCreated, gtWriter::getDefaultStyle(), listParents, parentStyle, readProperties, gtParagraphStyle::setDefaultStyle(), gtStyle::setName(), styles, gtStyle::target(), and writer.
Referenced by startElement().
| void StyleReader::tabStop | ( | const QXmlAttributes & | attrs | ) | [private] |
Definition at line 455 of file odtim/stylereader.cpp.
References CENTER_T, currentStyle, getSize(), LEFT_T, RIGHT_T, gtParagraphStyle::setTabValue(), and gtStyle::target().
Referenced by startElement().
| void StyleReader::setupFrameStyle | ( | ) | [private] |
Definition at line 620 of file odtim/stylereader.cpp.
References attrsStyles, importTextOnly, pstyleCounts, gtWriter::setFrameStyle(), and writer.
| bool StyleReader::updateStyle | ( | gtStyle * | style, | |
| gtStyle * | parent2Style, | |||
| const QString & | key, | |||
| const QString & | value | |||
| ) |
Definition at line 650 of file odtim/stylereader.cpp.
References BLOCK, BOLD, CENTER, FORCED, getFont(), gtStyle::getFont(), gtParagraphStyle::getIndent(), gtWriter::getPreferredLineSpacing(), getSize(), gtFont::getSize(), inList, ITALIC, OUTLINE, RIGHT, gtParagraphStyle::setAlignment(), gtFont::setColor(), gtParagraphStyle::setFirstLineIndent(), gtFont::setHscale(), gtParagraphStyle::setIndent(), gtFont::setKerning(), gtParagraphStyle::setLineSpacing(), gtFont::setName(), gtFont::setSize(), gtFont::setSlant(), gtParagraphStyle::setSpaceAbove(), gtParagraphStyle::setSpaceBelow(), gtFont::setStrokeColor(), gtFont::setWeight(), SMALL_CAPS, STRIKETHROUGH, styles, SUBSCRIPT, SUPERSCRIPT, gtStyle::target(), gtFont::toggleEffect(), UNDERLINE, and writer.
Referenced by ContentReader::getStyle().
| void StyleReader::startElement | ( | void * | user_data, | |
| const xmlChar * | fullname, | |||
| const xmlChar ** | atts | |||
| ) | [static] |
Definition at line 870 of file odtim/stylereader.cpp.
References sreader, and startElement().
Referenced by startElement().
| void StyleReader::endElement | ( | void * | user_data, | |
| const xmlChar * | name | |||
| ) | [static] |
Definition at line 883 of file odtim/stylereader.cpp.
References endElement(), and sreader.
Referenced by endElement().
| bool StyleReader::startElement | ( | const QString & | , | |
| const QString & | , | |||
| const QString & | name, | |||
| const QXmlAttributes & | attrs | |||
| ) |
Definition at line 58 of file odtim/stylereader.cpp.
References ListStyle::addLevel(), Bullet, currentList, currentListStyle, currentStyle, defaultStyle(), fonts, inList, listParents, LowerAlpha, LowerRoman, Number, readProperties, gtParagraphStyle::setDropCap(), gtParagraphStyle::setDropCapHeight(), gtStyle::setName(), styleProperties(), styles, styleStyle(), tabStop(), gtStyle::target(), UpperAlpha, and UpperRoman.
| bool StyleReader::endElement | ( | const QString & | , | |
| const QString & | , | |||
| const QString & | name | |||
| ) |
Definition at line 488 of file odtim/stylereader.cpp.
References currentListStyle, currentStyle, gtStyle::getName(), inList, lists, ListStyle::name(), parentStyle, readProperties, and setStyle().
| void StyleReader::parse | ( | QString | fileName | ) |
Definition at line 519 of file odtim/stylereader.cpp.
References sSAXHandler.
Referenced by OdtIm::OdtIm(), and ContentReader::parse().
| gtStyle * StyleReader::getDefaultStyle | ( | void | ) |
Definition at line 530 of file odtim/stylereader.cpp.
References gtWriter::getDefaultStyle(), gtParagraphStyle::isDefaultStyle(), styles, and writer.
Referenced by getStyle().
| gtStyle * StyleReader::getStyle | ( | const QString & | name | ) |
Definition at line 546 of file odtim/stylereader.cpp.
References docname, getDefaultStyle(), gtStyle::getName(), gtStyle::setName(), styles, and usePrefix.
Referenced by ContentReader::endElement(), ContentReader::getStyle(), and ContentReader::startElement().
| void StyleReader::setStyle | ( | const QString & | name, | |
| gtStyle * | style | |||
| ) |
Definition at line 561 of file odtim/stylereader.cpp.
References attrsStyles, docname, gtParagraphStyle::getAlignment(), gtFont::getColor(), gtParagraphStyle::getFirstLineIndent(), gtStyle::getFont(), gtParagraphStyle::getIndent(), gtParagraphStyle::getLineSpacing(), gtStyle::getName(), gtParagraphStyle::getSpaceAbove(), gtParagraphStyle::getSpaceBelow(), gtFont::getStrokeColor(), gtParagraphStyle::hasDropCap(), packStyles, pstyleCounts, gtStyle::setName(), styles, gtStyle::target(), and usePrefix.
Referenced by endElement(), and ContentReader::getStyle().
| QString StyleReader::getFont | ( | const QString & | key | ) |
Definition at line 612 of file odtim/stylereader.cpp.
References fonts.
Referenced by styleProperties(), and updateStyle().
| ListStyle * StyleReader::getList | ( | const QString & | name | ) |
Definition at line 642 of file odtim/stylereader.cpp.
References lists.
Referenced by ContentReader::endElement(), and ContentReader::startElement().
Member Data Documentation
StyleReader * StyleReader::sreader = NULL [static, private] |
Definition at line 123 of file odtim/stylereader.h.
Referenced by endElement(), startElement(), StyleReader(), and ~StyleReader().
gtWriter* StyleReader::writer [private] |
Definition at line 124 of file odtim/stylereader.h.
Referenced by defaultStyle(), getDefaultStyle(), setupFrameStyle(), styleProperties(), StyleReader(), styleStyle(), and updateStyle().
bool StyleReader::importTextOnly [private] |
Definition at line 125 of file odtim/stylereader.h.
Referenced by setupFrameStyle(), and StyleReader().
bool StyleReader::usePrefix [private] |
Definition at line 126 of file odtim/stylereader.h.
Referenced by getStyle(), setStyle(), and StyleReader().
bool StyleReader::packStyles [private] |
bool StyleReader::readProperties [private] |
Definition at line 128 of file odtim/stylereader.h.
Referenced by defaultStyle(), endElement(), startElement(), styleProperties(), StyleReader(), and styleStyle().
QString StyleReader::docname [private] |
Definition at line 129 of file odtim/stylereader.h.
Referenced by getStyle(), setStyle(), and StyleReader().
StyleMap StyleReader::styles [private] |
Definition at line 130 of file odtim/stylereader.h.
Referenced by getDefaultStyle(), getStyle(), setStyle(), startElement(), styleProperties(), styleStyle(), updateStyle(), and ~StyleReader().
StyleMap StyleReader::listParents [private] |
StyleMap StyleReader::attrsStyles [private] |
Definition at line 132 of file odtim/stylereader.h.
Referenced by setStyle(), and setupFrameStyle().
CounterMap StyleReader::pstyleCounts [private] |
Definition at line 133 of file odtim/stylereader.h.
Referenced by setStyle(), and setupFrameStyle().
FontMap StyleReader::fonts [private] |
ListMap StyleReader::lists [private] |
gtStyle* StyleReader::currentStyle [private] |
Definition at line 136 of file odtim/stylereader.h.
Referenced by defaultStyle(), endElement(), startElement(), styleProperties(), StyleReader(), styleStyle(), and tabStop().
gtStyle* StyleReader::parentStyle [private] |
Definition at line 137 of file odtim/stylereader.h.
Referenced by endElement(), styleProperties(), StyleReader(), and styleStyle().
bool StyleReader::inList [private] |
Definition at line 138 of file odtim/stylereader.h.
Referenced by endElement(), startElement(), styleProperties(), StyleReader(), and updateStyle().
QString StyleReader::currentList [private] |
Definition at line 139 of file odtim/stylereader.h.
Referenced by startElement(), and StyleReader().
ListStyle* StyleReader::currentListStyle [private] |
Definition at line 140 of file odtim/stylereader.h.
Referenced by endElement(), startElement(), and StyleReader().
bool StyleReader::defaultStyleCreated [private] |
Definition at line 141 of file odtim/stylereader.h.
Referenced by defaultStyle(), StyleReader(), and styleStyle().
The documentation for this class was generated from the following files:
