Home » U++ Library support » RichText,QTF,RTF... » Unnecessary variable in RTFEncoder
Unnecessary variable in RTFEncoder [message #26248] |
Sat, 17 April 2010 11:26  |
|
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
|
|
|
|
|
Goto Forum:
Current Time: Wed Jun 11 02:53:18 CEST 2025
Total time taken to generate the page: 0.04095 seconds
|