[Bug 15352] TSLPatcher: rtf header should be centered, instead half outside window

wine-bugs at winehq.org wine-bugs at winehq.org
Fri Oct 10 04:31:20 CDT 2008


http://bugs.winehq.org/show_bug.cgi?id=15352


Dylan Smith <dylan.ah.smith at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dylan.ah.smith at gmail.com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1




--- Comment #1 from Dylan Smith <dylan.ah.smith at gmail.com>  2008-10-10 04:31:19 ---
I see two issues here:
1. Word wrapping is disabled in Wine but enabled in Windows
2. Centered text is not displayed properly without word wrapping.

For #1 I still need to figure out what else disabled/enables word wrapping
since it doesn't use EM_SETTARGETDEVICE.  This seems similar to the remaining
issue in Bug 12567. Any leads on this one would be great, but for now I am
fresh out of ideas.

The reason the rtf file opens properly in wordpad is that Wine's wordpad always
enables word wrapping, so neither issue is noticed.  I modified wordpad to
disable word wrapping using the WS_HSCROLL style flag, and then saw both
issues.

Issue #2 will not be noticeable for this but one #1 is fixed, and probably
isn't actually a regression, since I don't know if it was ever working.  What
is happening here is that the available width is being set to the largest
positive integer (0x7FFFFFFF) to avoid wrapping, so the centered text gets
drawn at about just under half that size (e.g. 0x3FFFFFF8).

It seems like somewhere in ExtTextOutW the x value probably to get truncated to
a short, so 0x3FFFFFF8 would become 0xFFF8 and get interpreted as -8, and the
text seems centered at 0.  This would be why the start of the text gets
truncated.  I tested with builtin richedit on Windows and the behaviour was the
same, so this is expected behaviour for ExtTextOutW.


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list