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
f4745c0a
Commit
f4745c0a
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: Make all formats available to the clipboard.
parent
1e8727aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
clipboard.c
dlls/ole32/clipboard.c
+17
-11
No files found.
dlls/ole32/clipboard.c
View file @
f4745c0a
...
...
@@ -61,6 +61,7 @@
#include <assert.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#define COBJMACROS
#define NONAMELESSUNION
...
...
@@ -166,6 +167,15 @@ static UINT dataobject_clipboard_format;
static
UINT
ole_priv_data_clipboard_format
;
static
UINT
embed_source_clipboard_format
;
static
inline
char
*
dump_fmtetc
(
FORMATETC
*
fmt
)
{
static
char
buf
[
100
];
snprintf
(
buf
,
sizeof
(
buf
),
"cf %04x ptd %p aspect %x lindex %d tymed %x"
,
fmt
->
cfFormat
,
fmt
->
ptd
,
fmt
->
dwAspect
,
fmt
->
lindex
,
fmt
->
tymed
);
return
buf
;
}
/*---------------------------------------------------------------------*
* Implementation of the internal IEnumFORMATETC interface returned by
* the OLE clipboard's IDataObject.
...
...
@@ -1235,11 +1245,11 @@ static HWND OLEClipbrd_CreateWindow(void)
/*********************************************************************
* set_clipboard_formats
*
* Enumerate all
HGLOBAL
formats supported by the source and make
* Enumerate all formats supported by the source and make
* those formats available using delayed rendering using SetClipboardData.
* Cache the enumeration list and make that list visibile as the
* 'Ole Private Data' format on the clipboard.
*
* TODO: We need to additionally handle TYMED_IStorage and
* TYMED_IStream data by copying into global memory.
*/
static
HRESULT
set_clipboard_formats
(
ole_clipbrd
*
clipbrd
,
IDataObject
*
data
)
{
...
...
@@ -1287,14 +1297,7 @@ static HRESULT set_clipboard_formats(ole_clipbrd *clipbrd, IDataObject *data)
while
(
IEnumFORMATETC_Next
(
enum_fmt
,
1
,
&
fmt
,
NULL
)
==
S_OK
)
{
if
(
fmt
.
tymed
==
TYMED_HGLOBAL
)
{
char
fmt_name
[
80
];
TRACE
(
"(cfFormat=%d:%s)
\n
"
,
fmt
.
cfFormat
,
GetClipboardFormatNameA
(
fmt
.
cfFormat
,
fmt_name
,
sizeof
(
fmt_name
)
-
1
)
?
fmt_name
:
""
);
SetClipboardData
(
fmt
.
cfFormat
,
NULL
);
}
TRACE
(
"%s
\n
"
,
dump_fmtetc
(
&
fmt
));
priv_data
->
entries
[
idx
].
fmtetc
=
fmt
;
if
(
fmt
.
ptd
)
...
...
@@ -1309,6 +1312,9 @@ static HRESULT set_clipboard_formats(ole_clipbrd *clipbrd, IDataObject *data)
priv_data
->
entries
[
idx
].
unk
[
0
]
=
0
;
priv_data
->
entries
[
idx
].
unk
[
1
]
=
0
;
if
(
priv_data
->
entries
[
idx
].
first_use
)
SetClipboardData
(
fmt
.
cfFormat
,
NULL
);
idx
++
;
}
...
...
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