Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b133e94b
Commit
b133e94b
authored
Apr 23, 2009
by
Huw Davies
Committed by
Alexandre Julliard
Apr 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Register a few more clipboard formats and make them have global scope.
parent
689c510f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
15 deletions
+49
-15
clipboard.c
dlls/ole32/clipboard.c
+37
-15
compobj_private.h
dlls/ole32/compobj_private.h
+12
-0
No files found.
dlls/ole32/clipboard.c
View file @
b133e94b
...
...
@@ -196,9 +196,17 @@ static const WCHAR clipbrd_wndclass[] = {'C','L','I','P','B','R','D','W','N','D'
static
const
WCHAR
wine_marshal_dataobject
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'm'
,
'a'
,
'r'
,
's'
,
'h'
,
'a'
,
'l'
,
' '
,
'd'
,
'a'
,
't'
,
'a'
,
'o'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
UINT
dataobject_clipboard_format
;
static
UINT
ole_priv_data_clipboard_format
;
static
UINT
embed_source_clipboard_format
;
UINT
ownerlink_clipboard_format
=
0
;
UINT
filename_clipboard_format
=
0
;
UINT
filenameW_clipboard_format
=
0
;
UINT
dataobject_clipboard_format
=
0
;
UINT
embedded_object_clipboard_format
=
0
;
UINT
embed_source_clipboard_format
=
0
;
UINT
custom_link_source_clipboard_format
=
0
;
UINT
link_source_clipboard_format
=
0
;
UINT
object_descriptor_clipboard_format
=
0
;
UINT
link_source_descriptor_clipboard_format
=
0
;
UINT
ole_private_data_clipboard_format
=
0
;
static
inline
char
*
dump_fmtetc
(
FORMATETC
*
fmt
)
{
...
...
@@ -952,7 +960,7 @@ static HRESULT get_priv_data(ole_priv_data **data)
*
data
=
NULL
;
handle
=
GetClipboardData
(
ole_priv_data_clipboard_format
);
handle
=
GetClipboardData
(
ole_priv
ate
_data_clipboard_format
);
if
(
handle
)
{
ole_priv_data
*
src
=
GlobalLock
(
handle
);
...
...
@@ -1358,16 +1366,30 @@ static snapshot *snapshot_construct(DWORD seq_no)
*/
static
void
register_clipboard_formats
(
void
)
{
static
const
WCHAR
DataObjectW
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
const
WCHAR
OlePrivateDataW
[]
=
{
'O'
,
'l'
,
'e'
,
' '
,
'P'
,
'r'
,
'i'
,
'v'
,
'a'
,
't'
,
'e'
,
' '
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
static
const
WCHAR
EmbedSourceW
[]
=
{
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
if
(
!
dataobject_clipboard_format
)
dataobject_clipboard_format
=
RegisterClipboardFormatW
(
DataObjectW
);
if
(
!
ole_priv_data_clipboard_format
)
ole_priv_data_clipboard_format
=
RegisterClipboardFormatW
(
OlePrivateDataW
);
if
(
!
embed_source_clipboard_format
)
embed_source_clipboard_format
=
RegisterClipboardFormatW
(
EmbedSourceW
);
static
const
WCHAR
OwnerLink
[]
=
{
'O'
,
'w'
,
'n'
,
'e'
,
'r'
,
'L'
,
'i'
,
'n'
,
'k'
,
0
};
static
const
WCHAR
FileName
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
FileNameW
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
'W'
,
0
};
static
const
WCHAR
DataObject
[]
=
{
'D'
,
'a'
,
't'
,
'a'
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
const
WCHAR
EmbeddedObject
[]
=
{
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
'd'
,
'e'
,
'd'
,
' '
,
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
0
};
static
const
WCHAR
EmbedSource
[]
=
{
'E'
,
'm'
,
'b'
,
'e'
,
'd'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
CustomLinkSource
[]
=
{
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
' '
,
'L'
,
'i'
,
'n'
,
'k'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
LinkSource
[]
=
{
'L'
,
'i'
,
'n'
,
'k'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
static
const
WCHAR
ObjectDescriptor
[]
=
{
'O'
,
'b'
,
'j'
,
'e'
,
'c'
,
't'
,
' '
,
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
LinkSourceDescriptor
[]
=
{
'L'
,
'i'
,
'n'
,
'k'
,
' '
,
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
' '
,
'D'
,
'e'
,
's'
,
'c'
,
'r'
,
'i'
,
'p'
,
't'
,
'o'
,
'r'
,
0
};
static
const
WCHAR
OlePrivateData
[]
=
{
'O'
,
'l'
,
'e'
,
' '
,
'P'
,
'r'
,
'i'
,
'v'
,
'a'
,
't'
,
'e'
,
' '
,
'D'
,
'a'
,
't'
,
'a'
,
0
};
ownerlink_clipboard_format
=
RegisterClipboardFormatW
(
OwnerLink
);
filename_clipboard_format
=
RegisterClipboardFormatW
(
FileName
);
filenameW_clipboard_format
=
RegisterClipboardFormatW
(
FileNameW
);
dataobject_clipboard_format
=
RegisterClipboardFormatW
(
DataObject
);
embedded_object_clipboard_format
=
RegisterClipboardFormatW
(
EmbeddedObject
);
embed_source_clipboard_format
=
RegisterClipboardFormatW
(
EmbedSource
);
custom_link_source_clipboard_format
=
RegisterClipboardFormatW
(
CustomLinkSource
);
link_source_clipboard_format
=
RegisterClipboardFormatW
(
LinkSource
);
object_descriptor_clipboard_format
=
RegisterClipboardFormatW
(
ObjectDescriptor
);
link_source_descriptor_clipboard_format
=
RegisterClipboardFormatW
(
LinkSourceDescriptor
);
ole_private_data_clipboard_format
=
RegisterClipboardFormatW
(
OlePrivateData
);
}
/***********************************************************************
...
...
@@ -1524,7 +1546,7 @@ static HRESULT set_clipboard_formats(ole_clipbrd *clipbrd, IDataObject *data)
td_offs_to_ptr
(
clipbrd
->
cached_enum
,
(
DWORD_PTR
)
clipbrd
->
cached_enum
->
entries
[
idx
].
fmtetc
.
ptd
);
GlobalUnlock
(
priv_data_handle
);
SetClipboardData
(
ole_priv_data_clipboard_format
,
priv_data_handle
);
SetClipboardData
(
ole_priv
ate
_data_clipboard_format
,
priv_data_handle
);
return
S_OK
;
}
...
...
dlls/ole32/compobj_private.h
View file @
b133e94b
...
...
@@ -319,4 +319,16 @@ extern HRESULT WINAPI OLE32_DllUnregisterServer(void) DECLSPEC_HIDDEN;
HRESULT
DataAdviseHolder_OnConnect
(
IDataAdviseHolder
*
iface
,
IDataObject
*
pDelegate
);
void
DataAdviseHolder_OnDisconnect
(
IDataAdviseHolder
*
iface
);
extern
UINT
ownerlink_clipboard_format
;
extern
UINT
filename_clipboard_format
;
extern
UINT
filenameW_clipboard_format
;
extern
UINT
dataobject_clipboard_format
;
extern
UINT
embedded_object_clipboard_format
;
extern
UINT
embed_source_clipboard_format
;
extern
UINT
custom_link_source_clipboard_format
;
extern
UINT
link_source_clipboard_format
;
extern
UINT
object_descriptor_clipboard_format
;
extern
UINT
link_source_descriptor_clipboard_format
;
extern
UINT
ole_private_data_clipboard_format
;
#endif
/* __WINE_OLE_COMPOBJ_H */
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