43 item->member.para.next_marked =
item->member.para.prev_marked =
NULL;
54 item->member.para.nWidth = 0;
74 total_width =
max(total_width, para->
nWidth);
171 cf.cbSize =
sizeof(
cf);
182 cf.yHeight = (lf.
lfHeight * 72 * 1440) / (
c.dpi.cy *
c.dpi.cy);
199 cf.cbSize =
sizeof(
cf);
218 text->pFirst->member.para.next_para = para;
219 text->pLast->member.para.prev_para = para;
262 return item->wNumbering ==
base->wNumbering &&
263 item->wNumberingStart ==
base->wNumberingStart &&
264 item->wNumberingStyle ==
base->wNumberingStyle &&
286 static const WCHAR fmtW[] = {
'%',
'd', 0};
287 static const WORD letter_base[] = { 1, 26, 26 * 26, 26 * 26 * 26 };
298 {50000,
'P'}, {10000,
'O'}, {5000,
'N'}, {1000,
'M'},
299 {500,
'D'}, {100,
'C'}, {50,
'L'}, {10,
'X'}, {5,
'V'}, {1,
'I'}
319 char_offset =
'a' -
'A';
334 num -= letter_base[
i];
335 letter = (
num / letter_base[
i]) % 26;
336 p[
len -
i - 1] = letter +
'A' + char_offset;
343 char_offset =
'a' -
'A';
353 total = roman_base[
i].base + 4 * roman_base[
i + 1].base;
355 total = 4 * roman_base[
i].base;
359 *
p++ = roman_base[(
i & ~1) + 1].letter + char_offset;
360 *
p++ = roman_base[
i - 1].letter + char_offset;
366 len =
num / roman_base[
i].base;
369 *
p++ = roman_base[
i].letter + char_offset;
370 num -= roman_base[
i].base;
399 static const WCHAR bullet_font[] = {
'S',
'y',
'm',
'b',
'o',
'l',0};
400 static const WCHAR bullet_str[] = {0xb7, 0};
413 cf.cbSize =
sizeof(
cf);
415 memcpy(
cf.szFaceName, bullet_font,
sizeof(bullet_font) );
482#define COPY_FIELD(m, f) \
483 if (dwMask & (m)) { \
484 para->fmt.dwMask |= m; \
485 para->fmt.f = pFmt->f; \
501#define EFFECTS_MASK (PFM_RTLPARA|PFM_KEEP|PFM_KEEPNEXT|PFM_PAGEBREAKBEFORE| \
502 PFM_NOLINENUMBER|PFM_NOWIDOWCONTROL|PFM_DONOTHYPHEN|PFM_SIDEBYSIDE| \
560 assert(!(paraFlags & (paraFlags-1)));
688 BOOL keepFirstParaFormat)
702 if (
tp->member.para.fmt.wNumbering)
705 pNext =
tp->member.para.next_para;
720 endCur.
pPara = pNext;
734 for (pTmp = pRun->
next; pTmp != pNext; pTmp = pTmp->
next)
756 if (!keepFirstParaFormat)
824#define DUMP(mask, name, fmt, field) \
825 if (pFmt->dwMask & (mask)) p += sprintf(p, "%-22s" fmt "\n", name, pFmt->field); \
826 else p += sprintf(p, "%-22sN/A\n", name);
829#define DUMP_EFFECT(mask, name) \
830 p += sprintf(p, "%-22s%s\n", name, (pFmt->dwMask & (mask)) ? ((pFmt->wEffects & ((mask) >> 16)) ? "yes" : "no") : "N/A");
855 else p +=
sprintf(
p,
"Alignment: N/A\n");
889 if (*para == *para_end)
892 if ((*para_end)->member.para.nCharOfs < (*para)->member.para.nCharOfs) {
915 if (para == para_end)
952 while (para != para_end)
957#define CHECK_FIELD(m, f) \
958 if (pFmt->f != curFmt->f) pFmt->dwMask &= ~(m);
968 pFmt->
dwMask &= ~PFM_TABSTOPS;
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
struct outqueuenode * head
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
LCID WINAPI GetSystemDefaultLCID(void)
void ME_DestroyContext(ME_Context *c)
void ME_InitContext(ME_Context *c, ME_TextEditor *editor, HDC hDC)
static const WCHAR cr_lf[]
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
__kernel_ptrdiff_t ptrdiff_t
void ME_ReleaseStyle(ME_Style *item) DECLSPEC_HIDDEN
void ME_InitCharFormat2W(CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
#define ITextHost_OnTxParaFormatChange(This, a)
void ME_AddRefStyle(ME_Style *item) DECLSPEC_HIDDEN
BOOL cfany_to_cf2w(CHARFORMAT2W *to, const CHARFORMAT2W *from) DECLSPEC_HIDDEN
void ME_CheckCharOffsets(ME_TextEditor *editor) DECLSPEC_HIDDEN
ME_Style * ME_ApplyStyle(ME_TextEditor *ed, ME_Style *sSrc, CHARFORMAT2W *style) DECLSPEC_HIDDEN
void ME_DestroyDisplayItem(ME_DisplayItem *item) DECLSPEC_HIDDEN
ME_DisplayItem * ME_MakeRun(ME_Style *s, int nFlags) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemBack(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
void select_style(ME_Context *c, ME_Style *s) DECLSPEC_HIDDEN
void ME_PropagateCharOffset(ME_DisplayItem *p, int shift) DECLSPEC_HIDDEN
#define ITextHost_TxGetParaFormat(This, a)
ME_Style * ME_MakeStyle(CHARFORMAT2W *style) DECLSPEC_HIDDEN
ME_String * ME_MakeStringConst(const WCHAR *str, int len) DECLSPEC_HIDDEN
ME_String * ME_MakeStringN(LPCWSTR szText, int nMaxChars) DECLSPEC_HIDDEN
#define ITextHost_TxGetDC(This)
BOOL ME_AppendString(ME_String *s, const WCHAR *append, int len) DECLSPEC_HIDDEN
void ME_SetDefaultCharFormat(ME_TextEditor *editor, CHARFORMAT2W *mod) DECLSPEC_HIDDEN
void ME_Remove(ME_DisplayItem *diWhere) DECLSPEC_HIDDEN
BOOL add_undo_set_para_fmt(ME_TextEditor *, const ME_Paragraph *para) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemBackOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
ME_String * ME_MakeStringEmpty(int len) DECLSPEC_HIDDEN
BOOL add_undo_join_paras(ME_TextEditor *, int pos) DECLSPEC_HIDDEN
void ME_InsertBefore(ME_DisplayItem *diWhere, ME_DisplayItem *diWhat) DECLSPEC_HIDDEN
void ME_DestroyString(ME_String *s) DECLSPEC_HIDDEN
ME_DisplayItem * ME_MakeDI(ME_DIType type) DECLSPEC_HIDDEN
BOOL add_undo_split_para(ME_TextEditor *, const ME_Paragraph *para, ME_String *eol_str, const ME_Cell *cell) DECLSPEC_HIDDEN
ME_DisplayItem * ME_FindItemFwd(ME_DisplayItem *di, ME_DIType nTypeOrClass) DECLSPEC_HIDDEN
#define ITextHost_TxGetCharFormat(This, a)
ME_String * ME_VSplitString(ME_String *orig, int nVPos) DECLSPEC_HIDDEN
void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, CHARFORMAT2W *pFmt) DECLSPEC_HIDDEN
BOOL ME_PrevRun(ME_DisplayItem **para, ME_DisplayItem **run, BOOL all_para) DECLSPEC_HIDDEN
static const char * debugstr_run(const ME_Run *run)
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const WCHAR spaceW[]
void destroy_para(ME_TextEditor *editor, ME_DisplayItem *item)
static void ME_UpdateTableFlags(ME_DisplayItem *para)
ME_DisplayItem * get_di_from_para(ME_Paragraph *para)
static ME_String * para_num_get_str(ME_Paragraph *para, WORD num)
ME_DisplayItem * ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp, BOOL keepFirstParaFormat)
#define DUMP(mask, name, fmt, field)
static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PARAFORMAT2 *pFmt)
ME_DisplayItem * ME_GetParagraph(ME_DisplayItem *item)
void remove_marked_para(ME_TextEditor *editor, ME_DisplayItem *di)
BOOL ME_SetSelectionParaFormat(ME_TextEditor *editor, const PARAFORMAT2 *pFmt)
void ME_MarkAllForWrapping(ME_TextEditor *editor)
void para_num_init(ME_Context *c, ME_Paragraph *para)
void ME_DumpParaStyleToBuf(const PARAFORMAT2 *pFmt, char buf[2048])
void mark_para_rewrap(ME_TextEditor *editor, ME_DisplayItem *para)
void ME_SetDefaultParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
static int para_num_get_num(ME_Paragraph *para)
void para_num_clear(struct para_num *pn)
static ME_DisplayItem * make_para(ME_TextEditor *editor)
#define CHECK_FIELD(m, f)
void ME_GetSelectionParas(ME_TextEditor *editor, ME_DisplayItem **para, ME_DisplayItem **para_end)
#define DUMP_EFFECT(mask, name)
ME_DisplayItem * ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run, ME_Style *style, const WCHAR *eol_str, int eol_len, int paraFlags)
static void ME_GetParaFormat(ME_TextEditor *editor, const ME_DisplayItem *para, PARAFORMAT2 *pFmt)
int get_total_width(ME_TextEditor *editor)
void ME_MakeFirstParagraph(ME_TextEditor *editor)
static BOOL para_num_same_list(const PARAFORMAT2 *item, const PARAFORMAT2 *base)
static void ME_MarkForWrapping(ME_TextEditor *editor, ME_DisplayItem *first, const ME_DisplayItem *last)
static void para_num_clear_list(ME_TextEditor *editor, ME_Paragraph *para, const PARAFORMAT2 *orig_fmt)
void add_marked_para(ME_TextEditor *editor, ME_DisplayItem *di)
#define PFM_NUMBERINGSTYLE
struct _paraformat2 PARAFORMAT2
#define PFM_NOWIDOWCONTROL
#define PFM_PAGEBREAKBEFORE
#define CFE_AUTOBACKCOLOR
#define PFM_TABLEROWDELIMITER
#define CFM_UNDERLINETYPE
#define PFE_TABLEROWDELIMITER
#define PFM_NUMBERINGSTART
#define offsetof(TYPE, MEMBER)
WCHAR lfFaceName[LF_FACESIZE]
struct tagME_DisplayItem * prev_cell
struct tagME_DisplayItem * parent_cell
struct tagME_DisplayItem * next_cell
union tagME_DisplayItem::@536 member
struct tagME_DisplayItem * next
struct tagME_DisplayItem * next_para
struct tagME_DisplayItem * next_marked
struct tagME_DisplayItem * prev_marked
struct tagME_DisplayItem * prev_para
struct tagME_DisplayItem * pCell
struct tagME_Paragraph * para
ME_DisplayItem * pLastSelEndPara
ME_DisplayItem * pLastSelStartPara
ME_DisplayItem * first_marked_para
HGDIOBJ WINAPI GetStockObject(_In_ int)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
BOOL WINAPI GetTextExtentPointW(_In_ HDC hdc, _In_reads_(c) LPCWSTR lpString, _In_ int c, _Out_ LPSIZE lpsz)