Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » Unnecessary variable in RTFEncoder
Unnecessary variable in RTFEncoder [message #26248] Sat, 17 April 2010 11:26 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi,

I found something weird in CtrlCore/EncodeRTF.cpp. In RTFEncoder::PutTxt() on line 561 there is following code:
bool hdiff = (para.format.bullet != RichPara::BULLET_NONE
	&& para.format.bullet != RichPara::BULLET_TEXT && para_ht != para_ht);
if(pstyle != oldstyle
|| para.format.bullet != parafmt.bullet || para.format.bullet == RichPara::BULLET_TEXT
|| hdiff || para.format.tab != parafmt.tab || para.format.newpage || parafmt.newpage) {
	...
}

If I'm not mistaken para_ht != para_ht is always false, therefore hdiff is always false as well and it never changes influence the if statement evaluation.

Either hdiff can be safely removed or there is something missing.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Previous Topic: Report in landscape and portrait at the same time
Next Topic: How to define the width of a table?
Goto Forum:
  


Current Time: Sun Apr 28 17:15:44 CEST 2024

Total time taken to generate the page: 1.96408 seconds