Commit Graph

117 Commits

Author SHA1 Message Date
Marcus Meissner d382b8e91a ole32: Clipboard format in the datacache is with trailing \0.
GetClipboardFormatName returns length without terminating 0,
but we need to store it with \0.

Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 19:36:41 +01:00
Huw Davies 525a7ab1df ole32: Implement IOleCache_InitCache().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Huw Davies ca2607db32 ole32: Implement IOleCache2_UpdateCache().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Huw Davies 9cf2bd9d91 ole32: There's no need to store a separate clip format for the data.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Huw Davies c3fe4b87d6 ole32: TYMED_NULL is not valid.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Huw Davies 12718fe021 ole32: A presentation cache for DVASPECT_ICON must have format CF_METAFILEPICT.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Huw Davies 8d0a53e60d ole32: Adding a view cache for DVASPECT_ICON produces a CF_METAFILEPICT cache entry.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-31 17:00:49 +01:00
Dmitry Timoshkov f7eabdf3a8 ole32: Remove an optimization from DataCache_Save() that copies whole original storage.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-20 18:59:35 +02:00
Huw Davies 87ccecbfa2 ole32: In the non-aggregated case a request for IUnknown actually returns IOleCache2.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-05 19:33:09 +02:00
Dmitry Timoshkov 7ce77b464c ole32: Add a trace to IDataObject::GetData.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-20 16:22:29 +02:00
Huw Davies 33a720b7d7 ole32: InitNew() should fail if there is a current storage.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:47:14 +02:00
Huw Davies 966e8a2c24 ole32: Create initial cache entries for the CLSID_Picture_ classes.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:47:14 +02:00
Huw Davies 111b72fc85 ole32: Add the ability to create an entry without returning it.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:47:14 +02:00
Huw Davies 705ccd7488 ole32: Start allocating regular cache entries with id of 2.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:47:13 +02:00
Huw Davies 026756482a ole32: Fix incorrectly assigned member in the presentation stream.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:47:13 +02:00
Francois Gouget 85a130958c ole32: Make bitmap_info_size() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-06 13:08:46 +02:00
Huw Davies 2e363267eb ole32: Synthesize dibs or bitmaps as appropriate.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 16:29:46 +02:00
Huw Davies e27708f2fd ole32: Create CF_DIB and CF_BITMAP entries when either is cached.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 16:29:33 +02:00
Huw Davies 20a8f1adf4 ole32: Implement IOleCache_EnumCache().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 16:29:12 +02:00
Huw Davies f9b0f60ae3 ole32: Check the cache entry's stgmedium for the unloaded state.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-23 16:29:09 +02:00
Huw Davies 1d2860e54c ole32: Fix up the dib's resolution on loading.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 13:37:46 +02:00
Huw Davies e7bb4ba269 ole32: Don't cache the BITMAPFILEHEADER.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 13:37:38 +02:00
Huw Davies fc49d98f6a ole32: Set the advise flags in CreateEntry().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 13:37:22 +02:00
Huw Davies 9ee30d7915 ole32: Use the helper function to copy the datacache's FORMATETC.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-18 13:37:14 +02:00
Michael Stefaniuc d17e760cb3 ole32: Standardize COM aggregation for the DataCache.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-06 16:19:43 +09:00
Nikolay Sivov fde61d467a ole32: Fix CreataDataCache() return value when requested riid is not IUnknown, for aggregation case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-22 22:23:31 +09:00
Dmitry Timoshkov 39d2ce5956 ole32: Relax media type check when loading CF_METAFILEPICT format from OLE storage.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-03 22:14:04 +09:00
Dmitry Timoshkov 421b3ca3eb ole32: Fallback to parsing the Presentation streams ff parsing of the "CONTENTS" stream fails.
I have an application that tries to load an existing object from the file
using OleLoad() and fails because the "CONTENTS" stream has clsid set to
"Microsoft Photo Editor 3.0 Picture". I've dumped the contents of the OLE
storage to disk for investigation, and under Windows (where Microsoft Photo
Editor is not installed, and registry has no traces of its class guids)
OleLoad() is able to load objects from this storage, and after that OleDraw()
successfully paints the object contents on the screen. I've written an
application to play with the dumped storage, and under Windows the "CONTENTS"
stream also can't be loaded, but the storage also contains the "OlePres000"
stream which contains an object in CF_METAFILEPICT format, and this one can be
loaded and painted.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-29 21:20:07 +09:00
Dmitry Timoshkov 1b580e70e9 ole32: Print a FIXME when the "CONTENTS" stream refers to unsupported format.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-23 19:20:25 +09:00
Dmitry Timoshkov b9d8c2b1ea ole32: Initialize number of bytes read before the comparison.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-21 19:19:08 +09:00
Huw Davies 94ee4096ec ole32: Add a stub for OleCreateFromFileEx.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-10-09 19:17:02 +09:00
Huw Davies b0deb315a0 ole32: Implement QueryGetData(). 2015-03-25 19:45:58 +09:00
Huw Davies b4cd2c4dbb ole32: Add support for drawing the dib format. 2015-03-25 19:45:55 +09:00
Huw Davies e410f273cd ole32: Add support for retrieving extents of dib format. 2015-03-25 19:45:52 +09:00
Huw Davies bbba2c00aa ole32: Add support for loading dibs. 2015-03-25 19:45:48 +09:00
Huw Davies 547fd746bb ole32: Separate metafile loading into a helper function. 2015-03-25 19:45:42 +09:00
Huw Davies 480c10cce9 ole32: Add support for parsing the 'CONTENTS' stream. 2015-03-25 19:45:36 +09:00
Huw Davies d864387aaa ole32: Split the data loading into a couple of helpers. 2015-03-25 19:45:31 +09:00
Huw Davies a4e3668f3f ole32: A cache entry should hold the stream its data is from, not the top-level storage. 2015-03-25 19:45:10 +09:00
Huw Davies c5e020c5b5 ole32: Read the class id from the top-level storage object.
The cache_entries' storages are just references to the same object anyway.
2015-03-25 19:44:59 +09:00
Nikolay Sivov 3376648224 ole32/datacache: Handle stream Stat() failure (PVS-Studio). 2015-03-19 16:56:05 +09:00
Francois Gouget 7fe0600237 ole32: Remove unneeded NONAMELESSXXX directives. 2015-03-17 14:18:54 +09:00
Jacek Caban 153b94b3c5 ole32: Use proper helpers for iface calls. 2012-08-13 16:28:48 +02:00
Michael Stefaniuc feba7c37b4 ole32: Use ifaces instead of vtbl pointers in DataCache. 2010-12-23 13:47:27 +01:00
Huw Davies abf8da6727 ole32: Implement OnRun and OnStop. 2010-11-01 16:16:12 +01:00
Huw Davies 6b05b2a927 ole32: Remove some useless comments. 2010-11-01 16:16:05 +01:00
Huw Davies 96ab42728d ole32: Re-order some functions. 2010-11-01 16:15:57 +01:00
Huw Davies c41c05057c ole32: Rename cache entry parameters from 'This' - it leads to too much confusion with the data cache itself, which is the real COM object. 2010-11-01 16:15:49 +01:00
Huw Davies 4d137e4702 ole32: Add a stub advise sink object to the data cache. 2010-11-01 16:15:38 +01:00
Huw Davies 250b55c41d ole32: Call the draw_continue function. 2010-09-28 17:33:17 +02:00