[sword-svn] r2842 - in trunk: cmake include lib/vcppmake/vc8 src/modules/filters

chrislit at crosswire.org chrislit at crosswire.org
Sat Jun 29 04:12:59 MST 2013


Author: chrislit
Date: 2013-06-29 04:12:59 -0700 (Sat, 29 Jun 2013)
New Revision: 2842

Removed:
   trunk/include/plainfootnotes.h
   trunk/include/plainhtml.h
   trunk/src/modules/filters/plainfootnotes.cpp
   trunk/src/modules/filters/plainhtml.cpp
Modified:
   trunk/cmake/sources.cmake
   trunk/lib/vcppmake/vc8/libsword.vcxproj
   trunk/src/modules/filters/Makefile.am
Log:
removed PLAINHTML and PLAINFootnotes filters, which assumed plaintext modules had a very specific format that they do not in fact have

Modified: trunk/cmake/sources.cmake
===================================================================
--- trunk/cmake/sources.cmake	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/cmake/sources.cmake	2013-06-29 11:12:59 UTC (rev 2842)
@@ -135,8 +135,6 @@
 	src/modules/filters/cipherfil.cpp
 
 	src/modules/filters/rtfhtml.cpp
-	src/modules/filters/plainfootnotes.cpp
-	src/modules/filters/plainhtml.cpp
 	src/modules/filters/greeklexattribs.cpp
 	src/modules/filters/unicodertf.cpp
 	src/modules/filters/papyriplain.cpp

Deleted: trunk/include/plainfootnotes.h
===================================================================
--- trunk/include/plainfootnotes.h	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/include/plainfootnotes.h	2013-06-29 11:12:59 UTC (rev 2842)
@@ -1,43 +0,0 @@
-/***************************************************************************
- *
- *  plainfootnotes.h -	Implementation of PLAINFootnotes
- *
- * $Id$
- *
- * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef PLAINFOOTNOTES_H
-#define PLAINFOOTNOTES_H
-
-#include <swoptfilter.h>
-
-SWORD_NAMESPACE_START
-
-class SWKey;
-
-/**Shows or hides footnotes in plain text.
- *@author The team of BibleTime
- */
-class SWDLLEXPORT PLAINFootnotes : public SWOptionFilter {
-public:
-	PLAINFootnotes();
-	virtual ~PLAINFootnotes();
-	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
-};
-
-SWORD_NAMESPACE_END
-#endif

Deleted: trunk/include/plainhtml.h
===================================================================
--- trunk/include/plainhtml.h	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/include/plainhtml.h	2013-06-29 11:12:59 UTC (rev 2842)
@@ -1,40 +0,0 @@
-/***************************************************************************
- *
- *  plainhtml.h -	Implementation of PLAINHTML
- *
- * $Id$
- *
- * Copyright 1999-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#ifndef PLAINHTML_H
-#define PLAINHTML_H
-
-#include <swfilter.h>
-
-SWORD_NAMESPACE_START
-
-/** this filter converts plain text to HTML text
- * @author Torsten Uhlmann, begin : Tue Jun 15 15:34:26 CEST 1999
- */
-class SWDLLEXPORT PLAINHTML : public SWFilter {
-public:
-	PLAINHTML();
-	virtual char processText(SWBuf &text, const SWKey *key = 0, const SWModule *module = 0);
-};
-
-SWORD_NAMESPACE_END
-#endif

Modified: trunk/lib/vcppmake/vc8/libsword.vcxproj
===================================================================
--- trunk/lib/vcppmake/vc8/libsword.vcxproj	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/lib/vcppmake/vc8/libsword.vcxproj	2013-06-29 11:12:59 UTC (rev 2842)
@@ -303,8 +303,6 @@
     <ClCompile Include="..\..\..\src\modules\filters\osiswordjs.cpp" />
     <ClCompile Include="..\..\..\src\modules\filters\osisxhtml.cpp" />
     <ClCompile Include="..\..\..\src\modules\filters\papyriplain.cpp" />
-    <ClCompile Include="..\..\..\src\modules\filters\plainfootnotes.cpp" />
-    <ClCompile Include="..\..\..\src\modules\filters\plainhtml.cpp" />
     <ClCompile Include="..\..\..\src\modules\comments\rawcom\rawcom.cpp" />
     <ClCompile Include="..\..\..\src\modules\comments\rawcom4\rawcom4.cpp" />
     <ClCompile Include="..\..\..\src\modules\comments\rawfiles\rawfiles.cpp" />
@@ -485,8 +483,6 @@
     <ClInclude Include="..\..\..\include\osisxhtml.h" />
     <ClInclude Include="..\..\..\include\osisxlit.h" />
     <ClInclude Include="..\..\..\include\papyriplain.h" />
-    <ClInclude Include="..\..\..\include\plainfootnotes.h" />
-    <ClInclude Include="..\..\..\include\plainhtml.h" />
     <ClInclude Include="..\..\..\include\rawcom.h" />
     <ClInclude Include="..\..\..\include\rawcom4.h" />
     <ClInclude Include="..\..\..\include\rawfiles.h" />

