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
7e7a8f1a
Commit
7e7a8f1a
authored
Jan 07, 2014
by
Huw Davies
Committed by
Alexandre Julliard
Jan 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Simplify the code by accessing paragraphs directly from runs.
parent
996b3c87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
run.c
dlls/riched20/run.c
+4
-18
No files found.
dlls/riched20/run.c
View file @
7e7a8f1a
...
...
@@ -658,9 +658,7 @@ void ME_SetSelectionCharFormat(ME_TextEditor *editor, CHARFORMAT2W *pFmt)
*/
void
ME_SetCharFormat
(
ME_TextEditor
*
editor
,
ME_Cursor
*
start
,
ME_Cursor
*
end
,
CHARFORMAT2W
*
pFmt
)
{
ME_DisplayItem
*
para
;
ME_DisplayItem
*
run
;
ME_DisplayItem
*
end_run
=
NULL
;
ME_DisplayItem
*
run
,
*
end_run
=
NULL
;
if
(
end
&&
start
->
pRun
==
end
->
pRun
&&
start
->
nOffset
==
end
->
nOffset
)
return
;
...
...
@@ -682,27 +680,15 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C
ME_SplitRunSimple
(
editor
,
end
);
end_run
=
end
?
end
->
pRun
:
NULL
;
run
=
start
->
pRun
;
para
=
start
->
pPara
;
para
->
member
.
para
.
nFlags
|=
MEPF_REWRAP
;
while
(
run
!=
end_run
)
for
(
run
=
start
->
pRun
;
run
!=
end_run
;
run
=
ME_FindItemFwd
(
run
,
diRun
))
{
ME_Style
*
new_style
=
ME_ApplyStyle
(
run
->
member
.
run
.
style
,
pFmt
);
/* ME_DumpStyle(new_style); */
add_undo_set_char_fmt
(
editor
,
para
->
member
.
para
.
nCharOfs
+
run
->
member
.
run
.
nCharOfs
,
add_undo_set_char_fmt
(
editor
,
run
->
member
.
run
.
para
->
nCharOfs
+
run
->
member
.
run
.
nCharOfs
,
run
->
member
.
run
.
len
,
&
run
->
member
.
run
.
style
->
fmt
);
ME_ReleaseStyle
(
run
->
member
.
run
.
style
);
run
->
member
.
run
.
style
=
new_style
;
run
=
ME_FindItemFwd
(
run
,
diRunOrParagraph
);
if
(
run
&&
run
->
type
==
diParagraph
)
{
para
=
run
;
run
=
ME_FindItemFwd
(
run
,
diRun
);
if
(
run
!=
end_run
)
para
->
member
.
para
.
nFlags
|=
MEPF_REWRAP
;
}
run
->
member
.
run
.
para
->
nFlags
|=
MEPF_REWRAP
;
}
}
...
...
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