U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » RichText,QTF,RTF... » page numbering
Re: page numbering [message #5276 is a reply to message #5275] Tue, 12 September 2006 11:34 Go to previous messageGo to previous message
zsolt is currently offline  zsolt
Messages: 704
Registered: December 2005
Location: Budapest, Hungary
Contributor
luzr wrote on Tue, 12 September 2006 11:29

Ooops, sorry. But at least, I would insert "else" between two variants ("$$PD"):

String  Report::FormatHF(const char *s, int pageno)
{
	String result;
	while(*s) {
		if(s[0] == '$' && s[1] == '$') {
			if(s[2] == 'P'){
				result.Cat(Format("%d", pageno + 1));
				s += 3;
			}
                  else
			if(s[2] == 'D'){
				result.Cat(Format(GetSysDate()));
				s += 3;
			}
		}
		result.Cat(*s++);
	}
	return result;
}


Yes, good idea. I wanted to pu that else also, but you were faster Smile
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to insert and display *.png file in UWord and/or qtf??
Next Topic: report / qtf to pdf saving
Goto Forum:
  


Current Time: Sat Jun 20 23:14:21 GMT+2 2026

Total time taken to generate the page: 0.00707 seconds