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
b692fb5e
Commit
b692fb5e
authored
Nov 06, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Nov 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use more cell helpers in some of the table functions.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96097c07
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
table.c
dlls/riched20/table.c
+17
-18
No files found.
dlls/riched20/table.c
View file @
b692fb5e
...
...
@@ -96,7 +96,7 @@ ME_Paragraph* table_insert_row_start_at_para( ME_TextEditor *editor, ME_Paragrap
while
(
para
!=
end_para
)
{
para
->
pCell
=
prev_para
->
pCell
;
para
->
pCell
=
cell_get_di
(
para_cell
(
prev_para
)
)
;
para
->
nFlags
|=
MEPF_CELL
;
para
->
nFlags
&=
~
(
MEPF_ROWSTART
|
MEPF_ROWEND
);
para
->
fmt
.
dwMask
|=
PFM_TABLE
|
PFM_TABLEROWDELIMITER
;
...
...
@@ -128,32 +128,31 @@ ME_Paragraph* table_insert_row_end( ME_TextEditor *editor, ME_Cursor *cursor )
ME_Paragraph
*
table_row_end
(
ME_Paragraph
*
para
)
{
ME_
DisplayItem
*
cell
;
assert
(
para
);
ME_
Cell
*
cell
;
if
(
para
->
nFlags
&
MEPF_ROWEND
)
return
para
;
if
(
para
->
nFlags
&
MEPF_ROWSTART
)
para
=
para_next
(
para
);
cell
=
para
->
pCell
;
assert
(
cell
&&
cell
->
type
==
diCell
);
while
(
cell
->
member
.
cell
.
next_cell
)
cell
=
cell
->
member
.
cell
.
next_cell
;
cell
=
para_cell
(
para
);
while
(
cell_next
(
cell
))
cell
=
cell_next
(
cell
);
para
=
&
ME_FindItemFwd
(
cell
,
diParagraph
)
->
member
.
para
;
para
=
&
ME_FindItemFwd
(
cell
_get_di
(
cell
)
,
diParagraph
)
->
member
.
para
;
assert
(
para
&&
para
->
nFlags
&
MEPF_ROWEND
);
return
para
;
}
ME_Paragraph
*
table_row_start
(
ME_Paragraph
*
para
)
{
ME_
DisplayItem
*
cell
;
assert
(
para
);
ME_
Cell
*
cell
;
if
(
para
->
nFlags
&
MEPF_ROWSTART
)
return
para
;
if
(
para
->
nFlags
&
MEPF_ROWEND
)
para
=
para_prev
(
para
);
cell
=
para
->
pCell
;
assert
(
cell
&&
cell
->
type
==
diCell
);
while
(
cell
->
member
.
cell
.
prev_cell
)
cell
=
cell
->
member
.
cell
.
prev_cell
;
cell
=
para
_cell
(
para
)
;
while
(
cell
_prev
(
cell
)
)
cell
=
cell
_prev
(
cell
)
;
para
=
&
ME_FindItemBack
(
cell
,
diParagraph
)
->
member
.
para
;
para
=
&
ME_FindItemBack
(
cell
_get_di
(
cell
)
,
diParagraph
)
->
member
.
para
;
assert
(
para
&&
para
->
nFlags
&
MEPF_ROWSTART
);
return
para
;
}
...
...
@@ -161,11 +160,11 @@ ME_Paragraph* table_row_start( ME_Paragraph *para )
ME_Paragraph
*
table_outer_para
(
ME_Paragraph
*
para
)
{
if
(
para
->
nFlags
&
MEPF_ROWEND
)
para
=
para_prev
(
para
);
while
(
para
->
pCell
)
while
(
para
_cell
(
para
)
)
{
para
=
table_row_start
(
para
);
if
(
!
para
->
pCell
)
break
;
para
=
&
ME_FindItemBack
(
para
->
pCell
,
diParagraph
)
->
member
.
para
;
if
(
!
para
_cell
(
para
)
)
break
;
para
=
&
ME_FindItemBack
(
cell_get_di
(
para_cell
(
para
)
)
,
diParagraph
)
->
member
.
para
;
}
return
para
;
}
...
...
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