summaryrefslogtreecommitdiff
path: root/src/modules/filters/osisstrongs.cpp
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-05-12 08:21:30 -0400
commit7a00574163029c0c2b649878c95d5acbd083564a (patch)
treec13cc5736025834df2874ed87ee8598070025ea6 /src/modules/filters/osisstrongs.cpp
parentb745315323de9f27538edac9453205ca70e6186e (diff)
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'src/modules/filters/osisstrongs.cpp')
-rw-r--r--src/modules/filters/osisstrongs.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/modules/filters/osisstrongs.cpp b/src/modules/filters/osisstrongs.cpp
index 8c06b07..b937883 100644
--- a/src/modules/filters/osisstrongs.cpp
+++ b/src/modules/filters/osisstrongs.cpp
@@ -1,10 +1,11 @@
/******************************************************************************
*
- * osisstrongs - SWFilter descendant to hide or show strongs number
- * in a OSIS module.
+ * osisstrongs.cpp - SWFilter descendant to hide or show Strong's number
+ * in a OSIS module
*
+ * $Id: osisstrongs.cpp 2980 2013-09-14 21:51:47Z scribe $
*
- * Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
+ * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
* CrossWire Bible Society
* P. O. Box 2528
* Tempe, AZ 85280-2528
@@ -28,17 +29,23 @@
#include <versekey.h>
#include <utilxml.h>
+
SWORD_NAMESPACE_START
-const char oName[] = "Strong's Numbers";
-const char oTip[] = "Toggles Strong's Numbers On and Off if they exist";
+namespace {
+
+ static const char oName[] = "Strong's Numbers";
+ static const char oTip[] = "Toggles Strong's Numbers 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;
+ }
+}
-OSISStrongs::OSISStrongs() : SWOptionFilter(oName, oTip, &oValues) {
- setOptionValue("Off");
+OSISStrongs::OSISStrongs() : SWOptionFilter(oName, oTip, oValues()) {
}
@@ -49,7 +56,6 @@ OSISStrongs::~OSISStrongs() {
char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
SWBuf token;
bool intoken = false;
- bool lastspace = false;
int wordNum = 1;
char wordstr[5];
const char *wordStart = 0;
@@ -151,7 +157,7 @@ char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *mod
if ((lClass == "x-Strongs") || (lClass == "strong") || (lClass == "Strong")) {
if (isdigit(attrib[0])) {
if (vkey) {
- gh = vkey->Testament() ? 'H' : 'G';
+ gh = vkey->getTestament() ? 'H' : 'G';
}
}
else {
@@ -280,7 +286,6 @@ char OSISStrongs::processText(SWBuf &text, const SWKey *key, const SWModule *mod
}
else {
text.append(*from);
- lastspace = (*from == ' ');
}
}
return 0;