Huw Davies : riched20: Don' t compare the colours if the old and new states are both auto.

Alexandre Julliard julliard at winehq.org
Wed Apr 5 16:17:07 CDT 2017


Module: wine
Branch: master
Commit: 5f3772a730073b950ff42d43015a6d72608e3f5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f3772a730073b950ff42d43015a6d72608e3f5b

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Apr  5 14:02:08 2017 +0100

riched20: Don't compare the colours if the old and new states are both auto.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/riched20/writer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/riched20/writer.c b/dlls/riched20/writer.c
index d579084..6b654ca 100644
--- a/dlls/riched20/writer.c
+++ b/dlls/riched20/writer.c
@@ -769,14 +769,14 @@ ME_StreamOutRTFCharProps(ME_OutStream *pStream, CHARFORMAT2W *fmt)
   }
 
   if ((old_fmt->dwEffects ^ fmt->dwEffects) & CFE_AUTOBACKCOLOR ||
-      old_fmt->crBackColor != fmt->crBackColor)
+      (!(fmt->dwEffects & CFE_AUTOBACKCOLOR) && old_fmt->crBackColor != fmt->crBackColor))
   {
       if (fmt->dwEffects & CFE_AUTOBACKCOLOR) i = 0;
       else find_color_in_colortbl( pStream, fmt->crBackColor, &i );
       sprintf(props + strlen(props), "\\cb%u", i);
   }
   if ((old_fmt->dwEffects ^ fmt->dwEffects) & CFE_AUTOCOLOR ||
-      old_fmt->crTextColor != fmt->crTextColor)
+      (!(fmt->dwEffects & CFE_AUTOCOLOR) && old_fmt->crTextColor != fmt->crTextColor))
   {
       if (fmt->dwEffects & CFE_AUTOCOLOR) i = 0;
       else find_color_in_colortbl( pStream, fmt->crTextColor, &i );




More information about the wine-cvs mailing list