case FORM_TYPE_BUTTON: case FORM_TYPE_HIDDEN:
case FORM_TYPE_BUTTON:
lo_CleanFormElementData(LO_FormElementData *element_data){	int32 element_type;	if (element_data == NULL)	{		return;	}	element_type = element_data->type;	switch(element_type)	{		case FORM_TYPE_TEXT:		case FORM_TYPE_PASSWORD:		case FORM_TYPE_FILE:			{				lo_FormElementTextData *form_data;				form_data = (lo_FormElementTextData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}				if (form_data->default_text != NULL)				{					PA_FREE(form_data->default_text);					form_data->default_text = NULL;				}			}			break;		case FORM_TYPE_SUBMIT:		case FORM_TYPE_RESET:		case FORM_TYPE_BUTTON:		case FORM_TYPE_HIDDEN:		case FORM_TYPE_READONLY:			{				lo_FormElementMinimalData *form_data;				form_data = (lo_FormElementMinimalData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}				if (form_data->value != NULL)				{					PA_FREE(form_data->value);					form_data->value = NULL;				}			}			break;		case FORM_TYPE_RADIO:		case FORM_TYPE_CHECKBOX:			{				lo_FormElementToggleData *form_data;				form_data = (lo_FormElementToggleData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}				if (form_data->value != NULL)				{					PA_FREE(form_data->value);					form_data->value = NULL;				}			}			break;		case FORM_TYPE_TEXTAREA:			{				lo_FormElementTextareaData *form_data;				form_data = (lo_FormElementTextareaData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}				if (form_data->default_text != NULL)				{					PA_FREE(form_data->default_text);					form_data->default_text = NULL;				}			}			break;		case FORM_TYPE_SELECT_ONE:		case FORM_TYPE_SELECT_MULT:			{/* OPTION arrays are freed later				int i;				lo_FormElementOptionData *options;*/				lo_FormElementSelectData *form_data;				form_data = (lo_FormElementSelectData *)						element_data;				if (form_data->name != NULL)				{				    PA_FREE(form_data->name);				    form_data->name = NULL;				}/* OPTION arrays are freed later				if (form_data->option_cnt > 0)				{				    PA_LOCK(options,					lo_FormElementOptionData *,					form_data->options);				    for (i=0; i < form_data->option_cnt; i++)				    {					if (options[i].text_value != NULL)					{					   PA_FREE(options[i].text_value);					}					if (options[i].value != NULL)					{					   PA_FREE(options[i].value);					}				    }				    PA_UNLOCK(form_data->options);				    PA_FREE(form_data->options);				}*/			}			break;		case FORM_TYPE_KEYGEN:			{				lo_FormElementKeygenData *form_data;				form_data = (lo_FormElementKeygenData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}				if (form_data->challenge != NULL)				{					PA_FREE(form_data->challenge);					form_data->challenge = NULL;				}				if (form_data->value_str != NULL)				{					XP_FREE(form_data->value_str);					form_data->value_str = NULL;				}			}			break;		case FORM_TYPE_OBJECT:			{				lo_FormElementObjectData *form_data;				form_data = (lo_FormElementObjectData *)						element_data;				if (form_data->name != NULL)				{					PA_FREE(form_data->name);					form_data->name = NULL;				}			}			break;		default:			break;	}}