Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted by default, it's much more convenient to work with the variant objects of the correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs, so add a flag which can be set to tell a wxAutomationObject to behave in this way. Closes #14700. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -316,9 +316,25 @@ private:
|
||||
SAFEARRAY* m_value;
|
||||
};
|
||||
|
||||
// Used by wxAutomationObject for its wxConvertOleToVariant() calls.
|
||||
enum wxOleConvertVariantFlags
|
||||
{
|
||||
wxOleConvertVariant_Default = 0,
|
||||
|
||||
// If wxOleConvertVariant_ReturnSafeArrays flag is set, SAFEARRAYs
|
||||
// contained in OLE VARIANTs will be returned as wxVariants
|
||||
// with wxVariantDataSafeArray type instead of wxVariants
|
||||
// with the list type containing the (flattened) SAFEARRAY's elements.
|
||||
wxOleConvertVariant_ReturnSafeArrays = 1
|
||||
};
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
|
||||
|
||||
WXDLLIMPEXP_CORE
|
||||
bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant,
|
||||
long flags = wxOleConvertVariant_Default);
|
||||
|
||||
WXDLLIMPEXP_CORE bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant);
|
||||
WXDLLIMPEXP_CORE bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant);
|
||||
#endif // wxUSE_VARIANT
|
||||
|
||||
// Convert string to Unicode
|
||||
|
Reference in New Issue
Block a user