Module: wine Branch: master Commit: f7eabdf3a8ebdcc388772949749f36808ba7fea4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7eabdf3a8ebdcc38877294974...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Oct 20 17:43:28 2017 +0800
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
---
dlls/ole32/datacache.c | 6 ------ dlls/ole32/tests/ole2.c | 7 ++----- 2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 808c2dc..360ecd8 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -1665,12 +1665,6 @@ static HRESULT WINAPI DataCache_Save( } }
- /* this is a shortcut if nothing changed */ - if (!dirty && !fSameAsLoad && This->presentationStorage) - { - return IStorage_CopyTo(This->presentationStorage, 0, NULL, NULL, pStg); - } - /* assign stream numbers to the cache entries */ LIST_FOR_EACH_ENTRY(cache_entry, &This->cache_list, DataCacheEntry, entry) { diff --git a/dlls/ole32/tests/ole2.c b/dlls/ole32/tests/ole2.c index 16c6d88..08b6a27 100644 --- a/dlls/ole32/tests/ole2.c +++ b/dlls/ole32/tests/ole2.c @@ -2980,9 +2980,7 @@ static HRESULT WINAPI Storage_SetElementTimes(IStorage *iface, LPCOLESTR pwcsNam
static HRESULT WINAPI Storage_SetClass(IStorage *iface, REFCLSID clsid) { -todo_wine_if(!expect_Storage_SetClass) CHECK_EXPECT(Storage_SetClass); -todo_wine_if(IsEqualIID(Storage_SetClass_CLSID, &CLSID_NULL)) ok(IsEqualIID(clsid, Storage_SetClass_CLSID), "expected %s, got %s\n", wine_dbgstr_guid(Storage_SetClass_CLSID), wine_dbgstr_guid(clsid)); return S_OK; @@ -3491,7 +3489,6 @@ static void check_storage_contents(IStorage *stg, const struct storage_def *stg_
hr = IStorage_Stat(stg, &stat, STATFLAG_NONAME); ok(hr == S_OK, "unexpected %#x\n", hr); -todo_wine_if(!IsEqualCLSID(stg_def->clsid, &stat.clsid)) ok(IsEqualCLSID(stg_def->clsid, &stat.clsid), "expected %s, got %s\n", wine_dbgstr_guid(stg_def->clsid), wine_dbgstr_guid(&stat.clsid));
@@ -3702,10 +3699,10 @@ todo_wine_if(test_data[i].in == &stg_def_4 || test_data[i].in == &stg_def_8 || t
enumerated_streams = matched_streams = -1; check_storage_contents(doc2, test_data[i].out, &enumerated_streams, &matched_streams); -todo_wine +todo_wine_if(!(test_data[i].in == &stg_def_0 || test_data[i].in == &stg_def_1 || test_data[i].in == &stg_def_2)) ok(enumerated_streams == matched_streams, "%d out: enumerated %d != matched %d\n", i, enumerated_streams, matched_streams); -todo_wine +todo_wine_if(!(test_data[i].in == &stg_def_0 || test_data[i].in == &stg_def_5)) ok(enumerated_streams == test_data[i].out->stream_count, "%d: saved streams %d != def streams %d\n", i, enumerated_streams, test_data[i].out->stream_count);