[sword-svn] r1880 - in trunk: include src/modules/filters
chrislit at crosswire.org
chrislit at crosswire.org
Thu Jan 5 04:33:16 MST 2006
Author: chrislit
Date: 2006-01-05 04:33:09 -0700 (Thu, 05 Jan 2006)
New Revision: 1880
Modified:
trunk/include/osisrtf.h
trunk/src/modules/filters/osisrtf.cpp
Log:
added some support for rendering milestones OSIS quotations in red
Modified: trunk/include/osisrtf.h
===================================================================
--- trunk/include/osisrtf.h 2006-01-05 08:32:33 UTC (rev 1879)
+++ trunk/include/osisrtf.h 2006-01-05 11:33:09 UTC (rev 1880)
@@ -36,6 +36,7 @@
bool osisQToTick;
bool BiblicalText;
bool inXRefNote;
+ bool inQuote;
SWBuf w;
SWBuf version;
MyUserData(const SWModule *module, const SWKey *key);
Modified: trunk/src/modules/filters/osisrtf.cpp
===================================================================
--- trunk/src/modules/filters/osisrtf.cpp 2006-01-05 08:32:33 UTC (rev 1879)
+++ trunk/src/modules/filters/osisrtf.cpp 2006-01-05 11:33:09 UTC (rev 1880)
@@ -27,6 +27,7 @@
OSISRTF::MyUserData::MyUserData(const SWModule *module, const SWKey *key) : BasicFilterUserData(module, key) {
inXRefNote = false;
BiblicalText = false;
+ inQuote = false;
if (module) {
version = module->Name();
BiblicalText = (!strcmp(module->Type(), "Biblical Texts"));
@@ -275,6 +276,16 @@
//alternate " and '
if (u->osisQToTick)
buf += (level % 2) ? '\"' : '\'';
+ if (!u->inQuote) {
+ if (who == "Jesus")
+ buf += "\\cf6 ";
+ u->inQuote = 1;
+ }
+ else {
+ if (who == "Jesus")
+ buf += "\\cf0 ";
+ u->inQuote = 0;
+ }
}
}
More information about the sword-cvs
mailing list