[3/3] ole32: Remove an optimization from DataCache_Save() that copies whole original storage.
Dmitry Timoshkov
dmitry at baikal.ru
Thu Oct 19 20:59:06 CDT 2017
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
dlls/ole32/datacache.c | 6 ------
dlls/ole32/tests/ole2.c | 5 ++---
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c
index 808c2dcb04..360ecd865d 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 9ed19f1f9b..81e6cb285b 100644
--- a/dlls/ole32/tests/ole2.c
+++ b/dlls/ole32/tests/ole2.c
@@ -3491,7 +3491,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 +3701,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);
--
2.14.2
More information about the wine-patches
mailing list