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
00824a03
Commit
00824a03
authored
Oct 19, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Pass a paragraph ptr to the paragraph destruction function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fd4b700a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
14 deletions
+13
-14
editor.c
dlls/riched20/editor.c
+3
-2
editor.h
dlls/riched20/editor.h
+1
-1
para.c
dlls/riched20/para.c
+9
-11
No files found.
dlls/riched20/editor.c
View file @
00824a03
...
@@ -3213,10 +3213,11 @@ void ME_DestroyEditor(ME_TextEditor *editor)
...
@@ -3213,10 +3213,11 @@ void ME_DestroyEditor(ME_TextEditor *editor)
ME_ClearTempStyle
(
editor
);
ME_ClearTempStyle
(
editor
);
ME_EmptyUndoStack
(
editor
);
ME_EmptyUndoStack
(
editor
);
editor
->
pBuffer
->
pFirst
=
NULL
;
editor
->
pBuffer
->
pFirst
=
NULL
;
while
(
p
)
{
while
(
p
)
{
pNext
=
p
->
next
;
pNext
=
p
->
next
;
if
(
p
->
type
==
diParagraph
)
if
(
p
->
type
==
diParagraph
)
destroy_para
(
editor
,
p
);
para_destroy
(
editor
,
&
p
->
member
.
para
);
else
else
ME_DestroyDisplayItem
(
p
);
ME_DestroyDisplayItem
(
p
);
p
=
pNext
;
p
=
pNext
;
...
...
dlls/riched20/editor.h
View file @
00824a03
...
@@ -75,7 +75,6 @@ ME_DisplayItem *ME_FindItemBackOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass
...
@@ -75,7 +75,6 @@ ME_DisplayItem *ME_FindItemBackOrHere(ME_DisplayItem *di, ME_DIType nTypeOrClass
ME_DisplayItem
*
ME_MakeDI
(
ME_DIType
type
)
DECLSPEC_HIDDEN
;
ME_DisplayItem
*
ME_MakeDI
(
ME_DIType
type
)
DECLSPEC_HIDDEN
;
void
ME_DestroyDisplayItem
(
ME_DisplayItem
*
item
)
DECLSPEC_HIDDEN
;
void
ME_DestroyDisplayItem
(
ME_DisplayItem
*
item
)
DECLSPEC_HIDDEN
;
void
ME_DumpDocument
(
ME_TextBuffer
*
buffer
)
DECLSPEC_HIDDEN
;
void
ME_DumpDocument
(
ME_TextBuffer
*
buffer
)
DECLSPEC_HIDDEN
;
void
destroy_para
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
item
)
DECLSPEC_HIDDEN
;
/* string.c */
/* string.c */
ME_String
*
ME_MakeStringN
(
LPCWSTR
szText
,
int
nMaxChars
)
DECLSPEC_HIDDEN
;
ME_String
*
ME_MakeStringN
(
LPCWSTR
szText
,
int
nMaxChars
)
DECLSPEC_HIDDEN
;
...
@@ -205,6 +204,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPE
...
@@ -205,6 +204,7 @@ void ME_GetSelectionParaFormat(ME_TextEditor *editor, PARAFORMAT2 *pFmt) DECLSPE
void
ME_MarkAllForWrapping
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
ME_MarkAllForWrapping
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
ME_SetDefaultParaFormat
(
ME_TextEditor
*
editor
,
PARAFORMAT2
*
pFmt
)
DECLSPEC_HIDDEN
;
void
ME_SetDefaultParaFormat
(
ME_TextEditor
*
editor
,
PARAFORMAT2
*
pFmt
)
DECLSPEC_HIDDEN
;
int
get_total_width
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
int
get_total_width
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
para_destroy
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
item
)
DECLSPEC_HIDDEN
;
ME_Run
*
para_end_run
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Run
*
para_end_run
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Run
*
para_first_run
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Run
*
para_first_run
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
para_join
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
para
,
BOOL
use_first_fmt
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
para_join
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
para
,
BOOL
use_first_fmt
)
DECLSPEC_HIDDEN
;
...
...
dlls/riched20/para.c
View file @
00824a03
...
@@ -39,20 +39,18 @@ static ME_Paragraph *para_create( ME_TextEditor *editor )
...
@@ -39,20 +39,18 @@ static ME_Paragraph *para_create( ME_TextEditor *editor )
return
&
item
->
member
.
para
;
return
&
item
->
member
.
para
;
}
}
void
destroy_para
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
item
)
void
para_destroy
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
para
)
{
{
assert
(
item
->
type
==
diParagraph
);
if
(
para
->
nWidth
==
editor
->
nTotalWidth
)
if
(
item
->
member
.
para
.
nWidth
==
editor
->
nTotalWidth
)
{
{
item
->
member
.
para
.
nWidth
=
0
;
para
->
nWidth
=
0
;
editor
->
nTotalWidth
=
get_total_width
(
editor
);
editor
->
nTotalWidth
=
get_total_width
(
editor
);
}
}
editor
->
total_rows
-=
item
->
member
.
para
.
nRows
;
editor
->
total_rows
-=
para
->
nRows
;
ME_DestroyString
(
item
->
member
.
para
.
text
);
ME_DestroyString
(
para
->
text
);
para_num_clear
(
&
item
->
member
.
para
.
para_num
);
para_num_clear
(
&
para
->
para_num
);
para_mark_remove
(
editor
,
&
item
->
member
.
para
);
para_mark_remove
(
editor
,
para
);
ME_DestroyDisplayItem
(
item
);
ME_DestroyDisplayItem
(
para_get_di
(
para
)
);
}
}
/* Note para_next/prev will return the start and end doc nodes */
/* Note para_next/prev will return the start and end doc nodes */
...
@@ -762,7 +760,7 @@ ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_fir
...
@@ -762,7 +760,7 @@ ME_Paragraph *para_join( ME_TextEditor *editor, ME_Paragraph *para, BOOL use_fir
para
->
next_para
=
next
->
next_para
;
para
->
next_para
=
next
->
next_para
;
next
->
next_para
->
member
.
para
.
prev_para
=
para_get_di
(
para
);
next
->
next_para
->
member
.
para
.
prev_para
=
para_get_di
(
para
);
ME_Remove
(
para_get_di
(
next
)
);
ME_Remove
(
para_get_di
(
next
)
);
destroy_para
(
editor
,
para_get_di
(
next
)
);
para_destroy
(
editor
,
next
);
ME_PropagateCharOffset
(
para
->
next_para
,
-
end_len
);
ME_PropagateCharOffset
(
para
->
next_para
,
-
end_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