Huw Davies : riched20: Only write out non-default pattern colours.
Alexandre Julliard
julliard at winehq.org
Fri Apr 21 15:18:16 CDT 2017
Module: wine
Branch: master
Commit: d4b1938cfbc6ae44536b14bb0fcecc8bf23188eb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d4b1938cfbc6ae44536b14bb0fcecc8bf23188eb
Author: Huw Davies <huw at codeweavers.com>
Date: Fri Apr 21 11:33:26 2017 +0100
riched20: Only write out non-default pattern colours.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/riched20/writer.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c
index 6b654ca..1cd293c 100644
--- a/dlls/riched20/writer.c
+++ b/dlls/riched20/writer.c
@@ -723,8 +723,10 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream,
sprintf(props + strlen(props), "\\shading%d", fmt->wShadingWeight);
if (fmt->wShadingStyle & 0xF)
strcat(props, style[fmt->wShadingStyle & 0xF]);
- sprintf(props + strlen(props), "\\cfpat%d\\cbpat%d",
- (fmt->wShadingStyle >> 4) & 0xF, (fmt->wShadingStyle >> 8) & 0xF);
+ if ((fmt->wShadingStyle >> 4) & 0xf)
+ sprintf(props + strlen(props), "\\cfpat%d", (fmt->wShadingStyle >> 4) & 0xf);
+ if ((fmt->wShadingStyle >> 8) & 0xf)
+ sprintf(props + strlen(props), "\\cbpat%d", (fmt->wShadingStyle >> 8) & 0xf);
}
if (*props)
strcat(props, " ");
More information about the wine-cvs
mailing list