summaryrefslogtreecommitdiff
path: root/src/modules/filters/teirtf.cpp
diff options
context:
space:
mode:
authorDaniel Glassey <wdg@debian.org>2015-09-07 11:14:57 +0100
committerDaniel Glassey <wdg@debian.org>2015-09-07 11:14:57 +0100
commit7b6c8b08e9d29332dcd0a1029e7421334bfb6f61 (patch)
treedc263ee8b6c923716a8e0fed64756b7af1238dc7 /src/modules/filters/teirtf.cpp
parent7a00574163029c0c2b649878c95d5acbd083564a (diff)
Imported Upstream version 1.7.3+dfsg
Diffstat (limited to 'src/modules/filters/teirtf.cpp')
-rw-r--r--src/modules/filters/teirtf.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/modules/filters/teirtf.cpp b/src/modules/filters/teirtf.cpp
index 979e4a6..1213221 100644
--- a/src/modules/filters/teirtf.cpp
+++ b/src/modules/filters/teirtf.cpp
@@ -2,7 +2,7 @@
*
* teirtf.cpp - TEI to RTF filter
*
- * $Id: teirtf.cpp 2833 2013-06-29 06:40:28Z chrislit $
+ * $Id: teirtf.cpp 3160 2014-04-17 04:02:17Z greg.hellings $
*
* Copyright 2006-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
@@ -76,13 +76,14 @@ bool TEIRTF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *use
else if (!strcmp(tag.getName(), "hi") || !strcmp(tag.getName(), "emph")) {
SWBuf rend = tag.getAttribute("rend");
if ((!tag.isEndTag()) && (!tag.isEmpty())) {
- if (rend == "ital" || rend == "italic")
+ if (rend == "italic" || rend == "ital")
buf += "{\\i1 ";
else if (rend == "bold")
buf += "{\\b1 ";
- else if (rend == "sup")
+ else if (rend == "super" || rend == "sup")
buf += "{\\super ";
-
+ else if (rend == "sub")
+ buf += "{\\sub ";
}
else if (tag.isEndTag()) {
buf += "}";
@@ -112,6 +113,16 @@ bool TEIRTF::handleToken(SWBuf &buf, const char *token, BasicFilterUserData *use
}
}
+ // <orth>
+ else if (!strcmp(tag.getName(), "orth")) {
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ buf += "{\\b1 ";
+ }
+ else if (tag.isEndTag()) {
+ buf += "}";
+ }
+ }
+
// <div>
else if (!strcmp(tag.getName(), "div")) {