[sword-cvs] sword/src/modules/filters thmlrtf.cpp,1.38,1.39
sword@www.crosswire.org
sword@www.crosswire.org
Sun, 21 Dec 2003 23:30:46 -0700
Update of /usr/local/cvsroot/sword/src/modules/filters
In directory www:/tmp/cvs-serv30012/src/modules/filters
Modified Files:
thmlrtf.cpp
Log Message:
Index: thmlrtf.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/src/modules/filters/thmlrtf.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- thmlrtf.cpp 22 Dec 2003 04:00:50 -0000 1.38
+++ thmlrtf.cpp 22 Dec 2003 06:30:44 -0000 1.39
@@ -267,6 +267,41 @@
u->suspendTextPassThru = false;
}
}
+ else if (!strcmp(tag.getName(), "scripRef")) {
+ if (!tag.isEndTag()) {
+ if (!tag.isEmpty()) {
+ u->suspendTextPassThru = true;
+ }
+ }
+ if (tag.isEndTag()) { // </scripRef>
+ if (!u->BiblicalText) {
+ SWBuf refList = u->startTag.getAttribute("passage");
+ if (!refList.length())
+ refList = u->lastTextNode;
+ SWBuf version = tag.getAttribute("version");
+ buf += "<a href=\"\">";
+ buf += refList.c_str();
+// buf += u->lastTextNode.c_str();
+ buf += "</a>";
+ }
+ else {
+ SWBuf footnoteNumber = u->startTag.getAttribute("swordFootnote");
+ VerseKey *vkey;
+ // see if we have a VerseKey * or descendant
+ try {
+ vkey = SWDYNAMIC_CAST(VerseKey, u->key);
+ }
+ catch ( ... ) {}
+ if (vkey) {
+ // leave this special osis type in for crossReference notes types? Might thml use this some day? Doesn't hurt.
+ buf.appendFormatted("{\\super <a href=\"\">*x%i.%s</a>} ", vkey->Verse(), footnoteNumber.c_str());
+ }
+ }
+
+ // let's let text resume to output again
+ u->suspendTextPassThru = false;
+ }
+ }
else if (tag.getName() && !strcmp(tag.getName(), "div")) {
if (tag.isEndTag() && u->SecHead) {