mirror of
https://github.com/reactos/reactos.git
synced 2025-04-21 04:37:15 +00:00
sync riched20 and riched32 with wine 1.1.23
svn path=/trunk/; revision=41316
This commit is contained in:
parent
a4aa79b0d7
commit
c3112d1170
9 changed files with 7 additions and 176 deletions
|
@ -168,7 +168,7 @@ int ME_SetSelection(ME_TextEditor *editor, int from, int to)
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
ME_GetCursorCoordinates(ME_TextEditor *editor, ME_Cursor *pCursor,
|
||||
int *x, int *y, int *height)
|
||||
{
|
||||
|
|
|
@ -282,6 +282,7 @@ static HRESULT WINAPI DataObjectImpl_EnumFormatEtc(IDataObject* iface, DWORD dwD
|
|||
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);
|
||||
|
|
|
@ -2901,7 +2901,7 @@ get_msg_name(UINT msg)
|
|||
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 @@ static BOOL ME_RegisterEditorClass(HINSTANCE hInstance)
|
|||
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);
|
||||
|
|
|
@ -171,9 +171,6 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
|
|||
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);
|
||||
|
|
|
@ -226,10 +226,6 @@ void RTFInit(RTF_Info *info)
|
|||
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++)
|
||||
|
@ -277,39 +273,6 @@ void RTFInit(RTF_Info *info)
|
|||
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
|
||||
*/
|
||||
|
@ -483,14 +446,6 @@ static void RTFUngetToken(RTF_Info *info)
|
|||
}
|
||||
|
||||
|
||||
int RTFPeekToken(RTF_Info *info)
|
||||
{
|
||||
_RTFGetToken (info);
|
||||
RTFUngetToken (info);
|
||||
return (info->rtfClass);
|
||||
}
|
||||
|
||||
|
||||
static void _RTFGetToken(RTF_Info *info)
|
||||
{
|
||||
if (info->rtfFormat == SF_TEXT)
|
||||
|
@ -795,29 +750,6 @@ static int GetChar(RTF_Info *info)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* 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 @@ static void ReadObjGroup(RTF_Info *info)
|
|||
* 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;
|
||||
|
@ -1327,59 +1243,6 @@ RTFColor *RTFGetColor(const RTF_Info *info, int num)
|
|||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
|
||||
/*
|
||||
* 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 RTFCharToHex(char c)
|
|||
}
|
||||
|
||||
|
||||
int RTFHexToChar(int i)
|
||||
{
|
||||
if (i < 10)
|
||||
return (i + '0');
|
||||
return (i - 10 + 'a');
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
|
|
|
@ -1152,9 +1152,6 @@ struct _RTF_Info {
|
|||
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 @@ struct _RTF_Info {
|
|||
|
||||
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);
|
||||
|
|
|
@ -724,18 +724,6 @@ void ME_CalcRunExtent(ME_Context *c, const ME_Paragraph *para, int startx, ME_Ru
|
|||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* 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
|
||||
*
|
||||
|
|
|
@ -59,7 +59,7 @@ static BOOL RICHED32_Register(void)
|
|||
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; */
|
||||
|
|
|
@ -517,7 +517,7 @@ DECL_WINELIB_TYPE_AW(TEXTRANGE)
|
|||
typedef struct _editstream
|
||||
{
|
||||
DWORD_PTR dwCookie;
|
||||
DWORD_PTR dwError;
|
||||
DWORD dwError;
|
||||
EDITSTREAMCALLBACK pfnCallback;
|
||||
} EDITSTREAM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue