summaryrefslogtreecommitdiff
path: root/src/modules/filters/gbffootnotes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/filters/gbffootnotes.cpp')
-rw-r--r--src/modules/filters/gbffootnotes.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/modules/filters/gbffootnotes.cpp b/src/modules/filters/gbffootnotes.cpp
index a5384cb..7b867f1 100644
--- a/src/modules/filters/gbffootnotes.cpp
+++ b/src/modules/filters/gbffootnotes.cpp
@@ -1,9 +1,11 @@
/******************************************************************************
*
- * gbffootnotes - SWFilter descendant to hide or show footnotes
- * in a GBF module.
+ * gbffootnotes.cpp - SWFilter descendant to hide or show footnotes
+ * in a GBF module
*
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * $Id: gbffootnotes.cpp 2980 2013-09-14 21:51:47Z scribe $
+ *
+ * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -28,17 +30,23 @@
#include <versekey.h>
#include <utilxml.h>
+
SWORD_NAMESPACE_START
-const char oName[] = "Footnotes";
-const char oTip[] = "Toggles Footnotes On and Off if they exist";
+namespace {
+
+ static const char oName[] = "Footnotes";
+ static const char oTip[] = "Toggles Footnotes On and Off if they exist";
-const SWBuf choices[3] = {"Off", "On", ""};
-const StringList oValues(&choices[0], &choices[2]);
+ static const StringList *oValues() {
+ static const SWBuf choices[3] = {"Off", "On", ""};
+ static const StringList oVals(&choices[0], &choices[2]);
+ return &oVals;
+ }
+}
-GBFFootnotes::GBFFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+GBFFootnotes::GBFFootnotes() : SWOptionFilter(oName, oTip, oValues()) {
}
@@ -86,7 +94,7 @@ char GBFFootnotes::processText (SWBuf &text, const SWKey *key, const SWModule *m
if (module->isProcessEntryAttributes()) {
//tag = token;
- if((tagText.length() == 1) || !strcmp(module->Name(), "IGNT")) {
+ if((tagText.length() == 1) || !strcmp(module->getName(), "IGNT")) {
if (option) { // for ASV marks text in verse then put explanation at end of verse
text.append(" <FS>[");
text.append(tagText);