[sword-cvs] sword/apps/windoze swdisprtfchap.cpp,1.16,1.17

sword@www.crosswire.org sword@www.crosswire.org
Wed, 30 Apr 2003 01:18:47 -0700


Update of /usr/local/cvsroot/sword/apps/windoze
In directory www:/tmp/cvs-serv30964/apps/windoze

Modified Files:
	swdisprtfchap.cpp 
Log Message:
no message

Index: swdisprtfchap.cpp
===================================================================
RCS file: /usr/local/cvsroot/sword/apps/windoze/swdisprtfchap.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** swdisprtfchap.cpp	3 Oct 2002 04:26:46 -0000	1.16
--- swdisprtfchap.cpp	30 Apr 2003 08:18:45 -0000	1.17
***************
*** 6,9 ****
--- 6,10 ----
  #include "swdisprtfchap.h"
  #include <winbase.h>
+ #include <unicodertf.h>
  
  using namespace std;
***************
*** 48,53 ****
--- 49,56 ----
  char SWDispRTFChap::Display(SWModule &Module) {
  	int testmt, book, chap, verse, versepos;
+ 	char buf[254];
  	System::AnsiString newtext, tmptext, tmptext2;
  	VerseKey *key = (VerseKey *)(SWKey *)Module;
+ 	UnicodeRTF uToRTF;
  	testmt = key->Testament();
  	chap   = key->Chapter();
***************
*** 90,93 ****
--- 93,106 ----
  		}
  		if (tmptext.Length() > 3) {	// make sure we have an entry
+ 			int pvHeading = 0;
+ 			do {
+ 				sprintf(buf, "%i", pvHeading++);
+ 				SWBuf preverseHeading = module->getEntryAttributes()["Heading"]["Preverse"][buf].c_str();
+ 				uToRTF.processText(preverseHeading);
+ 				if (preverseHeading.length()) {
+ 					newtext += ((AnsiString)"\\par\\par {\\i1\\b1 ") + preverseHeading.c_str() + "\\par}";
+ 				}
+ 				else break;
+ 			} while (true);
  			if (Module.Direction() == DIRECTION_RTL && (platformID == VER_PLATFORM_WIN32_WINDOWS	 || (Module.Lang() && strnicmp(Module.Lang(), "he", 2) && strnicmp(Module.Lang(), "ar", 2)))) {
  				newtext = newtext + RTFVersePre;