Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
670dadf7
Commit
670dadf7
authored
Oct 22, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Return paragraph ptrs from the remaining table insert functions.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
caa1d4a4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
15 deletions
+13
-15
editor.c
dlls/riched20/editor.c
+4
-4
editor.h
dlls/riched20/editor.h
+2
-2
table.c
dlls/riched20/table.c
+7
-9
No files found.
dlls/riched20/editor.c
View file @
670dadf7
...
...
@@ -966,7 +966,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
tableDef
->
row_start
=
table_insert_row_start_at_para
(
info
->
editor
,
para
);
info
->
nestingLevel
=
1
;
}
ME_InsertTableCellFromCursor
(
info
->
editor
);
table_insert_cell
(
info
->
editor
,
info
->
editor
->
pCursors
);
}
}
else
/* v1.0 - v3.0 */
...
...
@@ -1018,7 +1018,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
nRightBoundary
+=
defaultCellSize
;
cell
->
member
.
cell
.
nRightBoundary
=
nRightBoundary
;
}
para
=
&
ME_InsertTableCellFromCursor
(
info
->
editor
)
->
member
.
para
;
para
=
table_insert_cell
(
info
->
editor
,
info
->
editor
->
pCursors
)
;
cell
=
para
->
pCell
;
cell
->
member
.
cell
.
nRightBoundary
=
nRightBoundary
;
}
...
...
@@ -1033,7 +1033,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
cell
=
cell
->
member
.
cell
.
next_cell
;
if
(
!
cell
)
{
para
=
&
ME_InsertTableCellFromCursor
(
info
->
editor
)
->
member
.
para
;
para
=
table_insert_cell
(
info
->
editor
,
info
->
editor
->
pCursors
)
;
cell
=
para
->
pCell
;
}
}
...
...
@@ -1056,7 +1056,7 @@ void ME_RTFSpecialCharHook(RTF_Info *info)
nChars
,
TRUE
);
}
para
=
&
ME_InsertTableRowEndFromCursor
(
info
->
editor
)
->
member
.
para
;
para
=
table_insert_row_end
(
info
->
editor
,
info
->
editor
->
pCursors
)
;
para
->
fmt
.
dxOffset
=
abs
(
info
->
tableDef
->
gapH
);
para
->
fmt
.
dxStartIndent
=
info
->
tableDef
->
leftEdge
;
ME_ApplyBorderProperties
(
info
,
&
para
->
border
,
tableDef
->
border
);
...
...
dlls/riched20/editor.h
View file @
670dadf7
...
...
@@ -279,9 +279,9 @@ ME_Paragraph *editor_first_para( ME_TextEditor *editor ) DECLSPEC_HIDDEN;
/* table.c */
BOOL
ME_IsInTable
(
ME_DisplayItem
*
pItem
)
DECLSPEC_HIDDEN
;
ME_DisplayItem
*
ME_InsertTableCellFromCursor
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
ME_DisplayItem
*
ME_InsertTableRowEndFromCursor
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_append_row
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
table_row
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_cell
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_row_end
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_row_start
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_row_start_at_para
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_outer_para
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/table.c
View file @
670dadf7
...
...
@@ -113,21 +113,19 @@ ME_Paragraph* table_insert_row_start_at_para( ME_TextEditor *editor, ME_Paragrap
/* Inserts a diCell and starts a new paragraph for the next cell.
*
* Returns the first paragraph of the new cell. */
ME_
DisplayItem
*
ME_InsertTableCellFromCursor
(
ME_TextEditor
*
editor
)
ME_
Paragraph
*
table_insert_cell
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
{
ME_Paragraph
*
para
;
WCHAR
tab
=
'\t'
;
para
=
table_insert_end_para
(
editor
,
editor
->
pCursors
,
&
tab
,
1
,
MEPF_CELL
);
return
para_get_di
(
para
);
return
table_insert_end_para
(
editor
,
editor
->
pCursors
,
&
tab
,
1
,
MEPF_CELL
);
}
ME_
DisplayItem
*
ME_InsertTableRowEndFromCursor
(
ME_TextEditor
*
editor
)
ME_
Paragraph
*
table_insert_row_end
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
{
ME_Paragraph
*
para
;
para
=
table_insert_end_para
(
editor
,
editor
->
pCursors
,
cr_lf
,
2
,
MEPF_ROWEND
);
return
para_
get_di
(
para_prev
(
para
)
);
para
=
table_insert_end_para
(
editor
,
cursor
,
cr_lf
,
2
,
MEPF_ROWEND
);
return
para_
prev
(
para
);
}
ME_Paragraph
*
table_row_end
(
ME_Paragraph
*
para
)
...
...
@@ -424,13 +422,13 @@ ME_Paragraph* table_append_row( ME_TextEditor *editor, ME_Paragraph *table_row )
while
(
cell
->
member
.
cell
.
next_cell
)
{
cell
=
cell
->
member
.
cell
.
next_cell
;
para
=
&
ME_InsertTableCellFromCursor
(
editor
)
->
member
.
para
;
para
=
table_insert_cell
(
editor
,
editor
->
pCursors
)
;
insertedCell
=
ME_FindItemBack
(
para_get_di
(
para
),
diCell
);
/* Copy cell properties */
insertedCell
->
member
.
cell
.
nRightBoundary
=
cell
->
member
.
cell
.
nRightBoundary
;
insertedCell
->
member
.
cell
.
border
=
cell
->
member
.
cell
.
border
;
};
para
=
&
ME_InsertTableRowEndFromCursor
(
editor
)
->
member
.
para
;
para
=
table_insert_row_end
(
editor
,
editor
->
pCursors
)
;
para
->
fmt
=
prev_table_end
->
fmt
;
/* return the table row start for the inserted paragraph */
return
para_next
(
&
ME_FindItemFwd
(
cell
,
diParagraph
)
->
member
.
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