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
95938b7a
Commit
95938b7a
authored
Jan 30, 2013
by
Huw Davies
Committed by
Alexandre Julliard
Jan 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Add a paragraph ptr to each run.
parent
2ee3e807
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
editstr.h
dlls/riched20/editstr.h
+1
-0
para.c
dlls/riched20/para.c
+7
-3
run.c
dlls/riched20/run.c
+3
-0
No files found.
dlls/riched20/editstr.h
View file @
95938b7a
...
...
@@ -143,6 +143,7 @@ typedef struct tagME_Run
{
ME_String
*
strText
;
ME_Style
*
style
;
struct
tagME_Paragraph
*
para
;
/* ptr to the run's paragraph */
int
nCharOfs
;
/* relative to para's offset */
int
nWidth
;
/* width of full run, width of leading&trailing ws */
int
nFlags
;
...
...
dlls/riched20/para.c
View file @
95938b7a
...
...
@@ -67,6 +67,7 @@ void ME_MakeFirstParagraph(ME_TextEditor *editor)
eol_str
=
ME_MakeStringN
(
cr_lf
,
editor
->
bEmulateVersion10
?
2
:
1
);
run
=
ME_MakeRun
(
style
,
eol_str
,
MERF_ENDPARA
);
run
->
member
.
run
.
nCharOfs
=
0
;
run
->
member
.
run
.
para
=
&
para
->
member
.
para
;
ME_InsertBefore
(
text
->
pLast
,
para
);
ME_InsertBefore
(
text
->
pLast
,
run
);
...
...
@@ -213,16 +214,17 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
}
else
{
/* v1.0 - v3.0 */
assert
(
!
(
paraFlags
&
(
MEPF_CELL
|
MEPF_ROWSTART
|
MEPF_ROWEND
)));
}
end_run
=
ME_MakeRun
(
style
,
eol_str
,
run_flags
);
assert
(
run
->
type
==
diRun
);
run_para
=
ME_GetParagraph
(
run
);
assert
(
run_para
->
member
.
para
.
pFmt
->
cbSize
==
sizeof
(
PARAFORMAT2
));
end_run
=
ME_MakeRun
(
style
,
eol_str
,
run_flags
);
ofs
=
end_run
->
member
.
run
.
nCharOfs
=
run
->
member
.
run
.
nCharOfs
;
end_run
->
member
.
run
.
para
=
run
->
member
.
run
.
para
;
next_para
=
run_para
->
member
.
para
.
next_para
;
assert
(
next_para
==
ME_FindItemFwd
(
run_para
,
diParagraphOrEnd
));
add_undo_join_paras
(
editor
,
run_para
->
member
.
para
.
nCharOfs
+
ofs
);
/* Update selection cursors to point to the correct paragraph. */
...
...
@@ -238,6 +240,7 @@ ME_DisplayItem *ME_SplitParagraph(ME_TextEditor *editor, ME_DisplayItem *run,
pp
=
run
;
while
(
pp
->
type
==
diRun
)
{
pp
->
member
.
run
.
nCharOfs
-=
ofs
;
pp
->
member
.
run
.
para
=
&
new_para
->
member
.
para
;
pp
=
ME_FindItemFwd
(
pp
,
diRunOrParagraphOrEnd
);
}
new_para
->
member
.
para
.
nCharOfs
=
run_para
->
member
.
para
.
nCharOfs
+
ofs
;
...
...
@@ -409,6 +412,7 @@ ME_DisplayItem *ME_JoinParagraphs(ME_TextEditor *editor, ME_DisplayItem *tp,
break
;
TRACE
(
"shifting
\"
%s
\"
by %d (previous %d)
\n
"
,
debugstr_w
(
pTmp
->
member
.
run
.
strText
->
szData
),
shift
,
pTmp
->
member
.
run
.
nCharOfs
);
pTmp
->
member
.
run
.
nCharOfs
+=
shift
;
pTmp
->
member
.
run
.
para
=
&
tp
->
member
.
para
;
}
while
(
1
);
ME_Remove
(
pRun
);
...
...
dlls/riched20/run.c
View file @
95938b7a
...
...
@@ -310,6 +310,7 @@ ME_DisplayItem *ME_SplitRunSimple(ME_TextEditor *editor, ME_Cursor *cursor)
run
->
member
.
run
.
nFlags
&
MERF_SPLITMASK
);
new_run
->
member
.
run
.
nCharOfs
=
run
->
member
.
run
.
nCharOfs
+
nOffset
;
new_run
->
member
.
run
.
para
=
run
->
member
.
run
.
para
;
cursor
->
pRun
=
new_run
;
cursor
->
nOffset
=
0
;
...
...
@@ -341,6 +342,7 @@ ME_DisplayItem *ME_MakeRun(ME_Style *s, ME_String *strData, int nFlags)
item
->
member
.
run
.
strText
=
strData
;
item
->
member
.
run
.
nFlags
=
nFlags
;
item
->
member
.
run
.
nCharOfs
=
-
1
;
item
->
member
.
run
.
para
=
NULL
;
ME_AddRefStyle
(
s
);
return
item
;
}
...
...
@@ -366,6 +368,7 @@ ME_InsertRunAtCursor(ME_TextEditor *editor, ME_Cursor *cursor, ME_Style *style,
pDI
=
ME_MakeRun
(
style
,
ME_MakeStringN
(
str
,
len
),
flags
);
pDI
->
member
.
run
.
nCharOfs
=
cursor
->
pRun
->
member
.
run
.
nCharOfs
;
pDI
->
member
.
run
.
para
=
cursor
->
pRun
->
member
.
run
.
para
;
ME_InsertBefore
(
cursor
->
pRun
,
pDI
);
TRACE
(
"Shift length:%d
\n
"
,
len
);
ME_PropagateCharOffset
(
cursor
->
pRun
,
len
);
...
...
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