+ return true;
+}
+
+#if wxUSE_LONGLONG
+bool wxVariant::Convert(wxLongLong* value) const
+{
+ wxString type(GetType());
+ if (type == wxS("longlong"))
+ *value = ((wxVariantDataLongLong*)GetData())->GetValue();
+ else if (type == wxS("long"))
+ *value = ((wxVariantDataLong*)GetData())->GetValue();
+ else if (type == wxS("string"))
+ {
+ wxString s = ((wxVariantDataString*)GetData())->GetValue();
+#ifdef wxLongLong_t
+ wxLongLong_t value_t;
+ if ( !s.ToLongLong(&value_t) )
+ return false;
+ *value = value_t;
+#else
+ long l_value;
+ if ( !s.ToLong(&l_value) )
+ return false;
+ *value = l_value;
+#endif
+ }
+ else if (type == wxS("bool"))
+ *value = (long) (((wxVariantDataBool*)GetData())->GetValue());
+ else if (type == wxS("double"))
+ {
+ value->Assign(((wxVariantDoubleData*)GetData())->GetValue());
+ }
+ else if (type == wxS("ulonglong"))
+ *value = ((wxVariantDataULongLong*)GetData())->GetValue();
+ else
+ return false;
+
+ return true;
+}
+
+bool wxVariant::Convert(wxULongLong* value) const
+{
+ wxString type(GetType());
+ if (type == wxS("ulonglong"))
+ *value = ((wxVariantDataULongLong*)GetData())->GetValue();
+ else if (type == wxS("long"))
+ *value = ((wxVariantDataLong*)GetData())->GetValue();
+ else if (type == wxS("string"))
+ {
+ wxString s = ((wxVariantDataString*)GetData())->GetValue();
+#ifdef wxLongLong_t
+ wxULongLong_t value_t;
+ if ( !s.ToULongLong(&value_t) )
+ return false;
+ *value = value_t;
+#else
+ unsigned long l_value;
+ if ( !s.ToULong(&l_value) )
+ return false;
+ *value = l_value;
+#endif
+ }
+ else if (type == wxS("bool"))
+ *value = (long) (((wxVariantDataBool*)GetData())->GetValue());
+ else if (type == wxS("double"))
+ {
+ double value_d = ((wxVariantDoubleData*)GetData())->GetValue();
+
+ if ( value_d < 0.0 )
+ return false;
+
+#ifdef wxLongLong_t
+ *value = (wxULongLong_t) value_d;
+#else
+ wxLongLong temp;
+ temp.Assign(value_d);
+ *value = temp;
+#endif
+ }
+ else if (type == wxS("longlong"))
+ *value = ((wxVariantDataLongLong*)GetData())->GetValue();
+ else
+ return false;
+
+ return true;