Author: akhaldi
Date: Sat Jun 3 22:36:44 2017
New Revision: 74841
URL:
http://svn.reactos.org/svn/reactos?rev=74841&view=rev
Log:
[RICHED20] Sync with Wine Staging 2.9. CORE-13362
d4b1938 riched20: Only write out non-default pattern colours.
5f3772a riched20: Don't compare the colours if the old and new states are both auto.
6bcf4d6 riched20: Add linefeeds after the colortbl and generator groups.
8b79854 riched20: Remove a hack that should be longer be needed.
3d291dd riched20: Write the char format for the end-of-paragraph marker.
Modified:
trunk/reactos/dll/win32/riched20/writer.c
trunk/reactos/media/doc/README.WINE
Modified: trunk/reactos/dll/win32/riched20/writer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/writer.…
==============================================================================
--- trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/writer.c [iso-8859-1] Sat Jun 3 22:36:44 2017
@@ -377,14 +377,6 @@
if (!ME_StreamOutPrint(pStream, "}\r\n"))
return FALSE;
- /* It seems like Open Office ignores \deff0 tag at RTF-header.
- As result it can't correctly parse text before first \fN tag,
- so we can put \f0 immediately after font table. This forces
- parser to use the same font, that \deff0 specifies.
- It makes OOffice happy */
- if (!ME_StreamOutPrint(pStream, "\\f0"))
- return FALSE;
-
/* Output the color table */
if (!ME_StreamOutPrint(pStream, "{\\colortbl;")) return FALSE; /* first entry
is auto-color */
for (i = 1; i < pStream->nColorTblLen; i++)
@@ -393,7 +385,7 @@
(pStream->colortbl[i] >> 8) & 0xFF,
(pStream->colortbl[i] >> 16) & 0xFF))
return FALSE;
}
- if (!ME_StreamOutPrint(pStream, "}")) return FALSE;
+ if (!ME_StreamOutPrint(pStream, "}\r\n")) return FALSE;
return TRUE;
}
@@ -726,8 +718,10 @@
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, " ");
@@ -772,14 +766,14 @@
}
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 );
@@ -1020,7 +1014,7 @@
/* TODO: stylesheet table */
- if (!ME_StreamOutPrint(pStream, "{\\*\\generator Wine Riched20 2.0;}"))
+ if (!ME_StreamOutPrint(pStream, "{\\*\\generator Wine Riched20 2.0;}\r\n"))
return FALSE;
/* TODO: information group */
@@ -1069,6 +1063,9 @@
}
nChars--;
} else if (cursor.pRun->member.run.nFlags & MERF_ENDPARA) {
+ if (!ME_StreamOutRTFCharProps(pStream,
&cursor.pRun->member.run.style->fmt))
+ return FALSE;
+
if (cursor.pPara->member.para.fmt.dwMask & PFM_TABLE &&
cursor.pPara->member.para.fmt.wEffects & PFE_TABLE &&
!(cursor.pPara->member.para.nFlags &
(MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL)))
Modified: trunk/reactos/media/doc/README.WINE
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
==============================================================================
--- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original)
+++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sat Jun 3 22:36:44 2017
@@ -158,7 +158,7 @@
reactos/dll/win32/query # Synced to WineStaging-1.9.11
reactos/dll/win32/rasapi32 # Synced to WineStaging-1.9.11
reactos/dll/win32/resutils # Synced to WineStaging-1.9.11
-reactos/dll/win32/riched20 # Synced to WineStaging-2.2
+reactos/dll/win32/riched20 # Synced to WineStaging-2.9
reactos/dll/win32/riched32 # Synced to WineStaging-1.9.11
reactos/dll/win32/rpcrt4 # Synced to WineStaging-2.2
reactos/dll/win32/rsabase # Synced to WineStaging-1.9.11