Commit 5456724f authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

ole32: Move the create attribute from StorageImpl to StorageBaseImpl.

This is to avoid accessing the top-level StorageImpl directly.
parent b6dc718c
......@@ -868,7 +868,7 @@ static HRESULT WINAPI StgStreamImpl_Stat(
pstatstg->grfMode = This->grfMode;
/* In simple create mode cbSize is the current pos */
if((This->parentStorage->openFlags & STGM_SIMPLE) && root->create)
if((This->parentStorage->openFlags & STGM_SIMPLE) && This->parentStorage->create)
pstatstg->cbSize = This->currentPosition;
return S_OK;
......
......@@ -2276,7 +2276,7 @@ static HRESULT StorageImpl_Construct(
This->base.v_destructor = StorageImpl_Destroy;
This->base.openFlags = (openFlags & ~STGM_CREATE);
This->base.ref = 1;
This->create = create;
This->base.create = create;
/*
* This is the top-level storage so initialize the ancestor pointer
......@@ -4131,6 +4131,8 @@ static StorageInternalImpl* StorageInternalImpl_Construct(
*/
newStorage->base.storageDirEntry = storageDirEntry;
newStorage->base.create = 0;
return newStorage;
}
......
......@@ -235,6 +235,9 @@ struct StorageBaseImpl
* State bits appear to only be preserved while running. No in the stream
*/
DWORD stateBits;
BOOL create; /* Was the storage created or opened.
The behaviour of STGM_SIMPLE depends on this */
};
/****************************************************************************
......@@ -260,8 +263,6 @@ struct StorageImpl
*/
HANDLE hFile; /* Physical support for the Docfile */
LPOLESTR pwcsName; /* Full path of the document file */
BOOL create; /* Was the storage created or opened.
The behaviour of STGM_SIMPLE depends on this */
/* FIXME: should this be in Storage32BaseImpl ? */
WCHAR filename[DIRENTRY_NAME_BUFFER_LEN];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment