Commit Graph

46 Commits

Author SHA1 Message Date
Vitaliy Margolen 3fc25446fe DrawTextEx: honor clipping for underscores. 2003-06-04 20:21:21 +00:00
Andreas Mohr 114b667f41 Some spelling and formatting fixes. 2003-04-02 01:23:43 +00:00
Bill Medland 62a80b76f2 Better handling of bad data in TabbedTextOut/TabbedTextExtent
Checked with:
a) Null tabstop array with non-zero number of entries
b) Negative number of entries (MSDN is wrong; it is not an error)
c) Single tabwidth of negative size
d) Single specified tabwidth of zero size
2003-01-31 03:23:18 +00:00
Dan Kegel 0fd521fee3 Change RECT to use LONG to match win32 standard headers and fix format
strings to use %ld for RECT elements.
2003-01-08 21:09:25 +00:00
Alexandre Julliard aff7ddaeeb Made user compile with -DSTRICT. 2002-11-22 21:22:14 +00:00
Alexandre Julliard 45078fb008 Properly split the 16-bit versions of GrayString and TabbedTextOut. 2002-11-22 20:41:17 +00:00
Alexandre Julliard 7ef66af34a Moved some more 16-bit functions to user16.c.
A few fixes for -DSTRICT.
2002-11-22 04:47:10 +00:00
Michael Stefaniuc 61d92562b9 Silence some warnings due to casts between pointer and integers of
different size.
2002-10-19 00:52:55 +00:00
Paul Rupe 2e2988dec6 Faster performance in TEXT_Ellipsify for long strings. 2002-06-10 22:47:58 +00:00
Vincent Béron 9a62491660 Removed trailing whitespace. 2002-05-31 23:06:46 +00:00
Robert O'Callahan 71a8a74b43 Fixed bug in TEXT_WordBreak that was variously throwing Lotus Notes
into an infinite loop or causing it to crash.
2002-04-27 00:14:16 +00:00
Alexandre Julliard 5769d1de00 Better support for configure detection of missing types, added check
for ssize_t.
Removed a couple of no longer used portability functions.
Various portability fixes in port.h.
2002-04-26 19:05:15 +00:00
Stefan Leichter 32b6ef349d Check for NULL pointer in DrawTextExA. 2002-04-05 21:17:00 +00:00
Bill Medland 2162eb867a Initialise a stack variable. 2002-03-22 00:12:15 +00:00
Bill Medland 7d983d244a Pass information through arguments instead of static variables.
Add protection to prevent reading outside the buffer.
Better handling of degenerate cases.
2002-03-11 01:15:31 +00:00
Alexandre Julliard 0799c1a780 Added LGPL standard comment, and copyright notices where necessary.
Global replacement of debugtools.h by wine/debug.h.
2002-03-09 23:29:33 +00:00
Bill Medland bc39eeec40 Correct Word breaking in centred/right justified mode; it was leaving a
trailing space which it should only do for left-justified text.
Also tighten up some comments.
2002-02-26 00:39:30 +00:00
Bill Medland 7423dc0463 DrawText ellipsification on all lines, not just single-line. 2002-02-21 20:07:26 +00:00
Bill Medland 8513907f2c Drawtext tidying up ready for the next big change:
- Fix brainfade in previous delta
- Move ellipsification results to static memory; they are going to
  have to be referenced inside NextLineW and the arg list is too big
  already.
- Add the missing ellipsification result (len_under) to simplify coding.
- Slight correction to prefix tracking for when there are several
  underlined characters on a single line (DT_EXPANDTABS only).
- Allocate and free the temporary copy required for DT_MODIFYSTRING
  rather than using a fixed size stack array.
- Introduce lastline into the main loop; it simplifies the code and we
  are going to need it.
