[sword-cvs] sword/src/modules/filters osisrtf.cpp,1.25,1.26 thmlscripref.cpp,1.16,1.17
sword@www.crosswire.org
sword@www.crosswire.org
Wed, 24 Dec 2003 13:51:38 -0700
Update of /cvs/core/sword/src/modules/filters
In directory www:/tmp/cvs-serv19235/src/modules/filters
Modified Files:
osisrtf.cpp thmlscripref.cpp
Log Message:
Index: osisrtf.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/osisrtf.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- osisrtf.cpp 17 Aug 2003 10:00:54 -0000 1.25
+++ osisrtf.cpp 24 Dec 2003 20:51:36 -0000 1.26
@@ -24,6 +24,12 @@
OSISRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
+ inXRefNote = false;
+ BiblicalText = false;
+ if (module) {
+ version = module->Name();
+ BiblicalText = (!strcmp(module->Type(), "Biblical Texts"));
+ }
osisQToTick = ((!module->getConfigEntry("OSISqToTick")) || (strcmp(module->getConfigEntry("OSISqToTick"), "false")));
}
@@ -147,7 +153,9 @@
}
catch ( ... ) { }
if (vkey) {
- buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ((tag.getAttribute("type") && ((!strcmp(tag.getAttribute("type"), "crossReference")) || (!strcmp(tag.getAttribute("type"), "x-cross-ref")))) ? 'x':'n'), vkey->Verse(), footnoteNumber.c_str());
+ char ch = ((!strcmp(type.c_str(), "crossReference")) || (!strcmp(type.c_str(), "x-cross-ref"))) ? 'x':'n';
+ buf.appendFormatted("{\\super <a href=\"\">*%c%i.%s</a>} ", ch, vkey->Verse(), footnoteNumber.c_str());
+ u->inXRefNote = (ch == 'x');
}
}
u->suspendTextPassThru = true;
@@ -155,6 +163,7 @@
}
if (tag.isEndTag()) {
u->suspendTextPassThru = false;
+ u->inXRefNote = false;
}
}
@@ -175,11 +184,13 @@
// <reference> tag
else if (!strcmp(tag.getName(), "reference")) {
- if ((!tag.isEndTag()) && (!tag.isEmpty())) {
- buf += "{<a href=\"\">";
- }
- else if (tag.isEndTag()) {
- buf += "</a>}";
+ if (!u->inXRefNote) { // only show these if we're not in an xref note
+ if ((!tag.isEndTag()) && (!tag.isEmpty())) {
+ buf += "{<a href=\"\">";
+ }
+ else if (tag.isEndTag()) {
+ buf += "</a>}";
+ }
}
}
Index: thmlscripref.cpp
===================================================================
RCS file: /cvs/core/sword/src/modules/filters/thmlscripref.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- thmlscripref.cpp 21 Dec 2003 23:33:10 -0000 1.16
+++ thmlscripref.cpp 24 Dec 2003 20:51:36 -0000 1.17
@@ -24,7 +24,7 @@
const StringList oValues(&choices[0], &choices[2]);
ThMLScripref::ThMLScripref() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+ setOptionValue("On");
}