Modified: trunk/src/modules/filters/Makefile.am
===================================================================
--- trunk/src/modules/filters/Makefile.am	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/src/modules/filters/Makefile.am	2013-06-29 11:12:59 UTC (rev 2842)
@@ -76,8 +76,6 @@
 libsword_la_SOURCES += $(filtersdir)/cipherfil.cpp
 
 PLFIL = $(filtersdir)/rtfhtml.cpp
-PLFIL += $(filtersdir)/plainfootnotes.cpp
-PLFIL += $(filtersdir)/plainhtml.cpp
 PLFIL += $(filtersdir)/greeklexattribs.cpp
 PLFIL += $(filtersdir)/unicodertf.cpp
 PLFIL += $(filtersdir)/papyriplain.cpp

Deleted: trunk/src/modules/filters/plainfootnotes.cpp
===================================================================
--- trunk/src/modules/filters/plainfootnotes.cpp	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/src/modules/filters/plainfootnotes.cpp	2013-06-29 11:12:59 UTC (rev 2842)
@@ -1,86 +0,0 @@
-/***************************************************************************
- *
- *  plainfootnotes.cpp -	filter to toggle footnotes in plaintext
- *				modules
- *
- * $Id$
- *
- * Copyright 1999 The team of BibleTime (info at bibletime.de)
- * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#include <plainfootnotes.h>
-#include <swkey.h>
-
-#include <stdlib.h>
-
-SWORD_NAMESPACE_START
-
-const char oName[] = "Footnotes";
-const char oTip[] = "Toggles Footnotes On and Off In Bible Texts If They Exist";
-
-const SWBuf choices[3] = {"Off", "On", ""};
-const StringList oValues(&choices[0], &choices[2]);
-
-PLAINFootnotes::PLAINFootnotes() : SWOptionFilter(oName, oTip, &oValues) {
-	setOptionValue("Off");
-}
-
-PLAINFootnotes::~PLAINFootnotes(){
-}
-
-
-char PLAINFootnotes::processText(SWBuf &text, const SWKey *key, const SWModule *module) {
-	if (!option) {	// if we don't want footnotes
-		//char token[2048];
-		//SWBuf token;
-		//int tokpos = 0;
-		//bool intoken 	= false;
-		//bool lastspace = false;
-
-		bool hide = false;
-
-		SWBuf orig = text;
-		const char *from = orig.c_str();
-		for (text = ""; *from; from++) {
-		 	if (*from == '{') // Footnote start
-			{
-				hide = true;
-				continue;
-			}
-			else if (*from == '}') // Footnote end
-			{
-				hide = false;
-				continue;
-			}
-			
-			//if (intoken) {
-				//if (tokpos < 2045)
-			//		token += *from;
-				//	token[tokpos+2] = 0;
-			//}
-			//else	{
-				if (!hide) {
-					text = *from;
-					//lastspace = (*from == ' ');
-				}
-			//}
-		}
-	}
-	return 0;
-}
-
-SWORD_NAMESPACE_END

Deleted: trunk/src/modules/filters/plainhtml.cpp
===================================================================
--- trunk/src/modules/filters/plainhtml.cpp	2013-06-29 10:58:08 UTC (rev 2841)
+++ trunk/src/modules/filters/plainhtml.cpp	2013-06-29 11:12:59 UTC (rev 2842)
@@ -1,89 +0,0 @@
-/***************************************************************************
- *
- *  plainhtml.cpp -	filter to convert plaintext to HTML
- *
- * $Id$
- *
- * Copyright 1999 Torsten Ulhmann (TUhlmann at gmx.de)
- * Copyright 2000-2013 CrossWire Bible Society (http://www.crosswire.org)
- *	CrossWire Bible Society
- *	P. O. Box 2528
- *	Tempe, AZ  85280-2528
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation version 2.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- */
-
-#include <plainhtml.h>
-#include <swbuf.h>
-
-SWORD_NAMESPACE_START
-
-PLAINHTML::PLAINHTML()
-{
-}
-
-
-char PLAINHTML::processText(SWBuf &text, const SWKey *key, const SWModule *module)
-{
-	int count = 0;
-
-	SWBuf orig = text;
-	const char *from = orig.c_str();
-	for (text = ""; *from; from++) 
-	{
-		if ((*from == '\n') && (from[1] == '\n')) // two newlinea are a paragraph
-		{
-			text += "<P>";
-			from++;
-			continue;
-		} else {
-			if ((*from == '\n')) // && (from[1] != '\n')) // only one new line
-			{
-				text += "<BR>";
-				continue;
-			}
-		}
-		
-		if (*from == '{') { //footnote start
-			text += "<FONT COLOR=\"#80000\"><SMALL> (";
-			continue;
-		}
-		else if (*from == '}') //footnote end
-		{
-			text += ") </SMALL></FONT>";
-			continue;
-		}
-		else if (*from == '<') {
-			text += "&lt;";
-			continue;
-		}
-		else if (*from == '>') {
-			text += "&gt;";
-			continue;
-		}
-		else if (*from == '&') {
-			text += "&amp;";
-			continue;
-		}
-		else if ((*from == ' ') && (count > 5000))
-		{
-			text += "<WBR>";
-			count = 0;
-			continue;
-		}
-
-		text += *from;
-		count++;
-	}
-	return 0;
-}
-
-SWORD_NAMESPACE_END




More information about the sword-cvs mailing list