diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-05-12 08:21:30 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-05-12 08:21:30 -0400 |
commit | 7a00574163029c0c2b649878c95d5acbd083564a (patch) | |
tree | c13cc5736025834df2874ed87ee8598070025ea6 /src/modules/filters/osismorph.cpp | |
parent | b745315323de9f27538edac9453205ca70e6186e (diff) |
Imported Upstream version 1.7.2+dfsg
Diffstat (limited to 'src/modules/filters/osismorph.cpp')
-rw-r--r-- | src/modules/filters/osismorph.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/modules/filters/osismorph.cpp b/src/modules/filters/osismorph.cpp index 7ceec79..71de8e5 100644 --- a/src/modules/filters/osismorph.cpp +++ b/src/modules/filters/osismorph.cpp @@ -1,10 +1,11 @@ /****************************************************************************** * - * osismorph - SWFilter descendant to hide or show morph tags - * in a OSIS module. + * osismorph.cpp - SWFilter descendant to hide or show morph tags + * in a OSIS module * + * $Id: osismorph.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 @@ -25,14 +26,20 @@ SWORD_NAMESPACE_START -const char oName[] = "Morphological Tags"; -const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; +namespace { -const SWBuf choices[3] = {"Off", "On", ""}; -const StringList oValues(&choices[0], &choices[2]); + static const char oName[] = "Morphological Tags"; + static const char oTip[] = "Toggles Morphological Tags On and Off if they exist"; -OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, &oValues) { - setOptionValue("Off"); + static const StringList *oValues() { + static const SWBuf choices[3] = {"Off", "On", ""}; + static const StringList oVals(&choices[0], &choices[2]); + return &oVals; + } + +} + +OSISMorph::OSISMorph() : SWOptionFilter(oName, oTip, oValues()) { } @@ -45,7 +52,6 @@ char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *modul char token[2048]; // cheese. Fix. int tokpos = 0; bool intoken = false; - bool lastspace = false; SWBuf orig = text; const char *from = orig.c_str(); @@ -90,7 +96,6 @@ char OSISMorph::processText(SWBuf &text, const SWKey *key, const SWModule *modul } else { text.append(*from); - lastspace = (*from == ' '); } } } |