Module: wine
Branch: master
Commit: d1f1346f5495ab53502702fc048ada39c8de74bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d1f1346f5495ab53502702fc0…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Wed Jun 25 10:29:19 2008 -0400
richedit: Implemented undo coalescing to group typing events.
Consecutively typed characters are grouped together to be undone
together. The grouping of typed characters can be stopped by certain
events that are mentioned in MSDN's remarks on the EM_STOPGROUPTYPING
message, which is also implemented by this patch.
---
dlls/riched20/editor.c | 37 ++++++++++---
dlls/riched20/editor.h | 6 ++-
dlls/riched20/editstr.h | 3 +-
dlls/riched20/list.c | 1 +
dlls/riched20/tests/editor.c | 30 +++++-----
dlls/riched20/undo.c | 118 ++++++++++++++++++++++++++++++++++++++---
6 files changed, 159 insertions(+), 36 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=d1f1346f5495ab5350270…
Module: wine
Branch: master
Commit: cb1d7becf9057e87b736f4590b89b27409f86ee7
URL: http://source.winehq.org/git/wine.git/?a=commit;h=cb1d7becf9057e87b736f4590…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Wed Jun 25 11:47:37 2008 -0400
richedit: Fixed bug preventing bold from being set with EM_SETCHARFORMAT.
Previously bold needed to be set by setting CFM_WEIGHT in the
CHARFORMAT2 structure, and then setting the appropriate wWeight value.
This approach isn't even supported in version 3.0 of the richedit
control. Now bold can be set/unset properly for Windows or Wine using
CFE_BOLD in dwEffects and with CFM_BOLD set in the dwMask flag.
---
dlls/riched20/style.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c
index b483be0..66e45f5 100644
--- a/dlls/riched20/style.c
+++ b/dlls/riched20/style.c
@@ -221,6 +221,15 @@ ME_Style *ME_ApplyStyle(ME_Style *sSrc, CHARFORMAT2W *style)
s->fmt.bUnderlineType = (style->dwEffects & CFM_UNDERLINE) ?
CFU_CF1UNDERLINE : CFU_UNDERLINENONE;
}
+ if (style->dwMask & CFM_BOLD && !(style->dwMask & CFM_WEIGHT))
+ {
+ s->fmt.wWeight = (style->dwEffects & CFE_BOLD) ? FW_BOLD : FW_NORMAL;
+ } else if (style->dwMask & CFM_WEIGHT && !(style->dwMask & CFM_BOLD)) {
+ if (style->wWeight > FW_NORMAL)
+ s->fmt.dwEffects |= CFE_BOLD;
+ else
+ s->fmt.dwEffects &= ~CFE_BOLD;
+ }
return s;
}
Module: wine
Branch: master
Commit: 60757ca6d5ceb79a5599ca5be0c17225d9a86555
URL: http://source.winehq.org/git/wine.git/?a=commit;h=60757ca6d5ceb79a5599ca5be…
Author: Dylan Smith <dylan.ah.smith(a)gmail.com>
Date: Wed Jun 25 11:40:39 2008 -0400
richedit: Corrected the conversion used for the initial font size.
The LOGFONT's lfHeight member is in logical units, and is being used to
set the yHeight member of CHARFORMAT2 which is supposed to be in twips.
---
dlls/riched20/para.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/riched20/para.c b/dlls/riched20/para.c
index d6a06d3..de69794 100644
--- a/dlls/riched20/para.c
+++ b/dlls/riched20/para.c
@@ -52,7 +52,8 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
cf.dwEffects = CFE_AUTOCOLOR | CFE_AUTOBACKCOLOR;
lstrcpyW(cf.szFaceName, lf.lfFaceName);
- cf.yHeight = ME_twips2pointsY(&c, lf.lfHeight);
+ /* Convert system font height from logical units to twips for cf.yHeight */
+ cf.yHeight = (lf.lfHeight * 72 * 1440) / (c.dpi.cy * c.dpi.cy);
if (lf.lfWeight > FW_NORMAL) cf.dwEffects |= CFE_BOLD;
cf.wWeight = lf.lfWeight;
if (lf.lfItalic) cf.dwEffects |= CFE_ITALIC;