riched20: Use para_in_table() instead of IsInTable().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2020-11-04 06:56:25 +00:00 committed by Alexandre Julliard
parent 507f517094
commit c8fef26884
2 changed files with 2 additions and 16 deletions

View File

@ -289,7 +289,6 @@ ME_Paragraph *editor_end_para( ME_TextEditor *editor ) DECLSPEC_HIDDEN;
ME_Paragraph *editor_first_para( ME_TextEditor *editor ) DECLSPEC_HIDDEN;
/* table.c */
BOOL ME_IsInTable(ME_DisplayItem *pItem) DECLSPEC_HIDDEN;
ME_Paragraph *cell_end_para( ME_Cell *cell ) DECLSPEC_HIDDEN;
ME_Paragraph *cell_first_para( ME_Cell *cell ) DECLSPEC_HIDDEN;
ME_Cell *cell_next( ME_Cell *cell ) DECLSPEC_HIDDEN;

View File

@ -212,19 +212,6 @@ ME_Paragraph *cell_end_para( ME_Cell *cell )
return &ME_FindItemBack( cell_get_di( next ), diParagraph )->member.para;
}
BOOL ME_IsInTable(ME_DisplayItem *pItem)
{
PARAFORMAT2 *pFmt;
if (!pItem)
return FALSE;
if (pItem->type == diRun)
pItem = ME_GetParagraph(pItem);
if (pItem->type != diParagraph)
return FALSE;
pFmt = &pItem->member.para.fmt;
return pFmt->dwMask & PFM_TABLE && pFmt->wEffects & PFE_TABLE;
}
/* Table rows should either be deleted completely or not at all. */
void table_protect_partial_deletion( ME_TextEditor *editor, ME_Cursor *c, int *num_chars )
{
@ -504,7 +491,7 @@ void table_handle_tab( ME_TextEditor *editor, BOOL selected_row )
}
if (!editor->bEmulateVersion10) /* v4.1 */
{
if (!ME_IsInTable(toCursor.pRun))
if (!para_in_table( &toCursor.pPara->member.para ))
{
editor->pCursors[0] = toCursor;
editor->pCursors[1] = toCursor;
@ -513,7 +500,7 @@ void table_handle_tab( ME_TextEditor *editor, BOOL selected_row )
}
else /* v1.0 - 3.0 */
{
if (!ME_IsInTable(fromCursor.pRun))
if (!para_in_table( &fromCursor.pPara->member.para) )
{
editor->pCursors[0] = fromCursor;
editor->pCursors[1] = fromCursor;