Commit Graph

26 Commits

Author SHA1 Message Date
Roman Pišl be1446f56c comctl32/edit: Avoid division by zero in EDIT_EM_LineScroll_internal.
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Roman Pišl 571489fde1 comctl32/edit: Avoid division by zero during initialization.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48803
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Fabian Maurer 34b980e662 comctl32/edit: In EM_POSFROMCHAR return correct position for empty lines.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47305
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:09:48 +01:00
Michael Stefaniuc f8979fee1f comctl32/tests: Get rid of variables holding empty strings.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Michael Stefaniuc 442b10da80 comctl32/tests: Simplify comparison with empty string.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02:00
Sven Baars 3dcff4de70 comctl32/tests: Prevent some test failures by moving the cursor away from the window.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-07 23:37:47 +02:00
Akihiro Sagawa 7f5f590d27 comctl32/edit: Implement WM_SETFONT margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Akihiro Sagawa 640c92b807 comctl32/tests: Use calculated WM_SETFONT margins in the CJK case.
In comctl32, ANSI version control also uses GetCharABCWidthsW().

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-25 17:28:10 +02:00
Akihiro Sagawa ef94a9fc6c comctl32/edit: Implement EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:25:00 +02:00
Akihiro Sagawa 28400eff29 comctl32/tests: Use calculated EC_USEFONTINFO margins in the CJK case.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:57 +02:00
Akihiro Sagawa 95f7ad03e3 comctl32/tests: Tests default margin size with various font face and charset.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:54 +02:00
Akihiro Sagawa 5012c1b18b comctl32/tests: Add Unicode version tests for Edit control margins.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:49 +02:00
Akihiro Sagawa 21dcb1ec87 comctl32/tests: Move the default margin size tests into a separate function.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-24 22:24:44 +02:00
Akihiro Sagawa 05864617bb comctl32/edit: Fix minimum control size conditions when using EC_USEFONTINFO.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa 81c30446d9 comctl32/tests: Use EM_SETMARGINS to test EC_USEFONTINFO margins.
Tests assume that WM_SETFONT margins are equal to EM_SETMARGINS with
EC_USEFONTINFO ones. This isn't true when font's charset is CJK.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa a0e6d45519 comctl32/tests: Skip margin tests if a font for the target charset isn't available.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Akihiro Sagawa 48d86f8931 comctl32/tests: Use GREEK_CHARSET in margin tests to avoid Associated Charset feature.
Due to Associated Charset feature, we currently use Chinese typeface in the
test in zh_CN locale. For consistency with another locale, we should avoid
the fature in tests.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Sergio Gómez Del Real 0d4a1f7bee comctl32: Implement handling of EM_SETCUEBANNER/EM_GETCUEBANNER messages.
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:52:36 +01:00
Michael Stefaniuc 04cb8d51a3 comctl32/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-06 21:18:42 +02:00
Nikolay Sivov dadea2d11d comctl32/edit: Force update on focus change.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 14:25:59 +01:00
Nikolay Sivov 335f865ed5 comctl32/tests: Replace asserts with regular test checks for Edit tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-16 14:25:52 +01:00
Nikolay Sivov 662f727a79 comctl32: Introduce Edit control.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-01 22:24:55 +01:00
Nikolay Sivov 6aa853ae39 user32/edit: Fix EM_SETWORDBREAKPROC return value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-22 22:26:46 +01:00
Nikolay Sivov 258dc94c99 comctl32/tests: Add EM_GETLINE test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-12 15:03:00 +01:00
Nikolay Sivov 8a93b18993 comctl32/tests: Remove some workarounds that no longer apply.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-19 19:49:02 +01:00
Nikolay Sivov 3cd2d58718 comctl32/tests: Add Edit control tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-18 12:35:13 +01:00