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
08437689
Commit
08437689
authored
Sep 11, 2008
by
Dylan Smith
Committed by
Alexandre Julliard
Sep 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
richedit: Enter at the end of a table row appends a new row.
parent
88a3a8a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
editor.c
dlls/riched20/editor.c
+9
-1
para.c
dlls/riched20/para.c
+7
-0
table.c
dlls/riched20/table.c
+2
-5
No files found.
dlls/riched20/editor.c
View file @
08437689
...
...
@@ -3701,7 +3701,15 @@ static LRESULT RichEditWndProc_common(HWND hWnd, UINT msg, WPARAM wParam,
}
else
if
(
!
editor
->
bEmulateVersion10
)
{
/* v4.1 */
if
(
para
->
member
.
para
.
nFlags
&
MEPF_ROWEND
)
{
if
(
wstr
==
'\r'
)
{
/* FIXME: Add a new table row after this row. */
/* Add a new table row after this row. */
para
=
ME_AppendTableRow
(
editor
,
para
);
para
=
para
->
member
.
para
.
next_para
;
editor
->
pCursors
[
0
].
pRun
=
ME_FindItemFwd
(
para
,
diRun
);
editor
->
pCursors
[
0
].
nOffset
=
0
;
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
ME_CommitUndo
(
editor
);
ME_CheckTablesForCorruption
(
editor
);
ME_UpdateRepaint
(
editor
);
return
0
;
}
else
if
(
from
==
to
)
{
para
=
para
->
member
.
para
.
next_para
;
...
...
dlls/riched20/para.c
View file @
08437689
...
...
@@ -220,6 +220,13 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
new_para
->
member
.
para
.
pCell
=
run_para
->
member
.
para
.
pCell
;
assert
(
run_para
->
member
.
para
.
prev_para
->
member
.
para
.
nFlags
&
MEPF_CELL
);
assert
(
!
(
run_para
->
member
.
para
.
prev_para
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
));
if
(
new_para
->
member
.
para
.
pCell
!=
new_para
->
member
.
para
.
next_para
->
member
.
para
.
pCell
&&
new_para
->
member
.
para
.
next_para
->
member
.
para
.
pCell
&&
!
new_para
->
member
.
para
.
next_para
->
member
.
para
.
pCell
->
member
.
cell
.
prev_cell
)
{
/* Row starts just after the row that was ended. */
new_para
->
member
.
para
.
nFlags
|=
MEPF_ROWSTART
;
}
}
else
{
new_para
->
member
.
para
.
pCell
=
run_para
->
member
.
para
.
pCell
;
}
...
...
dlls/riched20/table.c
View file @
08437689
...
...
@@ -227,7 +227,7 @@ void ME_CheckTablesForCorruption(ME_TextEditor *editor)
}
else
if
(
!
(
p
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
))
{
assert
(
!
(
p
->
member
.
para
.
pFmt
->
wEffects
&
(
PFE_TABLE
|
PFE_TABLEROWDELIMITER
)
));
assert
(
!
(
p
->
member
.
para
.
pFmt
->
wEffects
&
PFE_TABLEROWDELIMITER
));
/* ROWSTART must be followed by a cell. */
assert
(
!
(
p
->
member
.
para
.
nFlags
&
MEPF_CELL
));
/* ROWSTART must be followed by a cell. */
...
...
@@ -393,10 +393,7 @@ ME_DisplayItem* ME_AppendTableRow(ME_TextEditor *editor,
assert
(
table_row
->
type
==
diParagraph
);
if
(
!
editor
->
bEmulateVersion10
)
{
/* v4.1 */
ME_DisplayItem
*
insertedCell
,
*
para
,
*
cell
;
if
(
table_row
->
member
.
para
.
nFlags
&
MEPF_ROWEND
)
cell
=
ME_FindItemBack
(
table_row
,
diCell
);
else
cell
=
ME_FindItemFwd
(
table_row
,
diCell
);
cell
=
ME_FindItemFwd
(
ME_GetTableRowStart
(
table_row
),
diCell
);
run
=
ME_GetTableRowEnd
(
table_row
)
->
member
.
para
.
next_para
;
run
=
ME_FindItemFwd
(
run
,
diRun
);
editor
->
pCursors
[
0
].
pRun
=
run
;
...
...
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