filters
- filters
- kword
- kword1.3
- import
21#ifndef KWORD_1_3_PARSER_H
22#define KWORD_1_3_PARSER_H
25#include <tqptrstack.h>
38enum KWord13StackItemType
40 KWord13TypeUnknown = 0,
47 KWord13TypeUnknownFrameset,
52 KWord13TypeLayoutFormatOne,
53 KWord13TypeFormatsPlural,
55 KWord13TypePicturesPlural,
56 KWord13TypePictureFrameset,
68 KWord13StackItemType elementType;
69 KWord13Frameset* m_currentFrameset;
72class KWord13StackItemStack : public TQPtrStack<KWord13StackItem>
75 KWord13StackItemStack( void) { }
76 ~KWord13StackItemStack( void) { }
79class KWord13Parser : public TQXmlDefaultHandler
82 KWord13Parser( KWord13Document* kwordDocument );
83 virtual ~KWord13Parser( void );
86 virtual bool startElement( const TQString&, const TQString&, const TQString& name, const TQXmlAttributes& attributes);
88 virtual bool endElement( const TQString&, const TQString& , const TQString& qName);
90 virtual bool characters ( const TQString & ch );
91 virtual bool warning( const TQXmlParseException& exception);
92 virtual bool error( const TQXmlParseException& exception);
93 virtual bool fatalError( const TQXmlParseException& exception);
96 bool startElementFormatOneProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem);
98 bool startElementLayoutProperty( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem);
100 bool startElementName( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
102 bool startElementFormat( const TQString&, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
104 bool startElementLayout( const TQString&, const TQXmlAttributes&, KWord13StackItem *stackItem );
106 bool startElementParagraph( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
108 bool startElementFrame( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
110 bool startElementFrameset( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
112 bool startElementDocumentAttributes( const TQString& name, const TQXmlAttributes& attributes,
113 KWord13StackItem *stackItem, const KWord13StackItemType& allowedParentType, const KWord13StackItemType& newType );
115 bool startElementKey( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
117 bool startElementAnchor( const TQString& name, const TQXmlAttributes& attributes, KWord13StackItem *stackItem );
123 TQString calculatePictureKey( const TQString& filename,
124 const TQString& year, const TQString& month, const TQString& day,
125 const TQString& hour, const TQString& minute, const TQString& second,
126 const TQString& microsecond ) const;
129 KWord13StackItemStack parserStack;
130 KWord13Document* m_kwordDocument;
131 KWord13Paragraph* m_currentParagraph;
132 KWord13Layout* m_currentLayout;
133 KWord13Format* m_currentFormat;
|