Author: cwittich
Date: Sun Jun 7 10:19:03 2009
New Revision: 41316
URL:
http://svn.reactos.org/svn/reactos?rev=41316&view=rev
Log:
sync riched20 and riched32 with wine 1.1.23
Modified:
trunk/reactos/dll/win32/riched20/caret.c
trunk/reactos/dll/win32/riched20/clipboard.c
trunk/reactos/dll/win32/riched20/editor.c
trunk/reactos/dll/win32/riched20/editor.h
trunk/reactos/dll/win32/riched20/reader.c
trunk/reactos/dll/win32/riched20/rtf.h
trunk/reactos/dll/win32/riched20/run.c
trunk/reactos/dll/win32/riched32/richedit.c
trunk/reactos/include/psdk/richedit.h
Modified: trunk/reactos/dll/win32/riched20/caret.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/caret.c…
==============================================================================
--- trunk/reactos/dll/win32/riched20/caret.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/caret.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -168,7 +168,7 @@
}
-void
+static void
ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor,
int *x, int *y, int *height)
{
Modified: trunk/reactos/dll/win32/riched20/clipboard.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/clipboa…
==============================================================================
--- trunk/reactos/dll/win32/riched20/clipboard.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/clipboard.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -282,6 +282,7 @@
if(dwDirection != DATADIR_GET) {
FIXME("Unsupported direction: %d\n", dwDirection);
/* WinXP riched20 also returns E_NOTIMPL in this case */
+ *ppenumFormatEtc = NULL;
return E_NOTIMPL;
}
return EnumFormatImpl_Create(This->fmtetc, This->fmtetc_cnt, ppenumFormatEtc);
Modified: trunk/reactos/dll/win32/riched20/editor.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
==============================================================================
--- trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/editor.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -2901,7 +2901,7 @@
return "";
}
-void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
+static void ME_LinkNotify(ME_TextEditor *editor, UINT msg, WPARAM wParam, LPARAM lParam)
{
int x,y;
ME_DisplayItem *para, *run;
@@ -4616,14 +4616,14 @@
return TRUE;
}
-LRESULT WINAPI REComboWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
+static LRESULT WINAPI REComboWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
/* FIXME: Not implemented */
TRACE("hWnd %p msg %04x (%s) %08lx %08lx\n",
hWnd, msg, get_msg_name(msg), wParam, lParam);
return DefWindowProcW(hWnd, msg, wParam, lParam);
}
-LRESULT WINAPI REListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
+static LRESULT WINAPI REListWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) {
/* FIXME: Not implemented */
TRACE("hWnd %p msg %04x (%s) %08lx %08lx\n",
hWnd, msg, get_msg_name(msg), wParam, lParam);
Modified: trunk/reactos/dll/win32/riched20/editor.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/editor.…
==============================================================================
--- trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/editor.h [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -171,9 +171,6 @@
void ME_InsertEndRowFromCursor(ME_TextEditor *editor, int nCursor);
BOOL ME_ArrowKey(ME_TextEditor *ed, int nVKey, BOOL extend, BOOL ctrl);
-void ME_MustBeWrapped(ME_Context *c, ME_DisplayItem *para);
-void ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor,
- int *x, int *y, int *height);
int ME_GetCursorOfs(ME_TextEditor *editor, int nCursor);
void ME_GetSelection(ME_TextEditor *editor, int *from, int *to);
int ME_CountParagraphsBetween(ME_TextEditor *editor, int from, int to);
Modified: trunk/reactos/dll/win32/riched20/reader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/reader.…
==============================================================================
--- trunk/reactos/dll/win32/riched20/reader.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/reader.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -226,10 +226,6 @@
info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0';
}
- heap_free (info->inputName);
- heap_free (info->outputName);
- info->inputName = info->outputName = NULL;
-
for (i = 0; i < rtfMaxClass; i++)
RTFSetClassCallback (info, i, NULL);
for (i = 0; i < rtfMaxDestination; i++)
@@ -276,39 +272,6 @@
info->canInheritInTbl = FALSE;
info->borderType = 0;
}
-
-/*
- * Set or get the input or output file name. These are never guaranteed
- * to be accurate, only insofar as the calling program makes them so.
- */
-
-void RTFSetInputName(RTF_Info *info, const char *name)
-{
- info->inputName = RTFStrSave (name);
- if (info->inputName == NULL)
- ERR ("RTFSetInputName: out of memory\n");
-}
-
-
-char *RTFGetInputName(const RTF_Info *info)
-{
- return (info->inputName);
-}
-
-
-void RTFSetOutputName(RTF_Info *info, const char *name)
-{
- info->outputName = RTFStrSave (name);
- if (info->outputName == NULL)
- ERR ("RTFSetOutputName: out of memory\n");
-}
-
-
-char *RTFGetOutputName(const RTF_Info *info)
-{
- return (info->outputName);
-}
-
/*
* Install or return a writer callback for a destination type
@@ -480,14 +443,6 @@
* twice due to the RTFUngetToken. */
if(RTFCheckCM (info, rtfGroup, rtfEndGroup))
info->stackTop++;
-}
-
-
-int RTFPeekToken(RTF_Info *info)
-{
- _RTFGetToken (info);
- RTFUngetToken (info);
- return (info->rtfClass);
}
@@ -792,29 +747,6 @@
}
info->prevChar = c;
return (c);
-}
-
-
-/*
- * Synthesize a token by setting the global variables to the
- * values supplied. Typically this is followed with a call
- * to RTFRouteToken().
- *
- * If a param value other than rtfNoParam is passed, it becomes
- * part of the token text.
- */
-
-static void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, const
char *text)
-{
- info->rtfClass = class;
- info->rtfMajor = major;
- info->rtfMinor = minor;
- info->rtfParam = param;
- if (param == rtfNoParam)
- lstrcpyA(info->rtfTextBuf, text);
- else
- sprintf (info->rtfTextBuf, "%s%d", text, param);
- info->rtfTextLen = lstrlenA (info->rtfTextBuf);
}
@@ -1281,22 +1213,6 @@
* References to style 0 are mapped onto the Normal style.
*/
-
-static RTFStyle *RTFGetStyle(const RTF_Info *info, int num)
-{
- RTFStyle *s;
-
- if (num == -1)
- return (info->styleList);
- for (s = info->styleList; s != NULL; s = s->rtfNextStyle)
- {
- if (s->rtfSNum == num)
- break;
- }
- return (s); /* NULL if not found */
-}
-
-
RTFFont *RTFGetFont(const RTF_Info *info, int num)
{
RTFFont *f;
@@ -1324,59 +1240,6 @@
break;
}
return (c); /* NULL if not found */
-}
-
-
-/* ---------------------------------------------------------------------- */
-
-
-/*
- * Expand style n, if there is such a style.
- */
-
-void RTFExpandStyle(RTF_Info *info, int n)
-{
- RTFStyle *s;
- RTFStyleElt *se;
-
- if (n == -1)
- return;
- s = RTFGetStyle (info, n);
- if (s == NULL)
- return;
- if (s->rtfExpanding != 0)
- ERR ("Style expansion loop, style %d\n", n);
- s->rtfExpanding = 1; /* set expansion flag for loop detection */
- /*
- * Expand "based-on" style (unless it's the same as the current
- * style -- Normal style usually gives itself as its own based-on
- * style). Based-on style expansion is done by synthesizing
- * the token that the writer needs to see in order to trigger
- * another style expansion, and feeding to token back through
- * the router so the writer sees it.
- */
- if (n != s->rtfSBasedOn)
- {
- RTFSetToken (info, rtfControl, rtfParAttr, rtfStyleNum,
- s->rtfSBasedOn, "\\s");
- RTFRouteToken (info);
- }
- /*
- * Now route the tokens unique to this style. RTFSetToken()
- * isn't used because it would add the param value to the end
- * of the token text, which already has it in.
- */
- for (se = s->rtfSSEList; se != NULL; se = se->rtfNextSE)
- {
- info->rtfClass = se->rtfSEClass;
- info->rtfMajor = se->rtfSEMajor;
- info->rtfMinor = se->rtfSEMinor;
- info->rtfParam = se->rtfSEParam;
- lstrcpyA (info->rtfTextBuf, se->rtfSEText);
- info->rtfTextLen = lstrlenA (info->rtfTextBuf);
- RTFRouteToken (info);
- }
- s->rtfExpanding = 0; /* done - clear expansion flag */
}
@@ -2434,14 +2297,6 @@
}
-int RTFHexToChar(int i)
-{
- if (i < 10)
- return (i + '0');
- return (i - 10 + 'a');
-}
-
-
/* ---------------------------------------------------------------------- */
/*
Modified: trunk/reactos/dll/win32/riched20/rtf.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/rtf.h?r…
==============================================================================
--- trunk/reactos/dll/win32/riched20/rtf.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/rtf.h [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -1152,9 +1152,6 @@
int unicodeLength; /* The length of ANSI representation of Unicode characters */
int codePage; /* Current codepage for text conversion */
- char *inputName;
- char *outputName;
-
ME_InStream *stream;
ME_TextEditor *editor;
@@ -1191,26 +1188,19 @@
void RTFInit (RTF_Info *);
void RTFDestroy(RTF_Info *info);
-void RTFSetInputName (RTF_Info *, const char *);
-char *RTFGetInputName (const RTF_Info *);
-void RTFSetOutputName (RTF_Info *, const char *);
-char *RTFGetOutputName (const RTF_Info *);
void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr);
void RTFRead (RTF_Info *);
int RTFGetToken (RTF_Info *); /* writer should rarely need this */
-int RTFPeekToken (RTF_Info *);
void RTFSetReadHook (RTF_Info *, RTFFuncPtr);
void RTFRouteToken (RTF_Info *);
void RTFSkipGroup (RTF_Info *);
void RTFReadGroup (RTF_Info *);
-void RTFExpandStyle (RTF_Info *, int);
int RTFCheckCM (const RTF_Info *, int, int);
int RTFCheckCMM (const RTF_Info *, int, int, int);
int RTFCheckMM (const RTF_Info *, int, int);
RTFFont *RTFGetFont (const RTF_Info *, int);
RTFColor *RTFGetColor (const RTF_Info *, int);
int RTFCharToHex ( char);
-int RTFHexToChar ( int );
void RTFFlushOutputBuffer( RTF_Info *info );
void RTFSetEditStream(RTF_Info *info, ME_InStream *stream);
Modified: trunk/reactos/dll/win32/riched20/run.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched20/run.c?r…
==============================================================================
--- trunk/reactos/dll/win32/riched20/run.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched20/run.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -725,18 +725,6 @@
}
/******************************************************************************
- * ME_MustBeWrapped
- *
- * This should ensure that the given paragraph is wrapped so that its screen
- * row structure may be used. But it doesn't, yet.
- */
-void ME_MustBeWrapped(ME_Context *c, ME_DisplayItem *para)
-{
- assert(para->type == diParagraph);
- /* FIXME */
-}
-
-/******************************************************************************
* ME_SetSelectionCharFormat
*
* Applies a style change, either to a current selection, or to insert cursor
Modified: trunk/reactos/dll/win32/riched32/richedit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/riched32/richedi…
==============================================================================
--- trunk/reactos/dll/win32/riched32/richedit.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/riched32/richedit.c [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -59,7 +59,7 @@
wndClass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW | CS_GLOBALCLASS;
wndClass.lpfnWndProc = RichEdit10ANSIWndProc;
wndClass.cbClsExtra = 0;
- wndClass.cbWndExtra = 4;
+ wndClass.cbWndExtra = sizeof(void *);
wndClass.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
wndClass.lpszClassName = RICHEDIT_CLASS10A; /* WC_RICHED32A; */
Modified: trunk/reactos/include/psdk/richedit.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/richedit.h?re…
==============================================================================
--- trunk/reactos/include/psdk/richedit.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/richedit.h [iso-8859-1] Sun Jun 7 10:19:03 2009
@@ -517,7 +517,7 @@
typedef struct _editstream
{
DWORD_PTR dwCookie;
- DWORD_PTR dwError;
+ DWORD dwError;
EDITSTREAMCALLBACK pfnCallback;
} EDITSTREAM;