2002-02-20 18:56:18 +00:00
Bill Medland 7af9098f6b Change the way that DrawText parses the next line to display, ready to
support multiline ellipsification etc.  Rather than measuring the text
each time we add a character and breaking once it is too long and
WORDBREAK is enabled, we copy a whole text segment and then measure
it; GetTextExtentPointEx is designed to tell us how much fitted.  This
may result in a little rescanning if wordbreak is enabled but will be
well worth while when multiline path ellipsification is brought down
into the NextLine function.  Note also that the wordbreak calculation
is a little more complete (e.g.  including break-within-word for
DT_EDITCONTROL).
2002-02-19 18:25:53 +00:00
Bill Medland 0f9013f7e0 Measure the text more reasonably. This handles intercharacter spacing
and should handle any kerning etc. that might happen. Also ensure no
wordbreaking on singleline text.
2002-02-15 18:21:59 +00:00
Bill Medland 92d77c9bb2 DrawText should not split words just because of clipping. 2002-02-14 19:21:59 +00:00
Bill Medland cabe8ca580 Put in place a proper tab model within DrawText (also includes
simplifying TEXT_NextLineW to remove duplicate code).
2002-02-12 18:40:36 +00:00
Bill Medland afe92e8e8a Split the path and word/end ellipsification out of the main function
and do them thoroughly. The existing method would be incorrect where
tabs were involved and in some kerning situations.
2002-02-05 18:07:04 +00:00
Bill Medland fdb799aa6a Ensure that the whole modified text is returned from DrawTextExA. 2002-02-02 18:14:35 +00:00
Bill Medland 001e732c41 - Introduce a significant design decision.
- Recalculate the prefix location if ellipsification alters it.  This
  carefully does NOT emulate a Microsoft bug in which reprefixing is
  wrong when the first character removed by ellipsification is the one
  that would have been underlined (under Win98 at least).
2002-01-31 20:44:39 +00:00
Bill Medland a4605ac000 Put the prefix-underline-drawing away into it's own function so we can
see what is happening.
2002-01-29 02:46:09 +00:00
Bill Medland fcb8e0d77a - Don't string copy from uninitialised stack memory. In fact don't
modify the input string if it didn't change.
- Correct array size.
- Logically separate the centring from the ellipsification.
- Comment on prefix error.
2002-01-18 18:09:09 +00:00
Bill Medland fd59f34ec0 First stage of DrawText upgrade.
- Rearrange code into three distinct areas; DrawText, GrayString,
  TabbedText.
- Remove unused macros.
- Modify treatment of Tab arguments to fit with observed behaviour.
  e.g. DrawTextEx with DT_TABSTOP but null dtp will not take the
  setting from the flags.  Also only uses bits 15 to 8, not the
  higher bits.
2002-01-15 20:29:35 +00:00
Patrik Stridvall 19d66cc1f6 Fixed some issues found by winapi_check. 2002-01-07 21:16:46 +00:00
Sander van Leeuwen 500c201b0a Fixed DC leak. 2002-01-04 21:26:56 +00:00
Alexandre Julliard 7e49205d5a Changed 16-bit USER Enum* functions to not use thunks, now that 16-bit
Winelib is no longer supported.
2001-12-17 21:37:53 +00:00
Eugene Mayevski 4252310c92 Fixed DT_RTLREADING flag interpretation. 2001-08-22 18:00:47 +00:00
Travis Michielsen 188b32b73f Fully implement DrawTextEx* functions. 2001-07-26 20:10:40 +00:00
Andreas Mohr a49b5be97d Fixed some more overflowing string traces. 2001-07-17 00:51:00 +00:00
Patrik Stridvall 01d5e5b071 Documentation fixes. 2001-07-02 19:59:40 +00:00
Andreas Mohr 4fb9c09184 Limit output for certain text functions. 2001-06-08 20:19:28 +00:00
Patrik Stridvall 0c61028734 Documentation ordinal fixes. 2001-01-25 22:22:21 +00:00
Ulrich Czekalla ebc5fe96c6 Prevent buffer overflow in TEXT_NextLineW. 2001-01-20 02:16:52 +00:00
Alexandre Julliard a41b2cfdd0 Moved tweak support to USER dll. Removed tweak.h and cache.h. 2001-01-15 20:12:55 +00:00
Alexandre Julliard 982a223f36 Replaced PTR_SEG_TO_LIN macro by exported MapSL function.
Fixed a few ptr/segptr mismatches.
Moved CONV_RECT/POINT macros to wingdi16.h.
2000-12-13 20:20:09 +00:00
Dimitrie O. Paun 981a9a409b Fixed indentation problems resulting from automatic renaming, other
aesthetic fixes.
2000-12-12 00:35:54 +00:00
Gerard Patel 158e2cb6cb Implemented DrawTextW as Unicode and DrawTextA as call to DrawTextW. 2000-12-11 03:39:08 +00:00
Susan Farley 196daf815e Added support DT_PATH_ELLIPSIS, DT_END_ELLIPSIS, and DT_WORD_ELLIPSIS
flags in DrawText.
2000-09-22 22:09:11 +00:00
Alexandre Julliard cb10fdab99 Replaced lstrlen/lstrcmp by libc equivalents everywhere we don't need
to trap exceptions.
2000-08-06 02:41:16 +00:00
Alexandre Julliard 93652e1a68 Moved a bunch of functions out of libwine/kernel/gdi into USER. 2000-08-04 04:21:02 +00:00