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
103cd9f2
Commit
103cd9f2
authored
Oct 21, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Return a paragraph ptr from the table insert helper.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f0783863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
table.c
dlls/riched20/table.c
+23
-23
No files found.
dlls/riched20/table.c
View file @
103cd9f2
...
@@ -58,29 +58,27 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit_lists);
...
@@ -58,29 +58,27 @@ WINE_DEFAULT_DEBUG_CHANNEL(richedit_lists);
static
const
WCHAR
cr_lf
[]
=
{
'\r'
,
'\n'
,
0
};
static
const
WCHAR
cr_lf
[]
=
{
'\r'
,
'\n'
,
0
};
static
ME_DisplayItem
*
ME_InsertEndParaFromCursor
(
ME_TextEditor
*
editor
,
static
ME_Paragraph
*
table_insert_end_para
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
,
int
nCursor
,
const
WCHAR
*
eol_str
,
int
eol_len
,
int
para_flags
)
const
WCHAR
*
eol_str
,
int
eol_len
,
int
paraFlags
)
{
{
ME_Style
*
pStyle
=
style_get_insert_style
(
editor
,
editor
->
pCursors
+
nCursor
);
ME_Style
*
style
=
style_get_insert_style
(
editor
,
cursor
);
ME_Paragraph
*
para
;
ME_Paragraph
*
para
;
ME_Cursor
*
cursor
=
&
editor
->
pCursors
[
nCursor
];
if
(
cursor
->
nOffset
)
run_split
(
editor
,
cursor
);
if
(
cursor
->
nOffset
)
run_split
(
editor
,
cursor
);
para
=
para_split
(
editor
,
&
cursor
->
pRun
->
member
.
run
,
pStyle
,
eol_str
,
eol_len
,
paraF
lags
);
para
=
para_split
(
editor
,
&
cursor
->
pRun
->
member
.
run
,
style
,
eol_str
,
eol_len
,
para_f
lags
);
ME_ReleaseStyle
(
pStyle
);
ME_ReleaseStyle
(
style
);
cursor
->
pPara
=
para_get_di
(
para
);
cursor
->
pPara
=
para_get_di
(
para
);
cursor
->
pRun
=
run_get_di
(
para_first_run
(
para
)
);
cursor
->
pRun
=
run_get_di
(
para_first_run
(
para
)
);
return
para_get_di
(
para
)
;
return
para
;
}
}
ME_DisplayItem
*
ME_InsertTableRowStartFromCursor
(
ME_TextEditor
*
editor
)
ME_DisplayItem
*
ME_InsertTableRowStartFromCursor
(
ME_TextEditor
*
editor
)
{
{
ME_DisplayItem
*
para
;
ME_Paragraph
*
para
;
para
=
ME_InsertEndParaFromCursor
(
editor
,
0
,
cr_lf
,
2
,
MEPF_ROWSTART
);
return
para
->
member
.
para
.
prev_para
;
para
=
table_insert_end_para
(
editor
,
editor
->
pCursors
,
cr_lf
,
2
,
MEPF_ROWSTART
);
return
para_get_di
(
para_prev
(
para
)
);
}
}
ME_DisplayItem
*
ME_InsertTableRowStartAtParagraph
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
ME_InsertTableRowStartAtParagraph
(
ME_TextEditor
*
editor
,
...
@@ -120,17 +118,19 @@ ME_DisplayItem* ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor,
...
@@ -120,17 +118,19 @@ ME_DisplayItem* ME_InsertTableRowStartAtParagraph(ME_TextEditor *editor,
* Returns the first paragraph of the new cell. */
* Returns the first paragraph of the new cell. */
ME_DisplayItem
*
ME_InsertTableCellFromCursor
(
ME_TextEditor
*
editor
)
ME_DisplayItem
*
ME_InsertTableCellFromCursor
(
ME_TextEditor
*
editor
)
{
{
ME_DisplayItem
*
para
;
ME_Paragraph
*
para
;
WCHAR
tab
=
'\t'
;
WCHAR
tab
=
'\t'
;
para
=
ME_InsertEndParaFromCursor
(
editor
,
0
,
&
tab
,
1
,
MEPF_CELL
);
return
para
;
para
=
table_insert_end_para
(
editor
,
editor
->
pCursors
,
&
tab
,
1
,
MEPF_CELL
);
return
para_get_di
(
para
);
}
}
ME_DisplayItem
*
ME_InsertTableRowEndFromCursor
(
ME_TextEditor
*
editor
)
ME_DisplayItem
*
ME_InsertTableRowEndFromCursor
(
ME_TextEditor
*
editor
)
{
{
ME_DisplayItem
*
para
;
ME_Paragraph
*
para
;
para
=
ME_InsertEndParaFromCursor
(
editor
,
0
,
cr_lf
,
2
,
MEPF_ROWEND
);
return
para
->
member
.
para
.
prev_para
;
para
=
table_insert_end_para
(
editor
,
editor
->
pCursors
,
cr_lf
,
2
,
MEPF_ROWEND
);
return
para_get_di
(
para_prev
(
para
)
);
}
}
ME_Paragraph
*
table_row_end
(
ME_Paragraph
*
para
)
ME_Paragraph
*
table_row_end
(
ME_Paragraph
*
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