From b1f5848136bf39e4373d9367adf33cdebe738758 Mon Sep 17 00:00:00 2001
From: Thomas Faber <thfabba@gmx.de>
Date: Sat, 22 Oct 2011 18:11:27 +0200
Subject: riched20: constify some ME_Context pointer parameters

---
 dlls/riched20/editor.h  |    8 ++++----
 dlls/riched20/paint.c   |    8 ++++----
 dlls/riched20/richole.c |    4 ++--
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index a0387ac..8cded51 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -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_InvalidateSelection(ME_TextEditor *editor) 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_twips2pointsY(ME_Context *c, int y) DECLSPEC_HIDDEN;
+int  ME_twips2pointsX(const ME_Context *c, int x) DECLSPEC_HIDDEN;
+int  ME_twips2pointsY(const ME_Context *c, int y) DECLSPEC_HIDDEN;
 
 /* scroll functions in paint.c */
 
@@ -229,12 +229,12 @@ void ME_ScrollRight(ME_TextEditor *editor, int cx) DECLSPEC_HIDDEN;
 void ME_UpdateScrollBar(ME_TextEditor *editor) DECLSPEC_HIDDEN;
 
 /* 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 */
 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_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_DeleteReObject(REOBJECT* reo) DECLSPEC_HIDDEN;
 
diff --git a/dlls/riched20/paint.c b/dlls/riched20/paint.c
index 0655010..6b13fb5 100644
--- a/dlls/riched20/paint.c
+++ b/dlls/riched20/paint.c
@@ -169,7 +169,7 @@ ME_RewrapRepaint(ME_TextEditor *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)
     return x * c->dpi.cx / 1440;
@@ -177,7 +177,7 @@ int ME_twips2pointsX(ME_Context *c, int x)
     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)
     return y * c->dpi.cy / 1440;
@@ -489,7 +489,7 @@ static const COLORREF pen_colors[16] = {
   /* 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;
 
@@ -502,7 +502,7 @@ static int ME_GetBorderPenWidth(ME_Context* c, int idx)
   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 width;
diff --git a/dlls/riched20/richole.c b/dlls/riched20/richole.c
index 840678d..8e90204 100644
--- a/dlls/riched20/richole.c
+++ b/dlls/riched20/richole.c
@@ -1526,7 +1526,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
     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 */
   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)
  *
  * 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;
   FORMATETC     fmt;
-- 
1.7.1.GIT
