1
/***************************************************************************
2
* plainfootnotes.cpp - description
4
* begin : Wed Oct 13 1999
5
* copyright : (C) 1999 by The team of BibleTime
6
* email : info@bibletime.de
8
* Copyright 2009 CrossWire Bible Society (http://www.crosswire.org)
9
* CrossWire Bible Society
11
* Tempe, AZ 85280-2528
13
* This program is free software; you can redistribute it and/or modify it
14
* under the terms of the GNU General Public License as published by the
15
* Free Software Foundation version 2.
17
* This program is distributed in the hope that it will be useful, but
18
* WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
* General Public License for more details.
24
#include <plainfootnotes.h>
31
const char oName[] = "Footnotes";
32
const char oTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist";
34
const SWBuf choices[3] = {"Off", "On", ""};
35
const StringList oValues(&choices[0], &choices[2]);
37
PLAINFootnotes::PLAINFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
38
setOptionValue("Off");
41
PLAINFootnotes::~PLAINFootnotes(){
45
char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
46
if (!option) { // if we don't want footnotes
50
//bool intoken = false;
51
//bool lastspace = false;
56
const char *from = orig.c_str();
57
for (text = ""; *from; from++) {
58
if (*from == '{') // Footnote start
63
else if (*from == '}') // Footnote end
72
// token[tokpos+2] = 0;
77
//lastspace = (*from == ' ');