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
b958dfdc
Commit
b958dfdc
authored
Apr 16, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Apr 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Change helper function to return the matching entry.
parent
e58a9db1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
clipboard.c
dlls/ole32/clipboard.c
+16
-11
No files found.
dlls/ole32/clipboard.c
View file @
b958dfdc
...
...
@@ -528,6 +528,21 @@ static HRESULT render_embed_source_hack(IDataObject *data, LPFORMATETC fmt)
return
hr
;
}
/************************************************************************
* find_format_in_list
*
* Returns the first entry that matches the provided clipboard format.
*/
static
inline
ole_priv_data_entry
*
find_format_in_list
(
ole_priv_data_entry
*
entries
,
DWORD
num
,
UINT
cf
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
num
;
i
++
)
if
(
entries
[
i
].
fmtetc
.
cfFormat
==
cf
)
return
&
entries
[
i
];
return
NULL
;
}
/***********************************************************************
* render_format
*
...
...
@@ -1211,16 +1226,6 @@ static HWND OLEClipbrd_CreateWindow(void)
return
hwnd
;
}
static
inline
BOOL
is_format_in_list
(
ole_priv_data_entry
*
entries
,
DWORD
num
,
UINT
cf
)
{
DWORD
i
;
for
(
i
=
0
;
i
<
num
;
i
++
)
if
(
entries
[
i
].
fmtetc
.
cfFormat
==
cf
)
return
TRUE
;
return
FALSE
;
}
/*********************************************************************
* set_clipboard_formats
*
...
...
@@ -1294,7 +1299,7 @@ static HRESULT set_clipboard_formats(ole_clipbrd *clipbrd, IDataObject *data)
CoTaskMemFree
(
fmt
.
ptd
);
}
priv_data
->
entries
[
idx
].
first_use
=
!
is
_format_in_list
(
priv_data
->
entries
,
idx
,
fmt
.
cfFormat
);
priv_data
->
entries
[
idx
].
first_use
=
!
find
_format_in_list
(
priv_data
->
entries
,
idx
,
fmt
.
cfFormat
);
priv_data
->
entries
[
idx
].
unk
[
0
]
=
0
;
priv_data
->
entries
[
idx
].
unk
[
1
]
=
0
;
...
...
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