From: Huw Davies Subject: Re: [PATCH v3 3/6] riched20: Use combined flags for toggling CRLF and EOP. Message-Id: <20210607124745.GD18069@merlot.physics.ox.ac.uk> Date: Mon, 7 Jun 2021 13:47:45 +0100 In-Reply-To: <20210529140142.29834-3-jzeng@codeweavers.com> References: <20210529140142.29834-1-jzeng@codeweavers.com> <20210529140142.29834-3-jzeng@codeweavers.com> On Sat, May 29, 2021 at 10:01:39PM +0800, Jactry Zeng wrote: > Signed-off-by: Jactry Zeng > --- > dlls/riched20/clipboard.c | 2 +- > dlls/riched20/editor.c | 22 ++++++++++------------ > dlls/riched20/editor.h | 2 +- > dlls/riched20/editstr.h | 6 ++++++ > dlls/riched20/richole.c | 6 +++--- > dlls/riched20/txtsrv.c | 2 +- > 6 files changed, 22 insertions(+), 18 deletions(-) > > @@ -277,7 +277,7 @@ void ME_DestroyEditor(ME_TextEditor *editor) DECLSPEC_HIDDEN; > LRESULT editor_handle_message( ME_TextEditor *editor, UINT msg, WPARAM wParam, > LPARAM lParam, HRESULT* phresult ) DECLSPEC_HIDDEN; > int ME_GetTextW(ME_TextEditor *editor, WCHAR *buffer, int buflen, > - const ME_Cursor *start, int srcChars, BOOL bCRLF, BOOL bEOP) DECLSPEC_HIDDEN; > + const ME_Cursor *start, int srcChars, DWORD flags) DECLSPEC_HIDDEN; While we're at it, let's change the name to editor_get_text(). > void ME_RTFCharAttrHook(struct _RTF_Info *info) DECLSPEC_HIDDEN; > void ME_RTFParAttrHook(struct _RTF_Info *info) DECLSPEC_HIDDEN; > void ME_RTFTblAttrHook(struct _RTF_Info *info) DECLSPEC_HIDDEN; > diff --git a/dlls/riched20/editstr.h b/dlls/riched20/editstr.h > index 22cfd74722c..7ede0f6a207 100644 > --- a/dlls/riched20/editstr.h > +++ b/dlls/riched20/editstr.h > @@ -98,6 +98,12 @@ typedef enum { > > #define SELECTIONBAR_WIDTH 8 > > +/* Flags used in ME_GetTextW() */ > +#define MEGT_DEFAULT 0x00000000 > +#define MEGT_USECRLF 0x00000001 /* Translate each CR into a CR/LF. */ You can use the GT_ defines for these. > +#define MEGT_USEEOP 0x00000002 /* Append EOP. */ This could be WINE_GT_USEEOP > +#define MEGT_NOOLEOBJ 0x00000004 /* Replace OLE object mark with a space. */ Wouldn't GT_RAWTEXT do what we want here? Huw.