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
2c91cced
Commit
2c91cced
authored
Oct 24, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix properties type conversion on property bag load.
parent
71a3fe3c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
46 deletions
+41
-46
olefont.c
dlls/oleaut32/olefont.c
+41
-46
No files found.
dlls/oleaut32/olefont.c
View file @
2c91cced
...
...
@@ -2131,111 +2131,106 @@ static HRESULT WINAPI OLEFontImpl_IPersistPropertyBag_Load(
static
const
WCHAR
sAttrUnderline
[]
=
{
'U'
,
'n'
,
'd'
,
'e'
,
'r'
,
'l'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
sAttrItalic
[]
=
{
'I'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
sAttrStrikethrough
[]
=
{
'S'
,
't'
,
'r'
,
'i'
,
'k'
,
'e'
,
't'
,
'h'
,
'r'
,
'o'
,
'u'
,
'g'
,
'h'
,
0
};
VARIANT
rawAttr
;
VARIANT
valueAttr
;
HRESULT
iRes
=
S_OK
;
OLEFontImpl
*
this
=
impl_from_IPersistPropertyBag
(
iface
);
VARIANT
value
;
HRESULT
iRes
;
VariantInit
(
&
rawAttr
);
VariantInit
(
&
valueAttr
);
VariantInit
(
&
value
);
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrName
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrName
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_BSTR
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_BSTR
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Name
((
IFont
*
)
this
,
V_BSTR
(
&
valueAttr
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
valueAttr
);
iRes
=
IFont_put_Name
((
IFont
*
)
this
,
V_BSTR
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
value
);
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrSize
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrSize
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_CY
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_CY
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Size
((
IFont
*
)
this
,
V_CY
(
&
value
Attr
));
iRes
=
IFont_put_Size
((
IFont
*
)
this
,
V_CY
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
value
Attr
);
VariantClear
(
&
value
);
}
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrCharset
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrCharset
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_I2
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_I2
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Charset
((
IFont
*
)
this
,
V_I2
(
&
value
Attr
));
iRes
=
IFont_put_Charset
((
IFont
*
)
this
,
V_I2
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
value
Attr
);
VariantClear
(
&
value
);
}
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrWeight
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrWeight
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_I2
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_I2
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Weight
((
IFont
*
)
this
,
V_I2
(
&
value
Attr
));
iRes
=
IFont_put_Weight
((
IFont
*
)
this
,
V_I2
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
valueAttr
);
VariantClear
(
&
value
);
}
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrUnderline
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrUnderline
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_BOOL
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_BOOL
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Underline
((
IFont
*
)
this
,
V_BOOL
(
&
value
Attr
));
iRes
=
IFont_put_Underline
((
IFont
*
)
this
,
V_BOOL
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
value
Attr
);
VariantClear
(
&
value
);
}
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrItalic
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrItalic
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_BOOL
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_BOOL
);
if
(
iRes
==
S_OK
)
iRes
=
IFont_put_Italic
((
IFont
*
)
this
,
V_BOOL
(
&
value
Attr
));
iRes
=
IFont_put_Italic
((
IFont
*
)
this
,
V_BOOL
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
value
Attr
);
VariantClear
(
&
value
);
}
if
(
iRes
==
S_OK
)
{
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrStrikethrough
,
&
rawAttr
,
pErrorLog
);
iRes
=
IPropertyBag_Read
(
pPropBag
,
sAttrStrikethrough
,
&
value
,
pErrorLog
);
if
(
iRes
==
S_OK
)
{
iRes
=
VariantChangeType
(
&
rawAttr
,
&
valueAttr
,
0
,
VT_BOOL
);
iRes
=
VariantChangeType
(
&
value
,
&
value
,
0
,
VT_BOOL
);
if
(
iRes
==
S_OK
)
IFont_put_Strikethrough
((
IFont
*
)
this
,
V_BOOL
(
&
value
Attr
));
IFont_put_Strikethrough
((
IFont
*
)
this
,
V_BOOL
(
&
value
));
}
else
if
(
iRes
==
E_INVALIDARG
)
iRes
=
S_OK
;
VariantClear
(
&
rawAttr
);
VariantClear
(
&
value
Attr
);
VariantClear
(
&
value
);
}
if
(
FAILED
(
iRes
))
...
...
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