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
f47aab61
Commit
f47aab61
authored
Nov 09, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Nov 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Release the font cache when changing the default style.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bb165d22
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
19 deletions
+28
-19
run.c
dlls/riched20/run.c
+0
-19
style.c
dlls/riched20/style.c
+28
-0
No files found.
dlls/riched20/run.c
View file @
f47aab61
...
@@ -763,25 +763,6 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C
...
@@ -763,25 +763,6 @@ void ME_SetCharFormat(ME_TextEditor *editor, ME_Cursor *start, ME_Cursor *end, C
}
}
}
}
/******************************************************************************
* ME_SetDefaultCharFormat
*
* Applies a style change to the default character style.
*/
void
ME_SetDefaultCharFormat
(
ME_TextEditor
*
editor
,
CHARFORMAT2W
*
mod
)
{
ME_Style
*
style
;
assert
(
mod
->
cbSize
==
sizeof
(
CHARFORMAT2W
));
style
=
ME_ApplyStyle
(
editor
->
pBuffer
->
pDefaultStyle
,
mod
);
editor
->
pBuffer
->
pDefaultStyle
->
fmt
=
style
->
fmt
;
editor
->
pBuffer
->
pDefaultStyle
->
tm
=
style
->
tm
;
ScriptFreeCache
(
&
editor
->
pBuffer
->
pDefaultStyle
->
script_cache
);
ME_ReleaseStyle
(
style
);
ME_MarkAllForWrapping
(
editor
);
/* pcf = editor->pBuffer->pDefaultStyle->fmt; */
}
static
void
ME_GetRunCharFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
run
,
CHARFORMAT2W
*
pFmt
)
static
void
ME_GetRunCharFormat
(
ME_TextEditor
*
editor
,
ME_DisplayItem
*
run
,
CHARFORMAT2W
*
pFmt
)
{
{
ME_CopyCharFormat
(
pFmt
,
&
run
->
member
.
run
.
style
->
fmt
);
ME_CopyCharFormat
(
pFmt
,
&
run
->
member
.
run
.
style
->
fmt
);
...
...
dlls/riched20/style.c
View file @
f47aab61
...
@@ -508,3 +508,31 @@ void ME_ClearTempStyle(ME_TextEditor *editor)
...
@@ -508,3 +508,31 @@ void ME_ClearTempStyle(ME_TextEditor *editor)
ME_ReleaseStyle
(
editor
->
pBuffer
->
pCharStyle
);
ME_ReleaseStyle
(
editor
->
pBuffer
->
pCharStyle
);
editor
->
pBuffer
->
pCharStyle
=
NULL
;
editor
->
pBuffer
->
pCharStyle
=
NULL
;
}
}
/******************************************************************************
* ME_SetDefaultCharFormat
*
* Applies a style change to the default character style.
*
* The default style is special in that it is mutable - runs
* in the document that have this style should change if the
* default style changes. That means we need to fix up this
* style manually.
*/
void
ME_SetDefaultCharFormat
(
ME_TextEditor
*
editor
,
CHARFORMAT2W
*
mod
)
{
ME_Style
*
style
,
*
def
=
editor
->
pBuffer
->
pDefaultStyle
;
assert
(
mod
->
cbSize
==
sizeof
(
CHARFORMAT2W
));
style
=
ME_ApplyStyle
(
def
,
mod
);
def
->
fmt
=
style
->
fmt
;
def
->
tm
=
style
->
tm
;
if
(
def
->
font_cache
)
{
release_font_cache
(
def
->
font_cache
);
def
->
font_cache
=
NULL
;
}
ScriptFreeCache
(
&
def
->
script_cache
);
ME_ReleaseStyle
(
style
);
ME_MarkAllForWrapping
(
editor
);
}
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