riched20: Turn several constants and variables into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
235063d862
commit
55a3dfe35e
|
@ -2520,11 +2520,11 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
|
|||
|
||||
if (editor->styleFlags & ES_MULTILINE)
|
||||
{
|
||||
static const WCHAR endl = '\r';
|
||||
static const WCHAR endlv10[] = {'\r','\n'};
|
||||
ME_Cursor cursor = editor->pCursors[0];
|
||||
ME_DisplayItem *para = cursor.pPara;
|
||||
int from, to;
|
||||
const WCHAR endl = '\r';
|
||||
const WCHAR endlv10[] = {'\r','\n'};
|
||||
ME_Style *style, *eop_style;
|
||||
|
||||
if (editor->styleFlags & ES_READONLY) {
|
||||
|
|
|
@ -989,7 +989,7 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph)
|
|||
}
|
||||
if (me_debug)
|
||||
{
|
||||
const WCHAR wszRowDebug[] = {'r','o','w','[','%','d',']',0};
|
||||
static const WCHAR wszRowDebug[] = {'r','o','w','[','%','d',']',0};
|
||||
WCHAR buf[128];
|
||||
POINT pt = c->pt;
|
||||
wsprintfW(buf, wszRowDebug, no);
|
||||
|
@ -1017,7 +1017,7 @@ static void ME_DrawParagraph(ME_Context *c, ME_DisplayItem *paragraph)
|
|||
c->pt.y + para->pt.y + run->pt.y + baseline, p, para);
|
||||
if (me_debug)
|
||||
{
|
||||
const WCHAR wszRunDebug[] = {'[','%','d',':','%','x',']',' ','%','l','s',0};
|
||||
static const WCHAR wszRunDebug[] = {'[','%','d',':','%','x',']',' ','%','l','s',0};
|
||||
WCHAR buf[2560];
|
||||
POINT pt;
|
||||
pt.x = c->pt.x + run->pt.x;
|
||||
|
|
|
@ -152,6 +152,7 @@ void add_marked_para(ME_TextEditor *editor, ME_DisplayItem *di)
|
|||
|
||||
void ME_MakeFirstParagraph(ME_TextEditor *editor)
|
||||
{
|
||||
static const WCHAR cr_lf[] = {'\r','\n',0};
|
||||
ME_Context c;
|
||||
CHARFORMAT2W cf;
|
||||
const CHARFORMATW *host_cf;
|
||||
|
@ -162,7 +163,6 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
|
|||
ME_DisplayItem *run;
|
||||
ME_Style *style;
|
||||
int eol_len;
|
||||
WCHAR cr_lf[] = {'\r','\n',0};
|
||||
|
||||
ME_InitContext(&c, editor, ITextHost_TxGetDC(editor->texthost));
|
||||
|
||||
|
|
|
@ -612,8 +612,8 @@ int ME_PointFromChar(ME_TextEditor *editor, ME_Run *pRun, int nOffset, BOOL visu
|
|||
SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, int nLen,
|
||||
int startx, int *pAscent, int *pDescent)
|
||||
{
|
||||
static const WCHAR spaceW[] = {' ',0};
|
||||
SIZE size;
|
||||
WCHAR spaceW[] = {' ',0};
|
||||
|
||||
nLen = min( nLen, run->len );
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(richedit_lists);
|
||||
|
||||
static const WCHAR cr_lf[] = {'\r', '\n', 0};
|
||||
|
||||
static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor,
|
||||
int nCursor,
|
||||
const WCHAR *eol_str, int eol_len,
|
||||
|
@ -77,7 +79,6 @@ static ME_DisplayItem* ME_InsertEndParaFromCursor(ME_TextEditor *editor,
|
|||
ME_DisplayItem* ME_InsertTableRowStartFromCursor(ME_TextEditor *editor)
|
||||
{
|
||||
ME_DisplayItem *para;
|
||||
WCHAR cr_lf[] = {'\r', '\n', 0};
|
||||
para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWSTART);
|
||||
return para->member.para.prev_para;
|
||||
}
|
||||
|
@ -128,7 +129,6 @@ ME_DisplayItem* ME_InsertTableCellFromCursor(ME_TextEditor *editor)
|
|||
ME_DisplayItem* ME_InsertTableRowEndFromCursor(ME_TextEditor *editor)
|
||||
{
|
||||
ME_DisplayItem *para;
|
||||
WCHAR cr_lf[] = {'\r', '\n', 0};
|
||||
para = ME_InsertEndParaFromCursor(editor, 0, cr_lf, 2, MEPF_ROWEND);
|
||||
return para->member.para.prev_para;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue