filters
ImportFormatting.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _IMPORT_FORMATTING_H
00021 #define _IMPORT_FORMATTING_H
00022
00023 #include <qptrstack.h>
00024 #include <qstring.h>
00025 #include <qcolor.h>
00026 #include <qxml.h>
00027 #include <qdom.h>
00028
00029 #include "ImportHelpers.h"
00030
00031
00032
00033
00034
00035
00036
00052 enum StackItemElementType{
00053 ElementTypeUnknown = 0,
00054 ElementTypeBottom,
00055 ElementTypeIgnore,
00056 ElementTypeEmpty,
00057 ElementTypeSection,
00058 ElementTypeParagraph,
00059 ElementTypeContent,
00060 ElementTypeRealData,
00061 ElementTypeAnchor,
00062 ElementTypeAnchorContent,
00063 ElementTypeIgnoreWord,
00064 ElementTypeRealMetaData,
00065 ElementTypeFoot,
00066 ElementTypeTable,
00067 ElementTypeCell
00068 };
00069
00070
00071 class StackItem
00072 {
00073 public:
00074 StackItem();
00075 ~StackItem();
00076 public:
00077 QString itemName;
00078 StackItemElementType elementType;
00079 QDomElement m_frameset;
00080 QDomElement stackElementParagraph;
00081 QDomElement stackElementText;
00082 QDomElement stackElementFormatsPlural;
00083 QString fontName;
00084 int fontSize;
00085 int pos;
00086 bool italic;
00087 bool bold;
00088 bool underline;
00089 bool strikeout;
00090 QColor fgColor;
00091 QColor bgColor;
00092 int textPosition;
00093 QString strTemp1;
00098 QString strTemp2;
00108 QMemArray<double> m_doubleArray;
00109 };
00110
00111 class StackItemStack : public QPtrStack<StackItem>
00112 {
00113 public:
00114 StackItemStack(void) { }
00115 virtual ~StackItemStack(void) { }
00116 };
00117
00118 class StyleData;
00119
00120 void PopulateProperties(StackItem* stackItem, const QString& strStyleProps,
00121 const QXmlAttributes& attributes, AbiPropsMap& abiPropsMap,
00122 const bool allowInit);
00123 void AddFormat(QDomElement& formatElementOut, StackItem* stackItem,
00124 QDomDocument& mainDocument);
00125 void AddLayout(const QString& strStyleName, QDomElement& layoutElement,
00126 StackItem* stackItem, QDomDocument& mainDocument,
00127 const AbiPropsMap& abiPropsMap, const int level, const bool isStyle);
00128 void AddStyle(QDomElement& styleElement, const QString& strStyleName,
00129 const StyleData& styleData, QDomDocument& mainDocument);
00130
00131
00132 #endif // _IMPORT_FORMATTING_H
|