Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
f2d770d4
Commit
f2d770d4
authored
Oct 29, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Remove the table corruption check function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3ba41908
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
95 deletions
+0
-95
editor.c
dlls/riched20/editor.c
+0
-3
editor.h
dlls/riched20/editor.h
+0
-1
table.c
dlls/riched20/table.c
+0
-89
undo.c
dlls/riched20/undo.c
+0
-2
No files found.
dlls/riched20/editor.c
View file @
f2d770d4
...
...
@@ -1735,7 +1735,6 @@ static LRESULT ME_StreamIn(ME_TextEditor *editor, DWORD format, EDITSTREAM *stre
if
(
parser
.
tableDef
)
parser
.
tableDef
->
row_start
=
NULL
;
}
}
ME_CheckTablesForCorruption
(
editor
);
RTFDestroy
(
&
parser
);
if
(
parser
.
stackTop
>
0
)
...
...
@@ -2515,7 +2514,6 @@ static BOOL handle_enter(ME_TextEditor *editor)
editor
->
pCursors
[
0
].
nOffset
=
0
;
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
ME_CommitUndo
(
editor
);
ME_CheckTablesForCorruption
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
...
...
@@ -2541,7 +2539,6 @@ static BOOL handle_enter(ME_TextEditor *editor)
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
para
->
member
.
para
.
next_para
->
member
.
para
.
nFlags
|=
MEPF_ROWSTART
;
ME_CommitCoalescingUndo
(
editor
);
ME_CheckTablesForCorruption
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
}
...
...
dlls/riched20/editor.h
View file @
f2d770d4
...
...
@@ -309,7 +309,6 @@ ME_Paragraph *table_row_end( ME_Paragraph *para ) DECLSPEC_HIDDEN;
ME_Cell
*
table_row_end_cell
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Cell
*
table_row_first_cell
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_row_start
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
void
ME_CheckTablesForCorruption
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
struct
RTFTable
*
ME_MakeTableDef
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
ME_InitTableDef
(
ME_TextEditor
*
editor
,
struct
RTFTable
*
tableDef
)
DECLSPEC_HIDDEN
;
static
inline
ME_DisplayItem
*
cell_get_di
(
ME_Cell
*
cell
)
...
...
dlls/riched20/table.c
View file @
f2d770d4
...
...
@@ -54,8 +54,6 @@
#include "editor.h"
#include "rtf.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
richedit_lists
);
static
const
WCHAR
cr_lf
[]
=
{
'\r'
,
'\n'
,
0
};
static
ME_Paragraph
*
table_insert_end_para
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
,
...
...
@@ -214,93 +212,6 @@ ME_Paragraph *cell_end_para( ME_Cell *cell )
return
&
ME_FindItemBack
(
cell_get_di
(
next
),
diParagraph
)
->
member
.
para
;
}
/* Make a bunch of assertions to make sure tables haven't been corrupted.
*
* These invariants may not hold true in the middle of streaming in rich text
* or during an undo and redo of streaming in rich text. It should be safe to
* call this method after an event is processed.
*/
void
ME_CheckTablesForCorruption
(
ME_TextEditor
*
editor
)
{
if
(
TRACE_ON
(
richedit_lists
))
{
TRACE
(
"---
\n
"
);
ME_DumpDocument
(
editor
->
pBuffer
);
}
#ifndef NDEBUG
{
ME_DisplayItem
*
p
,
*
pPrev
;
pPrev
=
editor
->
pBuffer
->
pFirst
;
p
=
pPrev
->
next
;
if
(
!
editor
->
bEmulateVersion10
)
/* v4.1 */
{
while
(
p
->
type
==
diParagraph
)
{
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
.
fmt
.
wEffects
&
PFE_TABLE
);
}
if
(
p
->
member
.
para
.
pCell
!=
pPrev
->
member
.
para
.
pCell
)
{
/* There must be a diCell in between the paragraphs if pCell changes. */
ME_DisplayItem
*
pCell
=
ME_FindItemBack
(
p
,
diCell
);
assert
(
pCell
);
assert
(
ME_FindItemBack
(
p
,
diRun
)
==
ME_FindItemBack
(
pCell
,
diRun
));
}
if
(
p
->
member
.
para
.
nFlags
&
MEPF_ROWEND
)
{
/* ROWEND must come after a cell. */
assert
(
pPrev
->
member
.
para
.
pCell
);
assert
(
p
->
member
.
para
.
pCell
==
pPrev
->
member
.
para
.
pCell
->
member
.
cell
.
parent_cell
);
assert
(
p
->
member
.
para
.
fmt
.
wEffects
&
PFE_TABLEROWDELIMITER
);
}
else
if
(
p
->
member
.
para
.
pCell
)
{
assert
(
!
(
p
->
member
.
para
.
fmt
.
wEffects
&
PFE_TABLEROWDELIMITER
));
assert
(
pPrev
->
member
.
para
.
pCell
||
pPrev
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
);
if
(
pPrev
->
member
.
para
.
pCell
&&
!
(
pPrev
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
))
{
assert
(
p
->
member
.
para
.
pCell
->
member
.
cell
.
parent_cell
==
pPrev
->
member
.
para
.
pCell
->
member
.
cell
.
parent_cell
);
if
(
pPrev
->
member
.
para
.
pCell
!=
p
->
member
.
para
.
pCell
)
assert
(
pPrev
->
member
.
para
.
pCell
==
p
->
member
.
para
.
pCell
->
member
.
cell
.
prev_cell
);
}
}
else
if
(
!
(
p
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
))
{
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. */
assert
(
!
(
pPrev
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
));
}
pPrev
=
p
;
p
=
p
->
member
.
para
.
next_para
;
}
}
else
{
/* v1.0 - 3.0 */
while
(
p
->
type
==
diParagraph
)
{
assert
(
!
(
p
->
member
.
para
.
nFlags
&
(
MEPF_ROWSTART
|
MEPF_ROWEND
|
MEPF_CELL
)));
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
;
}
return
;
}
assert
(
p
->
type
==
diTextEnd
);
assert
(
!
pPrev
->
member
.
para
.
pCell
);
}
#endif
}
BOOL
ME_IsInTable
(
ME_DisplayItem
*
pItem
)
{
PARAFORMAT2
*
pFmt
;
...
...
dlls/riched20/undo.c
View file @
f2d770d4
...
...
@@ -440,7 +440,6 @@ BOOL ME_Undo(ME_TextEditor *editor)
table_move_from_row_start
(
editor
);
add_undo
(
editor
,
undo_end_transaction
);
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoStackSize
--
;
editor
->
nUndoMode
=
nMode
;
ME_UpdateRepaint
(
editor
,
FALSE
);
...
...
@@ -477,7 +476,6 @@ BOOL ME_Redo(ME_TextEditor *editor)
}
table_move_from_row_start
(
editor
);
add_undo
(
editor
,
undo_end_transaction
);
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoMode
=
nMode
;
ME_UpdateRepaint
(
editor
,
FALSE
);
return
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment