[3/3] ole32: Use a shortcut in DataCache_Save only if fSameAsLoad set to TRUE.

Dmitry Timoshkov dmitry at baikal.ru
Thu Oct 19 04:55:34 CDT 2017


Huw Davies <huw at codeweavers.com> wrote:

> > I just sent some tests for data cache behaviour when saving a loaded
> > storage, and according to the tests the cache should not blindly copy
> > the whole original storage (i.e. should not call IStorage_CopyTo) in
> > its Save implementation. Moreover it looks like the cache never saves
> > "Contents" streams, and saves only very first "OlePres" stream it has
> > encountered for special storage classes. I'm attaching a preliminary
> > patch that removes the IStorage_CopyTo optimization and solves some
> > of the new tests. What is more important for me this patch also fixes
> > the application that I have here (it's an OLE control that creates data
> > cache storage with custom content, it uses MFC and according to MFC
> > sources it doesn't expect to see "Contents" streams after OleSave()).
> > 
> > What do you think?
> 
> There are a few things going on in that patch, so it would
> obviously need splitting, but removing the CopyTo() shortcut
> is fine.

Thanks.

> Note also that the cache will save to a CONTENTS stream (and not
> a presentation stream) if the class id is one of the static
> picture classes.

Perhaps I'm missing something obvious, but the tests show that the cache
never creates a Contents stream on save.

-- 
Dmitry.



More information about the wine-devel mailing list