Commit 28cb0b68 authored by Thomas Faber's avatar Thomas Faber Committed by Alexandre Julliard

riched20: Constify some ME_Context pointer parameters.

parent 0a44501a
...@@ -214,8 +214,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) DECLSPEC_HIDDEN; ...@@ -214,8 +214,8 @@ void ME_UpdateRepaint(ME_TextEditor *editor, BOOL update_now) DECLSPEC_HIDDEN;
void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor) DECLSPEC_HIDDEN; void ME_EnsureVisible(ME_TextEditor *editor, ME_Cursor *pCursor) DECLSPEC_HIDDEN;
void ME_InvalidateSelection(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_InvalidateSelection(ME_TextEditor *editor) DECLSPEC_HIDDEN;
BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) DECLSPEC_HIDDEN; BOOL ME_SetZoom(ME_TextEditor *editor, int numerator, int denominator) DECLSPEC_HIDDEN;
int ME_twips2pointsX(ME_Context *c, int x) DECLSPEC_HIDDEN; int ME_twips2pointsX(const ME_Context *c, int x) DECLSPEC_HIDDEN;
int ME_twips2pointsY(ME_Context *c, int y) DECLSPEC_HIDDEN; int ME_twips2pointsY(const ME_Context *c, int y) DECLSPEC_HIDDEN;
/* scroll functions in paint.c */ /* scroll functions in paint.c */
...@@ -229,12 +229,12 @@ void ME_ScrollRight(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN; ...@@ -229,12 +229,12 @@ void ME_ScrollRight(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN;
void ME_UpdateScrollBar(ME_TextEditor *editor) DECLSPEC_HIDDEN; void ME_UpdateScrollBar(ME_TextEditor *editor) DECLSPEC_HIDDEN;
/* other functions in paint.c */ /* other functions in paint.c */
int ME_GetParaBorderWidth(ME_Context *c, int flags) DECLSPEC_HIDDEN; int ME_GetParaBorderWidth(const ME_Context *c, int flags) DECLSPEC_HIDDEN;
/* richole.c */ /* richole.c */
LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *) DECLSPEC_HIDDEN; LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *) DECLSPEC_HIDDEN;
void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, ME_Paragraph *para, BOOL selected) DECLSPEC_HIDDEN; void ME_DrawOLE(ME_Context *c, int x, int y, ME_Run* run, ME_Paragraph *para, BOOL selected) DECLSPEC_HIDDEN;
void ME_GetOLEObjectSize(ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN; void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize) DECLSPEC_HIDDEN;
void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN; void ME_CopyReObject(REOBJECT* dst, const REOBJECT* src) DECLSPEC_HIDDEN;
void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN; void ME_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN;
......
...@@ -169,7 +169,7 @@ ME_RewrapRepaint(ME_TextEditor *editor) ...@@ -169,7 +169,7 @@ ME_RewrapRepaint(ME_TextEditor *editor)
ME_Repaint(editor); ME_Repaint(editor);
} }
int ME_twips2pointsX(ME_Context *c, int x) int ME_twips2pointsX(const ME_Context *c, int x)
{ {
if (c->editor->nZoomNumerator == 0) if (c->editor->nZoomNumerator == 0)
return x * c->dpi.cx / 1440; return x * c->dpi.cx / 1440;
...@@ -177,7 +177,7 @@ int ME_twips2pointsX(ME_Context *c, int x) ...@@ -177,7 +177,7 @@ int ME_twips2pointsX(ME_Context *c, int x)
return x * c->dpi.cx * c->editor->nZoomNumerator / 1440 / c->editor->nZoomDenominator; return x * c->dpi.cx * c->editor->nZoomNumerator / 1440 / c->editor->nZoomDenominator;
} }
int ME_twips2pointsY(ME_Context *c, int y) int ME_twips2pointsY(const ME_Context *c, int y)
{ {
if (c->editor->nZoomNumerator == 0) if (c->editor->nZoomNumerator == 0)
return y * c->dpi.cy / 1440; return y * c->dpi.cy / 1440;
...@@ -489,7 +489,7 @@ static const COLORREF pen_colors[16] = { ...@@ -489,7 +489,7 @@ static const COLORREF pen_colors[16] = {
/* Dark gray */ RGB(0x80, 0x80, 0x80), /* Light gray */ RGB(0xc0, 0xc0, 0xc0), /* Dark gray */ RGB(0x80, 0x80, 0x80), /* Light gray */ RGB(0xc0, 0xc0, 0xc0),
}; };
static int ME_GetBorderPenWidth(ME_Context* c, int idx) static int ME_GetBorderPenWidth(const ME_Context* c, int idx)
{ {
int width = border_details[idx].width; int width = border_details[idx].width;
...@@ -502,7 +502,7 @@ static int ME_GetBorderPenWidth(ME_Context* c, int idx) ...@@ -502,7 +502,7 @@ static int ME_GetBorderPenWidth(ME_Context* c, int idx)
return width; return width;
} }
int ME_GetParaBorderWidth(ME_Context* c, int flags) int ME_GetParaBorderWidth(const ME_Context* c, int flags)
{ {
int idx = (flags >> 8) & 0xF; int idx = (flags >> 8) & 0xF;
int width; int width;
......
...@@ -1526,7 +1526,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj) ...@@ -1526,7 +1526,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
return 1; return 1;
} }
static void convert_sizel(ME_Context *c, const SIZEL* szl, SIZE* sz) static void convert_sizel(const ME_Context *c, const SIZEL* szl, SIZE* sz)
{ {
/* sizel is in .01 millimeters, sz in pixels */ /* sizel is in .01 millimeters, sz in pixels */
sz->cx = MulDiv(szl->cx, c->dpi.cx, 2540); sz->cx = MulDiv(szl->cx, c->dpi.cx, 2540);
...@@ -1538,7 +1538,7 @@ static void convert_sizel(ME_Context *c, const SIZEL* szl, SIZE* sz) ...@@ -1538,7 +1538,7 @@ static void convert_sizel(ME_Context *c, const SIZEL* szl, SIZE* sz)
* *
* Sets run extent for OLE objects. * Sets run extent for OLE objects.
*/ */
void ME_GetOLEObjectSize(ME_Context *c, ME_Run *run, SIZE *pSize) void ME_GetOLEObjectSize(const ME_Context *c, ME_Run *run, SIZE *pSize)
{ {
IDataObject* ido; IDataObject* ido;
FORMATETC fmt; FORMATETC fmt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment