summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStef <stef@ws.local>2004-07-23 22:45:29 +0000
committerStef <stef@ws.local>2004-07-23 22:45:29 +0000
commit497e93e4b335aafd983aa7019abc29788edb0e3e (patch)
treea64e7d5020dd8a28c76fb1de00d32296af486d43 /src
parentf8e6aa066aacad925c3e2f945195bd2ecdeefae9 (diff)
- Initial font support.
Diffstat (limited to 'src')
-rw-r--r--src/tags.h2
-rw-r--r--src/xmlcomposer.cpp43
-rw-r--r--src/xmlcomposer.h13
3 files changed, 57 insertions, 1 deletions
diff --git a/src/tags.h b/src/tags.h
index ef2cd03..ce1a197 100644
--- a/src/tags.h
+++ b/src/tags.h
@@ -48,6 +48,7 @@ static const char* kAtFix = "i_fix";
static const char* kAtCell = "i_cell";
static const char* kElListtable = "i_listtable";
static const char* kElListdef = "i_listdef";
+static const char* kElFontTable = "i_fonttable";
// All the main tags
static const char* kElPara = "para";
@@ -76,6 +77,7 @@ static const char* kElRow = "row";
static const char* kElTable = "table";
static const char* kElFootNote = "footnote";
static const char* kElRef = "ref";
+static const char* kElFont = "font";
// Attributes
static const char* kAtList = "list";
diff --git a/src/xmlcomposer.cpp b/src/xmlcomposer.cpp
index 73d9521..cce87d4 100644
--- a/src/xmlcomposer.cpp
+++ b/src/xmlcomposer.cpp
@@ -682,6 +682,47 @@ ON_GROUPEND(Style)
}
+// Font Table Analyser --------------------------------------------------------------
+
+ON_INITIALIZE(FontTable)
+{
+ AN_ELEMENT(kElFontTable);
+}
+
+ON_GROUPSTART(FontTable)
+{
+ // Each group should be a style
+ AN_ANALYSER(Font);
+
+ // Without any character data
+ AN_DESTINATION(Null);
+}
+
+
+// Font Analyser --------------------------------------------------------------------
+
+ON_INITIALIZE(Font)
+{
+ AN_ELEMENT(kElFont);
+ AN_DESTINATION_ATTR(kAtName);
+}
+
+ON_CONTROLWORD(Font)
+{
+ // The font id
+ if(cw == "f" && flags & kHasParam)
+ AN_ATTRIBUTE(kAtId, param);
+
+ else
+ DEFAULT_CONTROLWORD;
+}
+
+ON_GROUPSTART(Font)
+{
+ AN_ANALYSER(Skip);
+}
+
+
// List Table Analyser --------------------------------------------------------------
ON_INITIALIZE(ListTable)
@@ -918,7 +959,7 @@ ON_CONTROLWORD(Root)
else if(cw == "info")
AN_ANALYSER(Info);
else if(cw == "fonttbl")
- AN_ANALYSER(Skip);
+ AN_ANALYSER(FontTable);
else if(cw == "colortbl")
AN_ANALYSER(Skip);
else if(cw == "footnote")
diff --git a/src/xmlcomposer.h b/src/xmlcomposer.h
index e857ace..e14ecb7 100644
--- a/src/xmlcomposer.h
+++ b/src/xmlcomposer.h
@@ -243,6 +243,19 @@ protected:
bool haveStyle;
END_ANALYSER
+ // Handle the Font Table
+ ANALYSER(FontTable)
+ INITIALIZE
+ GROUPSTART
+ END_ANALYSER
+
+ // Handle a Font in the Table
+ ANALYSER(Font)
+ INITIALIZE
+ CONTROLWORD
+ GROUPSTART
+ END_ANALYSER
+
// Handle the list definitions
ANALYSER(ListTable)
INITIALIZE