riched20: Embed PARAFORMAT2 in the paragraph struct rather than its ptr.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
04f8ecd956
commit
b3b5c25628
|
@ -445,7 +445,7 @@ BOOL ME_InternalDeleteText(ME_TextEditor *editor, ME_Cursor *start,
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (delete_all) ME_SetDefaultParaFormat( editor, start_para->member.para.pFmt );
|
||||
if (delete_all) ME_SetDefaultParaFormat( editor, &start_para->member.para.fmt );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -908,8 +908,8 @@ static ME_DisplayItem* ME_FindPixelPosInTableRow(int x, int y,
|
|||
/* Return table row delimiter */
|
||||
para = ME_FindItemFwd(cell, diParagraph);
|
||||
assert(para->member.para.nFlags & MEPF_ROWEND);
|
||||
assert(para->member.para.pFmt->dwMask & PFM_TABLEROWDELIMITER);
|
||||
assert(para->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER);
|
||||
assert(para->member.para.fmt.dwMask & PFM_TABLEROWDELIMITER);
|
||||
assert(para->member.para.fmt.wEffects & PFE_TABLEROWDELIMITER);
|
||||
return para;
|
||||
}
|
||||
|
||||
|
|
|
@ -902,7 +902,7 @@ void ME_RTFTblAttrHook(RTF_Info *info)
|
|||
/* Tab stops were used to store cell positions before v4.1 but v4.1
|
||||
* still seems to set the tabstops without using them. */
|
||||
ME_DisplayItem *para = info->editor->pCursors[0].pPara;
|
||||
PARAFORMAT2 *pFmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = ¶->member.para.fmt;
|
||||
pFmt->rgxTabs[cellNum] &= ~0x00FFFFFF;
|
||||
pFmt->rgxTabs[cellNum] |= 0x00FFFFFF & info->rtfParam;
|
||||
}
|
||||
|
@ -973,7 +973,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
|
|||
}
|
||||
} else { /* v1.0 - v3.0 */
|
||||
ME_DisplayItem *para = info->editor->pCursors[0].pPara;
|
||||
PARAFORMAT2 *pFmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = ¶->member.para.fmt;
|
||||
if (pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE &&
|
||||
tableDef->numCellsInserted < tableDef->numCellsDefined)
|
||||
{
|
||||
|
@ -1059,8 +1059,8 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
|
|||
}
|
||||
|
||||
para = ME_InsertTableRowEndFromCursor(info->editor);
|
||||
para->member.para.pFmt->dxOffset = abs(info->tableDef->gapH);
|
||||
para->member.para.pFmt->dxStartIndent = info->tableDef->leftEdge;
|
||||
para->member.para.fmt.dxOffset = abs(info->tableDef->gapH);
|
||||
para->member.para.fmt.dxStartIndent = info->tableDef->leftEdge;
|
||||
ME_ApplyBorderProperties(info, ¶->member.para.border,
|
||||
tableDef->border);
|
||||
info->nestingLevel--;
|
||||
|
@ -1082,7 +1082,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
|
|||
} else { /* v1.0 - v3.0 */
|
||||
WCHAR endl = '\r';
|
||||
ME_DisplayItem *para = info->editor->pCursors[0].pPara;
|
||||
PARAFORMAT2 *pFmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = ¶->member.para.fmt;
|
||||
pFmt->dxOffset = info->tableDef->gapH;
|
||||
pFmt->dxStartIndent = info->tableDef->leftEdge;
|
||||
|
||||
|
@ -1109,7 +1109,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
|
|||
PARAFORMAT2 *pFmt;
|
||||
RTFFlushOutputBuffer(info);
|
||||
para = info->editor->pCursors[0].pPara;
|
||||
pFmt = para->member.para.pFmt;
|
||||
pFmt = ¶->member.para.fmt;
|
||||
if (pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE)
|
||||
{
|
||||
/* rtfPar is treated like a space within a table. */
|
||||
|
@ -1526,7 +1526,7 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
|
|||
ME_GetTextLength(editor), FALSE);
|
||||
from = to = 0;
|
||||
ME_ClearTempStyle(editor);
|
||||
ME_SetDefaultParaFormat(editor, editor->pCursors[0].pPara->member.para.pFmt);
|
||||
ME_SetDefaultParaFormat(editor, &editor->pCursors[0].pPara->member.para.fmt);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2333,7 +2333,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
|
|||
ME_InsertTextFromCursor(editor, 0, &endl, 1,
|
||||
editor->pCursors[0].pRun->member.run.style);
|
||||
para = editor->pBuffer->pFirst->member.para.next_para;
|
||||
ME_SetDefaultParaFormat(editor, para->member.para.pFmt);
|
||||
ME_SetDefaultParaFormat(editor, ¶->member.para.fmt);
|
||||
para->member.para.nFlags = MEPF_REWRAP;
|
||||
editor->pCursors[0].pPara = para;
|
||||
editor->pCursors[0].pRun = ME_FindItemFwd(para, diRun);
|
||||
|
|
|
@ -189,7 +189,7 @@ typedef struct tagME_BorderRect
|
|||
|
||||
typedef struct tagME_Paragraph
|
||||
{
|
||||
PARAFORMAT2 *pFmt;
|
||||
PARAFORMAT2 fmt;
|
||||
ME_String *text;
|
||||
|
||||
struct tagME_DisplayItem *pCell; /* v4.1 */
|
||||
|
|
|
@ -163,7 +163,6 @@ void ME_DestroyDisplayItem(ME_DisplayItem *item)
|
|||
TRACE("type=%s\n", ME_GetDITypeName(item->type));
|
||||
if (item->type==diParagraph)
|
||||
{
|
||||
FREE_OBJ(item->member.para.pFmt);
|
||||
ME_DestroyString(item->member.para.text);
|
||||
}
|
||||
|
||||
|
|
|
@ -553,16 +553,16 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
BOOL hasParaBorder;
|
||||
|
||||
SetRectEmpty(bounds);
|
||||
if (!(para->pFmt->dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return;
|
||||
if (!(para->fmt.dwMask & (PFM_BORDER | PFM_SPACEBEFORE | PFM_SPACEAFTER))) return;
|
||||
|
||||
border_width = top_border = bottom_border = 0;
|
||||
idx = (para->pFmt->wBorders >> 8) & 0xF;
|
||||
idx = (para->fmt.wBorders >> 8) & 0xF;
|
||||
hasParaBorder = (!(c->editor->bEmulateVersion10 &&
|
||||
para->pFmt->dwMask & PFM_TABLE &&
|
||||
para->pFmt->wEffects & PFE_TABLE) &&
|
||||
(para->pFmt->dwMask & PFM_BORDER) &&
|
||||
para->fmt.dwMask & PFM_TABLE &&
|
||||
para->fmt.wEffects & PFE_TABLE) &&
|
||||
(para->fmt.dwMask & PFM_BORDER) &&
|
||||
idx != 0 &&
|
||||
(para->pFmt->wBorders & 0xF));
|
||||
(para->fmt.wBorders & 0xF));
|
||||
if (hasParaBorder)
|
||||
{
|
||||
/* FIXME: wBorders is not stored as MSDN says in v1.0 - 4.1 of richedit
|
||||
|
@ -589,29 +589,29 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
* 0x0F00 bottom right
|
||||
* 0xF000 right bottom
|
||||
*/
|
||||
if (para->pFmt->wBorders & 0x00B0)
|
||||
FIXME("Unsupported border flags %x\n", para->pFmt->wBorders);
|
||||
border_width = ME_GetParaBorderWidth(c, para->pFmt->wBorders);
|
||||
if (para->pFmt->wBorders & 4) top_border = border_width;
|
||||
if (para->pFmt->wBorders & 8) bottom_border = border_width;
|
||||
if (para->fmt.wBorders & 0x00B0)
|
||||
FIXME("Unsupported border flags %x\n", para->fmt.wBorders);
|
||||
border_width = ME_GetParaBorderWidth(c, para->fmt.wBorders);
|
||||
if (para->fmt.wBorders & 4) top_border = border_width;
|
||||
if (para->fmt.wBorders & 8) bottom_border = border_width;
|
||||
}
|
||||
|
||||
if (para->pFmt->dwMask & PFM_SPACEBEFORE)
|
||||
if (para->fmt.dwMask & PFM_SPACEBEFORE)
|
||||
{
|
||||
rc.left = c->rcView.left;
|
||||
rc.right = c->rcView.right;
|
||||
rc.top = y;
|
||||
bounds->top = ME_twips2pointsY(c, para->pFmt->dySpaceBefore);
|
||||
bounds->top = ME_twips2pointsY(c, para->fmt.dySpaceBefore);
|
||||
rc.bottom = y + bounds->top + top_border;
|
||||
FillRect(c->hDC, &rc, c->editor->hbrBackground);
|
||||
}
|
||||
|
||||
if (para->pFmt->dwMask & PFM_SPACEAFTER)
|
||||
if (para->fmt.dwMask & PFM_SPACEAFTER)
|
||||
{
|
||||
rc.left = c->rcView.left;
|
||||
rc.right = c->rcView.right;
|
||||
rc.bottom = y + para->nHeight;
|
||||
bounds->bottom = ME_twips2pointsY(c, para->pFmt->dySpaceAfter);
|
||||
bounds->bottom = ME_twips2pointsY(c, para->fmt.dySpaceAfter);
|
||||
rc.top = rc.bottom - bounds->bottom - bottom_border;
|
||||
FillRect(c->hDC, &rc, c->editor->hbrBackground);
|
||||
}
|
||||
|
@ -624,11 +624,11 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
HPEN pen = NULL, oldpen = NULL;
|
||||
POINT pt;
|
||||
|
||||
if (para->pFmt->wBorders & 64) /* autocolor */
|
||||
if (para->fmt.wBorders & 64) /* autocolor */
|
||||
pencr = ITextHost_TxGetSysColor(c->editor->texthost,
|
||||
COLOR_WINDOWTEXT);
|
||||
else
|
||||
pencr = pen_colors[(para->pFmt->wBorders >> 12) & 0xF];
|
||||
pencr = pen_colors[(para->fmt.wBorders >> 12) & 0xF];
|
||||
|
||||
rightEdge = c->pt.x + max(c->editor->sizeWindow.cx,
|
||||
c->editor->nTotalWidth);
|
||||
|
@ -641,9 +641,9 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
/* before & after spaces are not included in border */
|
||||
|
||||
/* helper to draw the double lines in case of corner */
|
||||
#define DD(x) ((para->pFmt->wBorders & (x)) ? (pen_width + 1) : 0)
|
||||
#define DD(x) ((para->fmt.wBorders & (x)) ? (pen_width + 1) : 0)
|
||||
|
||||
if (para->pFmt->wBorders & 1)
|
||||
if (para->fmt.wBorders & 1)
|
||||
{
|
||||
MoveToEx(c->hDC, c->pt.x, y + bounds->top, NULL);
|
||||
LineTo(c->hDC, c->pt.x, y + para->nHeight - bounds->bottom);
|
||||
|
@ -658,7 +658,7 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
}
|
||||
bounds->left += border_width;
|
||||
}
|
||||
if (para->pFmt->wBorders & 2)
|
||||
if (para->fmt.wBorders & 2)
|
||||
{
|
||||
MoveToEx(c->hDC, rightEdge - 1, y + bounds->top, NULL);
|
||||
LineTo(c->hDC, rightEdge - 1, y + para->nHeight - bounds->bottom);
|
||||
|
@ -673,7 +673,7 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
}
|
||||
bounds->right += border_width;
|
||||
}
|
||||
if (para->pFmt->wBorders & 4)
|
||||
if (para->fmt.wBorders & 4)
|
||||
{
|
||||
MoveToEx(c->hDC, c->pt.x, y + bounds->top, NULL);
|
||||
LineTo(c->hDC, rightEdge, y + bounds->top);
|
||||
|
@ -683,7 +683,7 @@ static void ME_DrawParaDecoration(ME_Context* c, ME_Paragraph* para, int y, RECT
|
|||
}
|
||||
bounds->top += border_width;
|
||||
}
|
||||
if (para->pFmt->wBorders & 8)
|
||||
if (para->fmt.wBorders & 8)
|
||||
{
|
||||
MoveToEx(c->hDC, c->pt.x, y + para->nHeight - bounds->bottom - 1, NULL);
|
||||
LineTo(c->hDC, rightEdge, y + para->nHeight - bounds->bottom - 1);
|
||||
|
@ -841,7 +841,7 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
|
|||
}
|
||||
} else { /* v1.0 - 3.0 */
|
||||
/* Draw simple table border */
|
||||
if (para->pFmt->dwMask & PFM_TABLE && para->pFmt->wEffects & PFE_TABLE) {
|
||||
if (para->fmt.dwMask & PFM_TABLE && para->fmt.wEffects & PFE_TABLE) {
|
||||
HPEN pen = NULL, oldpen = NULL;
|
||||
int i, firstX, startX, endX, rowY, rowBottom, nHeight;
|
||||
POINT oldPt;
|
||||
|
@ -853,21 +853,21 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
|
|||
/* Find the start relative to the text */
|
||||
firstX = c->pt.x + ME_FindItemFwd(paragraph, diRun)->member.run.pt.x;
|
||||
/* Go back by the horizontal gap, which is stored in dxOffset */
|
||||
firstX -= ME_twips2pointsX(c, para->pFmt->dxOffset);
|
||||
firstX -= ME_twips2pointsX(c, para->fmt.dxOffset);
|
||||
/* The left edge, stored in dxStartIndent affected just the first edge */
|
||||
startX = firstX - ME_twips2pointsX(c, para->pFmt->dxStartIndent);
|
||||
startX = firstX - ME_twips2pointsX(c, para->fmt.dxStartIndent);
|
||||
rowY = c->pt.y + para->pt.y;
|
||||
if (para->pFmt->dwMask & PFM_SPACEBEFORE)
|
||||
rowY += ME_twips2pointsY(c, para->pFmt->dySpaceBefore);
|
||||
if (para->fmt.dwMask & PFM_SPACEBEFORE)
|
||||
rowY += ME_twips2pointsY(c, para->fmt.dySpaceBefore);
|
||||
nHeight = ME_FindItemFwd(paragraph, diStartRow)->member.row.nHeight;
|
||||
rowBottom = rowY + nHeight;
|
||||
|
||||
/* Draw horizontal lines */
|
||||
MoveToEx(c->hDC, firstX, rowY, &oldPt);
|
||||
i = para->pFmt->cTabCount - 1;
|
||||
endX = startX + ME_twips2pointsX(c, para->pFmt->rgxTabs[i] & 0x00ffffff) + 1;
|
||||
i = para->fmt.cTabCount - 1;
|
||||
endX = startX + ME_twips2pointsX(c, para->fmt.rgxTabs[i] & 0x00ffffff) + 1;
|
||||
LineTo(c->hDC, endX, rowY);
|
||||
pNextFmt = para->next_para->member.para.pFmt;
|
||||
pNextFmt = ¶->next_para->member.para.fmt;
|
||||
/* The bottom of the row only needs to be drawn if the next row is
|
||||
* not a table. */
|
||||
if (!(pNextFmt && pNextFmt->dwMask & PFM_TABLE && pNextFmt->wEffects &&
|
||||
|
@ -883,9 +883,9 @@ static void ME_DrawTableBorders(ME_Context *c, ME_DisplayItem *paragraph)
|
|||
/* Draw vertical lines */
|
||||
MoveToEx(c->hDC, firstX, rowY, NULL);
|
||||
LineTo(c->hDC, firstX, rowBottom);
|
||||
for (i = 0; i < para->pFmt->cTabCount; i++)
|
||||
for (i = 0; i < para->fmt.cTabCount; i++)
|
||||
{
|
||||
int rightBoundary = para->pFmt->rgxTabs[i] & 0x00ffffff;
|
||||
int rightBoundary = para->fmt.rgxTabs[i] & 0x00ffffff;
|
||||
endX = startX + ME_twips2pointsX(c, rightBoundary);
|
||||
MoveToEx(c->hDC, endX, rowY, NULL);
|
||||
LineTo(c->hDC, endX, rowBottom);
|
||||
|
|
|
@ -27,8 +27,7 @@ static ME_DisplayItem *make_para(ME_TextEditor *editor)
|
|||
{
|
||||
ME_DisplayItem *item = ME_MakeDI(diParagraph);
|
||||
|
||||
item->member.para.pFmt = ALLOC_OBJ(PARAFORMAT2);
|
||||
ME_SetDefaultParaFormat(editor, item->member.para.pFmt);
|
||||
ME_SetDefaultParaFormat(editor, &item->member.para.fmt);
|
||||
item->member.para.nFlags = MEPF_REWRAP;
|
||||
return item;
|
||||
}
|
||||
|
@ -110,21 +109,21 @@ void ME_MarkAllForWrapping(ME_TextEditor *editor)
|
|||
|
||||
static void ME_UpdateTableFlags(ME_DisplayItem *para)
|
||||
{
|
||||
para->member.para.pFmt->dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER;
|
||||
para->member.para.fmt.dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER;
|
||||
if (para->member.para.pCell) {
|
||||
para->member.para.nFlags |= MEPF_CELL;
|
||||
} else {
|
||||
para->member.para.nFlags &= ~MEPF_CELL;
|
||||
}
|
||||
if (para->member.para.nFlags & MEPF_ROWEND) {
|
||||
para->member.para.pFmt->wEffects |= PFE_TABLEROWDELIMITER;
|
||||
para->member.para.fmt.wEffects |= PFE_TABLEROWDELIMITER;
|
||||
} else {
|
||||
para->member.para.pFmt->wEffects &= ~PFE_TABLEROWDELIMITER;
|
||||
para->member.para.fmt.wEffects &= ~PFE_TABLEROWDELIMITER;
|
||||
}
|
||||
if (para->member.para.nFlags & (MEPF_ROWSTART|MEPF_CELL|MEPF_ROWEND))
|
||||
para->member.para.pFmt->wEffects |= PFE_TABLE;
|
||||
para->member.para.fmt.wEffects |= PFE_TABLE;
|
||||
else
|
||||
para->member.para.pFmt->wEffects &= ~PFE_TABLE;
|
||||
para->member.para.fmt.wEffects &= ~PFE_TABLE;
|
||||
}
|
||||
|
||||
static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PARAFORMAT2 *pFmt)
|
||||
|
@ -132,7 +131,7 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PA
|
|||
PARAFORMAT2 copy;
|
||||
DWORD dwMask;
|
||||
|
||||
assert(para->pFmt->cbSize == sizeof(PARAFORMAT2));
|
||||
assert(para->fmt.cbSize == sizeof(PARAFORMAT2));
|
||||
dwMask = pFmt->dwMask;
|
||||
if (pFmt->cbSize < sizeof(PARAFORMAT))
|
||||
return FALSE;
|
||||
|
@ -143,25 +142,25 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PA
|
|||
|
||||
add_undo_set_para_fmt( editor, para );
|
||||
|
||||
copy = *para->pFmt;
|
||||
copy = para->fmt;
|
||||
|
||||
#define COPY_FIELD(m, f) \
|
||||
if (dwMask & (m)) { \
|
||||
para->pFmt->dwMask |= m; \
|
||||
para->pFmt->f = pFmt->f; \
|
||||
para->fmt.dwMask |= m; \
|
||||
para->fmt.f = pFmt->f; \
|
||||
}
|
||||
|
||||
COPY_FIELD(PFM_NUMBERING, wNumbering);
|
||||
COPY_FIELD(PFM_STARTINDENT, dxStartIndent);
|
||||
if (dwMask & PFM_OFFSETINDENT)
|
||||
para->pFmt->dxStartIndent += pFmt->dxStartIndent;
|
||||
para->fmt.dxStartIndent += pFmt->dxStartIndent;
|
||||
COPY_FIELD(PFM_RIGHTINDENT, dxRightIndent);
|
||||
COPY_FIELD(PFM_OFFSET, dxOffset);
|
||||
COPY_FIELD(PFM_ALIGNMENT, wAlignment);
|
||||
if (dwMask & PFM_TABSTOPS)
|
||||
{
|
||||
para->pFmt->cTabCount = pFmt->cTabCount;
|
||||
memcpy(para->pFmt->rgxTabs, pFmt->rgxTabs, pFmt->cTabCount*sizeof(LONG));
|
||||
para->fmt.cTabCount = pFmt->cTabCount;
|
||||
memcpy(para->fmt.rgxTabs, pFmt->rgxTabs, pFmt->cTabCount*sizeof(LONG));
|
||||
}
|
||||
|
||||
#define EFFECTS_MASK (PFM_RTLPARA|PFM_KEEP|PFM_KEEPNEXT|PFM_PAGEBREAKBEFORE| \
|
||||
|
@ -170,9 +169,9 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PA
|
|||
/* we take for granted that PFE_xxx is the hiword of the corresponding PFM_xxx */
|
||||
if (dwMask & EFFECTS_MASK)
|
||||
{
|
||||
para->pFmt->dwMask |= dwMask & EFFECTS_MASK;
|
||||
para->pFmt->wEffects &= ~HIWORD(dwMask);
|
||||
para->pFmt->wEffects |= pFmt->wEffects & HIWORD(dwMask);
|
||||
para->fmt.dwMask |= dwMask & EFFECTS_MASK;
|
||||
para->fmt.wEffects &= ~HIWORD(dwMask);
|
||||
para->fmt.wEffects |= pFmt->wEffects & HIWORD(dwMask);
|
||||
}
|
||||
#undef EFFECTS_MASK
|
||||
|
||||
|
@ -190,10 +189,10 @@ static BOOL ME_SetParaFormat(ME_TextEditor *editor, ME_Paragraph *para, const PA
|
|||
COPY_FIELD(PFM_BORDER, wBorderWidth);
|
||||
COPY_FIELD(PFM_BORDER, wBorders);
|
||||
|
||||
para->pFmt->dwMask |= dwMask;
|
||||
para->fmt.dwMask |= dwMask;
|
||||
#undef COPY_FIELD
|
||||
|
||||
if (memcmp(©, para->pFmt, sizeof(PARAFORMAT2)))
|
||||
if (memcmp(©, ¶->fmt, sizeof(PARAFORMAT2)))
|
||||
para->nFlags |= MEPF_REWRAP;
|
||||
|
||||
return TRUE;
|
||||
|
@ -225,7 +224,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
|
|||
}
|
||||
assert(run->type == diRun);
|
||||
run_para = ME_GetParagraph(run);
|
||||
assert(run_para->member.para.pFmt->cbSize == sizeof(PARAFORMAT2));
|
||||
assert(run_para->member.para.fmt.cbSize == sizeof(PARAFORMAT2));
|
||||
|
||||
new_para->member.para.text = ME_VSplitString( run_para->member.para.text, run->member.run.nCharOfs );
|
||||
|
||||
|
@ -260,7 +259,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
|
|||
new_para->member.para.nFlags = MEPF_REWRAP;
|
||||
|
||||
/* FIXME initialize format style and call ME_SetParaFormat blah blah */
|
||||
*new_para->member.para.pFmt = *run_para->member.para.pFmt;
|
||||
new_para->member.para.fmt = run_para->member.para.fmt;
|
||||
new_para->member.para.border = run_para->member.para.border;
|
||||
|
||||
/* insert paragraph into paragraph double linked list */
|
||||
|
@ -399,7 +398,7 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp,
|
|||
if (!keepFirstParaFormat)
|
||||
{
|
||||
add_undo_set_para_fmt( editor, &tp->member.para );
|
||||
*tp->member.para.pFmt = *pNext->member.para.pFmt;
|
||||
tp->member.para.fmt = pNext->member.para.fmt;
|
||||
tp->member.para.border = pNext->member.para.border;
|
||||
}
|
||||
|
||||
|
@ -566,9 +565,9 @@ static void ME_GetParaFormat(ME_TextEditor *editor,
|
|||
{
|
||||
UINT cbSize = pFmt->cbSize;
|
||||
if (pFmt->cbSize >= sizeof(PARAFORMAT2)) {
|
||||
*pFmt = *para->member.para.pFmt;
|
||||
*pFmt = para->member.para.fmt;
|
||||
} else {
|
||||
CopyMemory(pFmt, para->member.para.pFmt, pFmt->cbSize);
|
||||
CopyMemory(pFmt, ¶->member.para.fmt, pFmt->cbSize);
|
||||
pFmt->dwMask &= PFM_ALL;
|
||||
}
|
||||
pFmt->cbSize = cbSize;
|
||||
|
@ -592,7 +591,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
|
|||
while (para != para_end)
|
||||
{
|
||||
para = para->member.para.next_para;
|
||||
curFmt = para->member.para.pFmt;
|
||||
curFmt = ¶->member.para.fmt;
|
||||
|
||||
#define CHECK_FIELD(m, f) \
|
||||
if (pFmt->f != curFmt->f) pFmt->dwMask &= ~(m);
|
||||
|
@ -603,7 +602,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt)
|
|||
CHECK_FIELD(PFM_OFFSET, dxOffset);
|
||||
CHECK_FIELD(PFM_ALIGNMENT, wAlignment);
|
||||
if (pFmt->dwMask & PFM_TABSTOPS) {
|
||||
if (pFmt->cTabCount != para->member.para.pFmt->cTabCount ||
|
||||
if (pFmt->cTabCount != para->member.para.fmt.cTabCount ||
|
||||
memcmp(pFmt->rgxTabs, curFmt->rgxTabs, curFmt->cTabCount*sizeof(int)))
|
||||
pFmt->dwMask &= ~PFM_TABSTOPS;
|
||||
}
|
||||
|
|
|
@ -642,7 +642,7 @@ SIZE ME_GetRunSizeCommon(ME_Context *c, const ME_Paragraph *para, ME_Run *run, i
|
|||
if (run->nFlags & MERF_TAB)
|
||||
{
|
||||
int pos = 0, i = 0, ppos, shift = 0;
|
||||
PARAFORMAT2 *pFmt = para->pFmt;
|
||||
const PARAFORMAT2 *pFmt = ¶->fmt;
|
||||
|
||||
if (c->editor->bEmulateVersion10 && /* v1.0 - 3.0 */
|
||||
pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE)
|
||||
|
|
|
@ -105,9 +105,9 @@ ME_DisplayItem* ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor,
|
|||
para->member.para.pCell = prev_para->member.para.pCell;
|
||||
para->member.para.nFlags |= MEPF_CELL;
|
||||
para->member.para.nFlags &= ~(MEPF_ROWSTART|MEPF_ROWEND);
|
||||
para->member.para.pFmt->dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER;
|
||||
para->member.para.pFmt->wEffects |= PFE_TABLE;
|
||||
para->member.para.pFmt->wEffects &= ~PFE_TABLEROWDELIMITER;
|
||||
para->member.para.fmt.dwMask |= PFM_TABLE|PFM_TABLEROWDELIMITER;
|
||||
para->member.para.fmt.wEffects |= PFE_TABLE;
|
||||
para->member.para.fmt.wEffects &= ~PFE_TABLEROWDELIMITER;
|
||||
prev_para = para;
|
||||
para = para->member.para.next_para;
|
||||
}
|
||||
|
@ -205,12 +205,12 @@ void ME_CheckTablesForCorruption(ME_TextEditor *editor)
|
|||
{
|
||||
while (p->type == diParagraph)
|
||||
{
|
||||
assert(p->member.para.pFmt->dwMask & PFM_TABLE);
|
||||
assert(p->member.para.pFmt->dwMask & PFM_TABLEROWDELIMITER);
|
||||
assert(p->member.para.fmt.dwMask & PFM_TABLE);
|
||||
assert(p->member.para.fmt.dwMask & PFM_TABLEROWDELIMITER);
|
||||
if (p->member.para.pCell)
|
||||
{
|
||||
assert(p->member.para.nFlags & MEPF_CELL);
|
||||
assert(p->member.para.pFmt->wEffects & PFE_TABLE);
|
||||
assert(p->member.para.fmt.wEffects & PFE_TABLE);
|
||||
}
|
||||
if (p->member.para.pCell != pPrev->member.para.pCell)
|
||||
{
|
||||
|
@ -225,11 +225,11 @@ void ME_CheckTablesForCorruption(ME_TextEditor *editor)
|
|||
assert(pPrev->member.para.pCell);
|
||||
assert(p->member.para.pCell
|
||||
== pPrev->member.para.pCell->member.cell.parent_cell);
|
||||
assert(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER);
|
||||
assert(p->member.para.fmt.wEffects & PFE_TABLEROWDELIMITER);
|
||||
}
|
||||
else if (p->member.para.pCell)
|
||||
{
|
||||
assert(!(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER));
|
||||
assert(!(p->member.para.fmt.wEffects & PFE_TABLEROWDELIMITER));
|
||||
assert(pPrev->member.para.pCell ||
|
||||
pPrev->member.para.nFlags & MEPF_ROWSTART);
|
||||
if (pPrev->member.para.pCell &&
|
||||
|
@ -244,7 +244,7 @@ void ME_CheckTablesForCorruption(ME_TextEditor *editor)
|
|||
}
|
||||
else if (!(p->member.para.nFlags & MEPF_ROWSTART))
|
||||
{
|
||||
assert(!(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER));
|
||||
assert(!(p->member.para.fmt.wEffects & PFE_TABLEROWDELIMITER));
|
||||
/* ROWSTART must be followed by a cell. */
|
||||
assert(!(p->member.para.nFlags & MEPF_CELL));
|
||||
/* ROWSTART must be followed by a cell. */
|
||||
|
@ -257,8 +257,8 @@ void ME_CheckTablesForCorruption(ME_TextEditor *editor)
|
|||
while (p->type == diParagraph)
|
||||
{
|
||||
assert(!(p->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL)));
|
||||
assert(p->member.para.pFmt->dwMask & PFM_TABLE);
|
||||
assert(!(p->member.para.pFmt->wEffects & PFE_TABLEROWDELIMITER));
|
||||
assert(p->member.para.fmt.dwMask & PFM_TABLE);
|
||||
assert(!(p->member.para.fmt.wEffects & PFE_TABLEROWDELIMITER));
|
||||
assert(!p->member.para.pCell);
|
||||
p = p->member.para.next_para;
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ BOOL ME_IsInTable(ME_DisplayItem *pItem)
|
|||
pItem = ME_GetParagraph(pItem);
|
||||
if (pItem->type != diParagraph)
|
||||
return FALSE;
|
||||
pFmt = pItem->member.para.pFmt;
|
||||
pFmt = &pItem->member.para.fmt;
|
||||
return pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE;
|
||||
}
|
||||
|
||||
|
@ -364,8 +364,8 @@ void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, ME_Cursor *c, int *nC
|
|||
int nCharsToBoundary;
|
||||
|
||||
if ((this_para->member.para.nCharOfs != nOfs || this_para == end_para) &&
|
||||
this_para->member.para.pFmt->dwMask & PFM_TABLE &&
|
||||
this_para->member.para.pFmt->wEffects & PFE_TABLE)
|
||||
this_para->member.para.fmt.dwMask & PFM_TABLE &&
|
||||
this_para->member.para.fmt.wEffects & PFE_TABLE)
|
||||
{
|
||||
pRun = c->pRun;
|
||||
/* Find the next tab or end paragraph to use as a delete boundary */
|
||||
|
@ -375,8 +375,8 @@ void ME_ProtectPartialTableDeletion(ME_TextEditor *editor, ME_Cursor *c, int *nC
|
|||
- c->pRun->member.run.nCharOfs
|
||||
- c->nOffset;
|
||||
*nChars = min(*nChars, nCharsToBoundary);
|
||||
} else if (end_para->member.para.pFmt->dwMask & PFM_TABLE &&
|
||||
end_para->member.para.pFmt->wEffects & PFE_TABLE)
|
||||
} else if (end_para->member.para.fmt.dwMask & PFM_TABLE &&
|
||||
end_para->member.para.fmt.wEffects & PFE_TABLE)
|
||||
{
|
||||
/* The deletion starts from before the row, so don't join it with
|
||||
* previous non-empty paragraphs. */
|
||||
|
@ -438,12 +438,12 @@ ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor,
|
|||
insertedCell->member.cell.border = cell->member.cell.border;
|
||||
};
|
||||
para = ME_InsertTableRowEndFromCursor(editor);
|
||||
*para->member.para.pFmt = *prevTableEnd->member.para.pFmt;
|
||||
para->member.para.fmt = prevTableEnd->member.para.fmt;
|
||||
/* return the table row start for the inserted paragraph */
|
||||
return ME_FindItemFwd(cell, diParagraph)->member.para.next_para;
|
||||
} else { /* v1.0 - 3.0 */
|
||||
run = ME_FindItemBack(table_row->member.para.next_para, diRun);
|
||||
pFmt = table_row->member.para.pFmt;
|
||||
pFmt = &table_row->member.para.fmt;
|
||||
assert(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE);
|
||||
editor->pCursors[0].pPara = table_row;
|
||||
editor->pCursors[0].pRun = run;
|
||||
|
|
|
@ -155,7 +155,7 @@ BOOL add_undo_set_para_fmt( ME_TextEditor *editor, const ME_Paragraph *para )
|
|||
if (!undo) return FALSE;
|
||||
|
||||
undo->u.set_para_fmt.pos = para->nCharOfs;
|
||||
undo->u.set_para_fmt.fmt = *para->pFmt;
|
||||
undo->u.set_para_fmt.fmt = para->fmt;
|
||||
undo->u.set_para_fmt.border = para->border;
|
||||
|
||||
return TRUE;
|
||||
|
@ -189,7 +189,7 @@ BOOL add_undo_split_para( ME_TextEditor *editor, const ME_Paragraph *para, ME_St
|
|||
|
||||
undo->u.split_para.pos = para->nCharOfs - eol_str->nLen;
|
||||
undo->u.split_para.eol_str = eol_str;
|
||||
undo->u.split_para.fmt = *para->pFmt;
|
||||
undo->u.split_para.fmt = para->fmt;
|
||||
undo->u.split_para.border = para->border;
|
||||
undo->u.split_para.flags = para->prev_para->member.para.nFlags & ~MEPF_CELL;
|
||||
|
||||
|
@ -339,7 +339,7 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo)
|
|||
ME_CursorFromCharOfs(editor, undo->u.set_para_fmt.pos, &tmp);
|
||||
para = ME_FindItemBack(tmp.pRun, diParagraph);
|
||||
add_undo_set_para_fmt( editor, ¶->member.para );
|
||||
*para->member.para.pFmt = undo->u.set_para_fmt.fmt;
|
||||
para->member.para.fmt = undo->u.set_para_fmt.fmt;
|
||||
para->member.para.border = undo->u.set_para_fmt.border;
|
||||
para->member.para.nFlags |= MEPF_REWRAP;
|
||||
break;
|
||||
|
@ -398,7 +398,7 @@ static void ME_PlayUndoItem(ME_TextEditor *editor, struct undo_item *undo)
|
|||
undo->u.split_para.eol_str->szData, undo->u.split_para.eol_str->nLen, paraFlags);
|
||||
if (bFixRowStart)
|
||||
new_para->member.para.nFlags |= MEPF_ROWSTART;
|
||||
*new_para->member.para.pFmt = undo->u.split_para.fmt;
|
||||
new_para->member.para.fmt = undo->u.split_para.fmt;
|
||||
new_para->member.para.border = undo->u.split_para.border;
|
||||
if (paraFlags)
|
||||
{
|
||||
|
|
|
@ -182,7 +182,7 @@ static void ME_BeginRow(ME_WrapContext *wc)
|
|||
PARAFORMAT2 *pFmt;
|
||||
ME_DisplayItem *para = wc->pPara;
|
||||
|
||||
pFmt = para->member.para.pFmt;
|
||||
pFmt = ¶->member.para.fmt;
|
||||
wc->pRowStart = NULL;
|
||||
wc->bOverflown = FALSE;
|
||||
wc->pLastSplittableRun = NULL;
|
||||
|
@ -204,7 +204,7 @@ static void ME_BeginRow(ME_WrapContext *wc)
|
|||
width -= cell->prev_cell->member.cell.nRightBoundary;
|
||||
if (!cell->prev_cell)
|
||||
{
|
||||
int rowIndent = ME_GetTableRowEnd(para)->member.para.pFmt->dxStartIndent;
|
||||
int rowIndent = ME_GetTableRowEnd(para)->member.para.fmt.dxStartIndent;
|
||||
width -= rowIndent;
|
||||
}
|
||||
cell->nWidth = max(ME_twips2pointsX(wc->context, width), 0);
|
||||
|
@ -326,7 +326,7 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
|
|||
para->nWidth = max(para->nWidth, width);
|
||||
row = ME_MakeRow(ascent+descent, ascent, width);
|
||||
if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */
|
||||
(para->pFmt->dwMask & PFM_TABLE) && (para->pFmt->wEffects & PFE_TABLE))
|
||||
(para->fmt.dwMask & PFM_TABLE) && (para->fmt.wEffects & PFE_TABLE))
|
||||
{
|
||||
/* The text was shifted down in ME_BeginRow so move the wrap context
|
||||
* back to where it should be. */
|
||||
|
@ -337,8 +337,8 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
|
|||
row->member.row.pt = wc->pt;
|
||||
row->member.row.nLMargin = (!wc->nRow ? wc->nFirstMargin : wc->nLeftMargin);
|
||||
row->member.row.nRMargin = wc->nRightMargin;
|
||||
assert(para->pFmt->dwMask & PFM_ALIGNMENT);
|
||||
align = para->pFmt->wAlignment;
|
||||
assert(para->fmt.dwMask & PFM_ALIGNMENT);
|
||||
align = para->fmt.wAlignment;
|
||||
if (align == PFA_CENTER)
|
||||
shift = max((wc->nAvailWidth-width)/2, 0);
|
||||
if (align == PFA_RIGHT)
|
||||
|
@ -362,7 +362,7 @@ static void ME_InsertRowStart(ME_WrapContext *wc, const ME_DisplayItem *pEnd)
|
|||
static void ME_WrapEndParagraph(ME_WrapContext *wc, ME_DisplayItem *p)
|
||||
{
|
||||
ME_DisplayItem *para = wc->pPara;
|
||||
PARAFORMAT2 *pFmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = ¶->member.para.fmt;
|
||||
if (wc->pRowStart)
|
||||
ME_InsertRowStart(wc, p);
|
||||
if (wc->context->editor->bEmulateVersion10 && /* v1.0 - 3.0 */
|
||||
|
@ -685,19 +685,19 @@ static ME_DisplayItem *ME_WrapHandleRun(ME_WrapContext *wc, ME_DisplayItem *p)
|
|||
static int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para)
|
||||
{
|
||||
int sp = 0, ls = 0;
|
||||
if (!(para->pFmt->dwMask & PFM_LINESPACING)) return 0;
|
||||
if (!(para->fmt.dwMask & PFM_LINESPACING)) return 0;
|
||||
|
||||
/* FIXME: how to compute simply the line space in ls ??? */
|
||||
/* FIXME: does line spacing include the line itself ??? */
|
||||
switch (para->pFmt->bLineSpacingRule)
|
||||
switch (para->fmt.bLineSpacingRule)
|
||||
{
|
||||
case 0: sp = ls; break;
|
||||
case 1: sp = (3 * ls) / 2; break;
|
||||
case 2: sp = 2 * ls; break;
|
||||
case 3: sp = ME_twips2pointsY(c, para->pFmt->dyLineSpacing); if (sp < ls) sp = ls; break;
|
||||
case 4: sp = ME_twips2pointsY(c, para->pFmt->dyLineSpacing); break;
|
||||
case 5: sp = para->pFmt->dyLineSpacing / 20; break;
|
||||
default: FIXME("Unsupported spacing rule value %d\n", para->pFmt->bLineSpacingRule);
|
||||
case 3: sp = ME_twips2pointsY(c, para->fmt.dyLineSpacing); if (sp < ls) sp = ls; break;
|
||||
case 4: sp = ME_twips2pointsY(c, para->fmt.dyLineSpacing); break;
|
||||
case 5: sp = para->fmt.dyLineSpacing / 20; break;
|
||||
default: FIXME("Unsupported spacing rule value %d\n", para->fmt.bLineSpacingRule);
|
||||
}
|
||||
if (c->editor->nZoomNumerator == 0)
|
||||
return sp;
|
||||
|
@ -746,7 +746,7 @@ static HRESULT itemize_para( ME_Context *c, ME_DisplayItem *p )
|
|||
|
||||
assert( p->type == diParagraph );
|
||||
|
||||
if (para->pFmt->dwMask & PFM_RTLPARA && para->pFmt->wEffects & PFE_RTLPARA)
|
||||
if (para->fmt.dwMask & PFM_RTLPARA && para->fmt.wEffects & PFE_RTLPARA)
|
||||
state.uBidiLevel = 1;
|
||||
|
||||
TRACE( "Base embedding level %d\n", state.uBidiLevel );
|
||||
|
@ -863,7 +863,7 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
|||
shape_para( c, tp );
|
||||
}
|
||||
|
||||
pFmt = tp->member.para.pFmt;
|
||||
pFmt = &tp->member.para.fmt;
|
||||
|
||||
wc.context = c;
|
||||
wc.pPara = tp;
|
||||
|
@ -874,7 +874,7 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
|||
} else {
|
||||
int dxStartIndent = pFmt->dxStartIndent;
|
||||
if (tp->member.para.pCell) {
|
||||
dxStartIndent += ME_GetTableRowEnd(tp)->member.para.pFmt->dxOffset;
|
||||
dxStartIndent += ME_GetTableRowEnd(tp)->member.para.fmt.dxOffset;
|
||||
}
|
||||
wc.nFirstMargin = ME_twips2pointsX(c, dxStartIndent);
|
||||
wc.nLeftMargin = wc.nFirstMargin + ME_twips2pointsX(c, pFmt->dxOffset);
|
||||
|
@ -897,7 +897,7 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
|||
if (!(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) &&
|
||||
pFmt->dwMask & PFM_BORDER)
|
||||
{
|
||||
border = ME_GetParaBorderWidth(c, tp->member.para.pFmt->wBorders);
|
||||
border = ME_GetParaBorderWidth(c, tp->member.para.fmt.wBorders);
|
||||
if (pFmt->wBorders & 1) {
|
||||
wc.nFirstMargin += border;
|
||||
wc.nLeftMargin += border;
|
||||
|
@ -924,7 +924,7 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
|
|||
if (!(pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE) &&
|
||||
(pFmt->dwMask & PFM_BORDER) && (pFmt->wBorders & 8))
|
||||
wc.pt.y += border;
|
||||
if (tp->member.para.pFmt->dwMask & PFM_SPACEAFTER)
|
||||
if (tp->member.para.fmt.dwMask & PFM_SPACEAFTER)
|
||||
wc.pt.y += ME_twips2pointsY(c, pFmt->dySpaceAfter);
|
||||
|
||||
tp->member.para.nFlags &= ~MEPF_REWRAP;
|
||||
|
@ -987,9 +987,9 @@ BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
|
|||
}
|
||||
c.pt.y += borderWidth;
|
||||
}
|
||||
if (endRowPara->member.para.pFmt->dxStartIndent > 0)
|
||||
if (endRowPara->member.para.fmt.dxStartIndent > 0)
|
||||
{
|
||||
int dxStartIndent = endRowPara->member.para.pFmt->dxStartIndent;
|
||||
int dxStartIndent = endRowPara->member.para.fmt.dxStartIndent;
|
||||
cell = ME_FindItemFwd(item, diCell);
|
||||
cell->member.cell.pt.x += ME_twips2pointsX(&c, dxStartIndent);
|
||||
c.pt.x = cell->member.cell.pt.x;
|
||||
|
|
|
@ -349,7 +349,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
|
|||
if (!ME_StreamOutPrint(pStream, "\\trowd"))
|
||||
return FALSE;
|
||||
if (!editor->bEmulateVersion10) { /* v4.1 */
|
||||
PARAFORMAT2 *pFmt = ME_GetTableRowEnd(para)->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = &ME_GetTableRowEnd(para)->member.para.fmt;
|
||||
para = ME_GetTableRowStart(para);
|
||||
cell = para->member.para.next_para->member.para.pCell;
|
||||
assert(cell);
|
||||
|
@ -387,7 +387,7 @@ ME_StreamOutRTFTableProps(ME_TextEditor *editor, ME_OutStream *pStream,
|
|||
¶->member.para.border.left,
|
||||
¶->member.para.border.bottom,
|
||||
¶->member.para.border.right };
|
||||
PARAFORMAT2 *pFmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *pFmt = ¶->member.para.fmt;
|
||||
|
||||
assert(!(para->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL)));
|
||||
if (pFmt->dxOffset)
|
||||
|
@ -426,7 +426,7 @@ static BOOL
|
|||
ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream,
|
||||
ME_DisplayItem *para)
|
||||
{
|
||||
PARAFORMAT2 *fmt = para->member.para.pFmt;
|
||||
PARAFORMAT2 *fmt = ¶->member.para.fmt;
|
||||
char props[STREAMOUT_BUFFER_SIZE] = "";
|
||||
int i;
|
||||
|
||||
|
@ -454,8 +454,8 @@ ME_StreamOutRTFParaProps(ME_TextEditor *editor, ME_OutStream *pStream,
|
|||
return TRUE;
|
||||
}
|
||||
} else { /* v1.0 - 3.0 */
|
||||
if (para->member.para.pFmt->dwMask & PFM_TABLE &&
|
||||
para->member.para.pFmt->wEffects & PFE_TABLE)
|
||||
if (para->member.para.fmt.dwMask & PFM_TABLE &&
|
||||
para->member.para.fmt.wEffects & PFE_TABLE)
|
||||
{
|
||||
if (!ME_StreamOutRTFTableProps(editor, pStream, para))
|
||||
return FALSE;
|
||||
|
@ -929,8 +929,8 @@ static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream,
|
|||
return FALSE;
|
||||
} else if (cursor.pRun->member.run.nFlags & MERF_TAB) {
|
||||
if (editor->bEmulateVersion10 && /* v1.0 - 3.0 */
|
||||
cursor.pPara->member.para.pFmt->dwMask & PFM_TABLE &&
|
||||
cursor.pPara->member.para.pFmt->wEffects & PFE_TABLE)
|
||||
cursor.pPara->member.para.fmt.dwMask & PFM_TABLE &&
|
||||
cursor.pPara->member.para.fmt.wEffects & PFE_TABLE)
|
||||
{
|
||||
if (!ME_StreamOutPrint(pStream, "\\cell "))
|
||||
return FALSE;
|
||||
|
@ -948,8 +948,8 @@ static BOOL ME_StreamOutRTF(ME_TextEditor *editor, ME_OutStream *pStream,
|
|||
}
|
||||
nChars--;
|
||||
} else if (cursor.pRun->member.run.nFlags & MERF_ENDPARA) {
|
||||
if (cursor.pPara->member.para.pFmt->dwMask & PFM_TABLE &&
|
||||
cursor.pPara->member.para.pFmt->wEffects & PFE_TABLE &&
|
||||
if (cursor.pPara->member.para.fmt.dwMask & PFM_TABLE &&
|
||||
cursor.pPara->member.para.fmt.wEffects & PFE_TABLE &&
|
||||
!(cursor.pPara->member.para.nFlags & (MEPF_ROWSTART|MEPF_ROWEND|MEPF_CELL)))
|
||||
{
|
||||
if (!ME_StreamOutPrint(pStream, "\\row \r\n"))
|
||||
|
|
Loading…
Reference in New Issue