Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
274a1d11
Commit
274a1d11
authored
Nov 02, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Adjust updatePropertyChain signature and name to match removeFromTree.
parent
bdbee82c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
30 deletions
+40
-30
storage32.c
dlls/ole32/storage32.c
+40
-30
No files found.
dlls/ole32/storage32.c
View file @
274a1d11
...
@@ -187,10 +187,10 @@ static HRESULT destroyDirEntry(
...
@@ -187,10 +187,10 @@ static HRESULT destroyDirEntry(
StorageImpl
*
storage
,
StorageImpl
*
storage
,
ULONG
index
);
ULONG
index
);
static
void
updatePropertyChain
(
static
HRESULT
insertIntoTree
(
Storage
BaseImpl
*
storage
,
Storage
Impl
*
This
,
ULONG
newProperty
Index
,
ULONG
parentStorage
Index
,
StgProperty
newProperty
);
ULONG
newPropertyIndex
);
static
LONG
propertyNameCmp
(
static
LONG
propertyNameCmp
(
const
OLECHAR
*
newProperty
,
const
OLECHAR
*
newProperty
,
...
@@ -768,10 +768,10 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
...
@@ -768,10 +768,10 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement(
/*
/*
* Find a spot in the property chain for our newly created property.
* Find a spot in the property chain for our newly created property.
*/
*/
updatePropertyChain
(
insertIntoTree
(
This
,
This
->
ancestorStorage
,
renamedProperty
Index
,
This
->
rootPropertySet
Index
,
renamedProperty
);
renamedProperty
Index
);
/*
/*
* At this point the renamed property has been inserted in the tree,
* At this point the renamed property has been inserted in the tree,
...
@@ -948,10 +948,10 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
...
@@ -948,10 +948,10 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream(
/*
/*
* Find a spot in the property chain for our newly created property.
* Find a spot in the property chain for our newly created property.
*/
*/
updatePropertyChain
(
insertIntoTree
(
This
,
This
->
ancestorStorage
,
newProperty
Index
,
This
->
rootPropertySet
Index
,
new
StreamProperty
);
new
PropertyIndex
);
/*
/*
* Open the stream to return it.
* Open the stream to return it.
...
@@ -1131,10 +1131,10 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
...
@@ -1131,10 +1131,10 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage(
/*
/*
* Find a spot in the property chain for our newly created property.
* Find a spot in the property chain for our newly created property.
*/
*/
updatePropertyChain
(
insertIntoTree
(
This
,
This
->
ancestorStorage
,
newProperty
Index
,
This
->
rootPropertySet
Index
,
newProperty
);
newProperty
Index
);
/*
/*
* Open it to get a pointer to return.
* Open it to get a pointer to return.
...
@@ -1316,18 +1316,26 @@ static LONG propertyNameCmp(
...
@@ -1316,18 +1316,26 @@ static LONG propertyNameCmp(
*
*
* Properly link this new element in the property chain.
* Properly link this new element in the property chain.
*/
*/
static
void
updatePropertyChain
(
static
HRESULT
insertIntoTree
(
Storage
BaseImpl
*
storage
,
Storage
Impl
*
This
,
ULONG
newProperty
Index
,
ULONG
parentStorage
Index
,
StgProperty
newProperty
)
ULONG
newPropertyIndex
)
{
{
StgProperty
currentProperty
;
StgProperty
currentProperty
;
StgProperty
newProperty
;
/*
* Read the inserted property
*/
StorageImpl_ReadProperty
(
This
,
newPropertyIndex
,
&
newProperty
);
/*
/*
* Read the root property
* Read the root property
*/
*/
StorageImpl_ReadProperty
(
storage
->
ancestorStorage
,
StorageImpl_ReadProperty
(
This
,
storage
->
rootPropertySet
Index
,
parentStorage
Index
,
&
currentProperty
);
&
currentProperty
);
if
(
currentProperty
.
dirProperty
!=
PROPERTY_NULL
)
if
(
currentProperty
.
dirProperty
!=
PROPERTY_NULL
)
...
@@ -1347,7 +1355,7 @@ static void updatePropertyChain(
...
@@ -1347,7 +1355,7 @@ static void updatePropertyChain(
/*
/*
* Read
* Read
*/
*/
StorageImpl_ReadProperty
(
storage
->
ancestorStorage
,
StorageImpl_ReadProperty
(
This
,
currentProperty
.
dirProperty
,
currentProperty
.
dirProperty
,
&
currentProperty
);
&
currentProperty
);
...
@@ -1363,7 +1371,7 @@ static void updatePropertyChain(
...
@@ -1363,7 +1371,7 @@ static void updatePropertyChain(
{
{
if
(
previous
!=
PROPERTY_NULL
)
if
(
previous
!=
PROPERTY_NULL
)
{
{
StorageImpl_ReadProperty
(
storage
->
ancestorStorage
,
StorageImpl_ReadProperty
(
This
,
previous
,
previous
,
&
currentProperty
);
&
currentProperty
);
current
=
previous
;
current
=
previous
;
...
@@ -1371,7 +1379,7 @@ static void updatePropertyChain(
...
@@ -1371,7 +1379,7 @@ static void updatePropertyChain(
else
else
{
{
currentProperty
.
leftChild
=
newPropertyIndex
;
currentProperty
.
leftChild
=
newPropertyIndex
;
StorageImpl_WriteProperty
(
storage
->
ancestorStorage
,
StorageImpl_WriteProperty
(
This
,
current
,
current
,
&
currentProperty
);
&
currentProperty
);
found
=
1
;
found
=
1
;
...
@@ -1381,7 +1389,7 @@ static void updatePropertyChain(
...
@@ -1381,7 +1389,7 @@ static void updatePropertyChain(
{
{
if
(
next
!=
PROPERTY_NULL
)
if
(
next
!=
PROPERTY_NULL
)
{
{
StorageImpl_ReadProperty
(
storage
->
ancestorStorage
,
StorageImpl_ReadProperty
(
This
,
next
,
next
,
&
currentProperty
);
&
currentProperty
);
current
=
next
;
current
=
next
;
...
@@ -1389,7 +1397,7 @@ static void updatePropertyChain(
...
@@ -1389,7 +1397,7 @@ static void updatePropertyChain(
else
else
{
{
currentProperty
.
rightChild
=
newPropertyIndex
;
currentProperty
.
rightChild
=
newPropertyIndex
;
StorageImpl_WriteProperty
(
storage
->
ancestorStorage
,
StorageImpl_WriteProperty
(
This
,
current
,
current
,
&
currentProperty
);
&
currentProperty
);
found
=
1
;
found
=
1
;
...
@@ -1401,7 +1409,7 @@ static void updatePropertyChain(
...
@@ -1401,7 +1409,7 @@ static void updatePropertyChain(
* Trying to insert an item with the same name in the
* Trying to insert an item with the same name in the
* subtree structure.
* subtree structure.
*/
*/
assert
(
FALSE
)
;
return
STG_E_FILEALREADYEXISTS
;
}
}
previous
=
currentProperty
.
leftChild
;
previous
=
currentProperty
.
leftChild
;
...
@@ -1414,10 +1422,12 @@ static void updatePropertyChain(
...
@@ -1414,10 +1422,12 @@ static void updatePropertyChain(
* The root storage is empty, link the new property to its dir property
* The root storage is empty, link the new property to its dir property
*/
*/
currentProperty
.
dirProperty
=
newPropertyIndex
;
currentProperty
.
dirProperty
=
newPropertyIndex
;
StorageImpl_WriteProperty
(
storage
->
ancestorStorage
,
StorageImpl_WriteProperty
(
This
,
storage
->
rootPropertySet
Index
,
parentStorage
Index
,
&
currentProperty
);
&
currentProperty
);
}
}
return
S_OK
;
}
}
/****************************************************************************
/****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment