[PATCH] riched20: Only write out non-default pattern colours.
Huw Davies
huw at codeweavers.com
Fri Apr 21 05:33:26 CDT 2017
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
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 6b654caa6f..1cd293c662 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, " ");
--
2.12.0
More information about the wine-patches
mailing list