[sword-svn] r3160 - in branches/sword-1-7-x: . src/modules/filters

greg.hellings at crosswire.org greg.hellings at crosswire.org
Wed Apr 16 21:02:17 MST 2014


Author: greg.hellings
Date: 2014-04-16 21:02:17 -0700 (Wed, 16 Apr 2014)
New Revision: 3160

Modified:
   branches/sword-1-7-x/
   branches/sword-1-7-x/src/modules/filters/teihtmlhref.cpp
   branches/sword-1-7-x/src/modules/filters/teirtf.cpp
   branches/sword-1-7-x/src/modules/filters/teixhtml.cpp
Log:
Merging r3091 - CSS standard compliance



Property changes on: branches/sword-1-7-x
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086
   + /trunk:2989-2991,2997,3001-3004,3006,3010-3013,3015-3020,3026-3039,3045-3046,3048,3056,3058-3062,3067,3073,3077-3081,3085-3086,3091

Modified: branches/sword-1-7-x/src/modules/filters/teihtmlhref.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/teihtmlhref.cpp	2014-04-17 03:59:02 UTC (rev 3159)
+++ branches/sword-1-7-x/src/modules/filters/teihtmlhref.cpp	2014-04-17 04:02:17 UTC (rev 3160)
@@ -87,30 +87,29 @@
 				SWBuf rend = tag.getAttribute("rend");
 				
 				u->lastHi = rend;
-				if (rend == "ital")
+				if (rend == "italic" || rend == "ital")
 					buf += "<i>";
-				else if (rend == "italic")
-					buf += "<i>";
 				else if (rend == "bold")
 					buf += "<b>";
-				else if (rend == "subscript")
-					buf += "<small><sub>";
-				else if (rend == "sup")
-					buf += "<small><sup>";
-
+				else if (rend == "super" || rend == "sup")
+					buf += "<sup>";
+				else if (rend == "sub")
+					buf += "<sub>";
+				else if (rend == "overline")
+					buf += "<span style=\"text-decoration:overline\">";
 			}
 			else if (tag.isEndTag()) {
 				SWBuf rend = u->lastHi;
-				if (rend == "ital")
+				if (rend == "italic" || rend == "ital")
 					buf += "</i>";
-				else if (rend == "italic")
-					buf += "</i>";
 				else if (rend == "bold")
 					buf += "</b>";
-				else if (rend == "subscript")
-					buf += "</small></sub>";
-				else if (rend == "sup")
-					buf += "</sup></small>";
+				else if (rend == "super" || rend == "sup")
+					buf += "</sup>";
+				else if (rend == "sub")
+					buf += "</sub>";
+				else if (rend == "overline")
+					buf += "</span>";
 			}
 		}
 

Modified: branches/sword-1-7-x/src/modules/filters/teirtf.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/teirtf.cpp	2014-04-17 03:59:02 UTC (rev 3159)
+++ branches/sword-1-7-x/src/modules/filters/teirtf.cpp	2014-04-17 04:02:17 UTC (rev 3160)
@@ -76,15 +76,14 @@
 		else if (!strcmp(tag.getName(), "hi") || !strcmp(tag.getName(), "emph")) {
 			SWBuf rend = tag.getAttribute("rend");
 			if ((!tag.isEndTag()) && (!tag.isEmpty())) {
-				if (rend == "ital" || rend == "italic")
+				if (rend == "italic" || rend == "ital")
 					buf += "{\\i1 ";
 				else if (rend == "bold")
 					buf += "{\\b1 ";
-				else if (rend == "subscript")
-					buf += "{\\sub ";
-				else if (rend == "sup")
+				else if (rend == "super" || rend == "sup")
 				        buf += "{\\super ";
-
+				else if (rend == "sub")
+					buf += "{\\sub ";
 			}
 			else if (tag.isEndTag()) {
 				buf += "}";

Modified: branches/sword-1-7-x/src/modules/filters/teixhtml.cpp
===================================================================
--- branches/sword-1-7-x/src/modules/filters/teixhtml.cpp	2014-04-17 03:59:02 UTC (rev 3159)
+++ branches/sword-1-7-x/src/modules/filters/teixhtml.cpp	2014-04-17 04:02:17 UTC (rev 3160)
@@ -87,32 +87,28 @@
 				SWBuf rend = tag.getAttribute("rend");
 				
 				u->lastHi = rend;
-				if (rend == "ital")
+				if (rend == "italic" || rend == "ital")
 					buf += "<i>";
-				else if (rend == "italic")
-					buf += "<i>";
 				else if (rend == "bold")
 					buf += "<b>";
-				else if (rend == "sup")
-					buf += "<small><sup>";
-				else if (rend == "subscript")
-					buf += "<small><sub>";
+				else if (rend == "super" || rend == "sup")
+					buf += "<sup>";
+				else if (rend == "sub")
+					buf += "<sub>";
 				else if (rend == "overline")
 					buf += "<span style=\"text-decoration:overline\">";
 
 			}
 			else if (tag.isEndTag()) {
 				SWBuf rend = u->lastHi;
-				if (rend == "ital")
+				if (rend == "italic" || rend == "ital")
 					buf += "</i>";
-				else if (rend == "italic")
-					buf += "</i>";
 				else if (rend == "bold")
 					buf += "</b>";
-				else if (rend == "sup")
-					buf += "</sup></small>";
-				else if (rend == "subscript")
-					buf += "</small></sub>";
+				else if (rend = "super" || rend == "sup")
+					buf += "</sup>";
+				else if (rend == "sub")
+					buf += "</sub>";
 				else if (rend == "overline")
 					buf += "</span>";
 			}




More information about the sword-cvs mailing list