summaryrefslogtreecommitdiff
path: root/src/xmlcomposer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlcomposer.h')
-rw-r--r--src/xmlcomposer.h38
1 files changed, 25 insertions, 13 deletions
diff --git a/src/xmlcomposer.h b/src/xmlcomposer.h
index fd9fd7a..fc40496 100644
--- a/src/xmlcomposer.h
+++ b/src/xmlcomposer.h
@@ -68,12 +68,24 @@ public:
void replaceElement(const DOM::Element& element);
DOM::Element popElement();
void setAttribute(const string& name, const wstring& value, DOM::Element el = DOM::Element());
+ void setAttribute(const string& name, int value, DOM::Element el = DOM::Element());
// Changing the current parser functions
void setAnalyser(AnalyserPtr analy);
void setDestination(DestinationPtr dest);
DestinationPtr replaceDestination(DestinationPtr dest);
+ // The types of auto counters
+ enum
+ {
+ AUTOCOUNT_FOOTNOTE,
+ AUTOCOUNT_MAX
+ };
+
+ // Functions for auto numbering
+ int getAutoCount(int type);
+ void incrementAutoCount(int type);
+
// Current status functions
RtfFormatting& getTextFormatting();
AnalyserPtr getAnalyser();
@@ -92,9 +104,11 @@ protected:
// Data
protected:
- DOM::DOMImplementation m_impl;
- DOM::Document m_document;
- RtfParserOptions m_options;
+ DOM::DOMImplementation m_impl; // For creating the document
+ DOM::Document m_document; // The current document
+ RtfParserOptions m_options; // Configurable options for parsing
+ int m_autocount[AUTOCOUNT_MAX]; // Auto counters for the document
+
// Sub classes
@@ -149,6 +163,7 @@ protected:
bool processTextFormatting(const string& cw, int flags, int param, RtfFormatting& format);
bool processTextContent(const string& cw, int flags, int param);
bool processTextFormatting(const string& cw, int flags, int param);
+ bool processTextAutoContent(const string& cw, int flags, int param);
DOM::Element getCurrentBlock();
void applyParaFormatting(RtfFormatting* format, DOM::Element& el);
@@ -160,16 +175,6 @@ protected:
GROUPSTART
END_ANALYSER
-#if 0
- ANALYSER(Table)
- INITIALIZE
- CONTROLWORD
- DATA_PORTION
- int stack;
- LevelPtr level;
- END_ANALYSER
-#endif
-
ANALYSER(Upr)
Upr(AnalyserPtr prv);
GROUPSTART
@@ -226,6 +231,13 @@ protected:
CONTROLWORD
END_ANALYSER
+ ANALYSER(FootNote)
+ INITIALIZE
+ CONTROLWORD
+ GROUPSTART
+ GROUPEND
+ DONE
+ END_ANALYSER
};
#endif // __RTFPARSER_H__