OLE uses VARIANT_TRUE and not TRUE for its boolean values.
VARIANT_TRUE is -1, unlike TRUE which is just 1, and we must use the former and not the latter with OLE VARIANT values. Closes #12910. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66814 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -161,7 +161,7 @@ WXDLLEXPORT bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& ole
|
|||||||
else if (type == wxT("bool"))
|
else if (type == wxT("bool"))
|
||||||
{
|
{
|
||||||
oleVariant.vt = VT_BOOL;
|
oleVariant.vt = VT_BOOL;
|
||||||
oleVariant.boolVal = variant.GetBool();
|
oleVariant.boolVal = variant.GetBool() ? VARIANT_TRUE : VARIANT_FALSE;
|
||||||
}
|
}
|
||||||
else if (type == wxT("string"))
|
else if (type == wxT("string"))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user