|| (form->element_data->type == FORM_TYPE_HTMLAREA
|| (form->element_data->type == FORM_TYPE_HTMLAREA)
PSFE_GetFormElementInfo(MWContext *cx, LO_FormElementStruct *form){	INTL_CharSetInfo csi = LO_GetDocumentCharacterSetInfo(cx);	int16 win_csid = INTL_GetCSIWinCSID(csi);    if (form->element_data == NULL)        return;    switch (form->element_data->type) {    case FORM_TYPE_FILE:    case FORM_TYPE_TEXT:    case FORM_TYPE_PASSWORD:    case FORM_TYPE_TEXTAREA:    case FORM_TYPE_SELECT_ONE:    case FORM_TYPE_SELECT_MULT:    case FORM_TYPE_SUBMIT:    case FORM_TYPE_RESET:    case FORM_TYPE_BUTTON:#ifdef ENDER    case FORM_TYPE_HTMLAREA:#endif /*ENDER*/    {        int i, width, height;        LO_TextInfo text_info;        TextArray *text_array;		int descent = 0;		int bottom_margin = 0;		int shadow_thickness = 0;        text_array = make_text_array(cx, form);        if (!text_array)            return;        width = 0;        height = 0;        for (i = 0; i < text_array->size; i++) {            PSFE_GetTextInfo(cx, text_array->text[i], &text_info);			if ((form->element_data->type == FORM_TYPE_TEXT) ||				(form->element_data->type == FORM_TYPE_PASSWORD) ||				(form->element_data->type == FORM_TYPE_TEXTAREA)#ifdef ENDER                || (form->element_data->type == FORM_TYPE_HTMLAREA)#endif /*ENDER*/                ) {				/* For empty text fields, we should calculate width using 				 * form->element_data->ele_text.size				 * For non-empty text fields, we should make sure that the				 * bonding box is bigger than the text				 */								LO_TextInfo    temp_info;				TextArray     *temp_text_array = NULL;				LO_TextStruct *text = NULL;				int            columns = 0;				temp_text_array = XP_NEW_ZAP(TextArray);				temp_text_array->size = 1;				temp_text_array->text = (LO_TextStruct**)XP_CALLOC(1, sizeof(LO_TextStruct*));				text = XP_NEW_ZAP(LO_TextStruct);				text->text = (PA_Block)" ";				text->text_len = 1;				text->text_attr = text_array->text[i]->text_attr;				temp_text_array->text[0] = text;				PSFE_GetTextInfo(cx, temp_text_array->text[0], &temp_info);								if ((form->element_data->type == FORM_TYPE_TEXTAREA)#ifdef ENDER                    || (form->element_data->type == FORM_TYPE_HTMLAREA#endif /*ENDER*/                    ) {					lo_FormElementTextareaData *data = &form->element_data->ele_textarea;					columns = ((win_csid & MULTIBYTE) ? (data->cols + 1) / 2 : data->cols);					text_info.max_width =						MAX(text_info.max_width, temp_info.max_width * columns);				}				else {					lo_FormElementTextData *data = &form->element_data->ele_text;					columns = ((win_csid & MULTIBYTE) ? (data->size + 1) / 2 : data->size);					text_info.max_width =						MAX(text_info.max_width, temp_info.max_width * columns);				}				free_text_array(temp_text_array);			}            width = MAX(width, text_info.max_width +                        FORM_LEFT_MARGIN + FORM_RIGHT_MARGIN);            height = MAX(height, text_info.ascent + text_info.descent +                         FORM_TOP_MARGIN + FORM_BOTTOM_MARGIN);        }		/* adjust height */		if ((form->element_data->type == FORM_TYPE_TEXTAREA)#ifdef ENDER                || (form->element_data->type == FORM_TYPE_HTMLAREA)#endif /*ENDER*/                )			height *= form->element_data->ele_textarea.rows;		else			height *= text_array->size;		bottom_margin = FORM_BOTTOM_MARGIN;		descent = text_info.descent;		if (form->element_data->type == FORM_TYPE_SELECT_ONE) {			/* leave space for bonding box and down arrow */			height = height + 2 * FORM_BOX_THICKNESS +				FORM_BOX_TOP_MARGIN + FORM_BOX_BOTTOM_MARGIN;			width = width + 2 * FORM_BOX_THICKNESS + 				FORM_BOX_LEFT_MARGIN + FORM_BOX_RIGHT_MARGIN + 				1 * COMBOBOX_ARROW_MARGIN + COMBOBOX_ARROW_WIDTH;			shadow_thickness += FORM_BOX_THICKNESS;			bottom_margin += FORM_BOX_BOTTOM_MARGIN;		}		if ((form->element_data->type == FORM_TYPE_SUBMIT) ||			(form->element_data->type == FORM_TYPE_RESET) ||			(form->element_data->type == FORM_TYPE_BUTTON) ||			(form->element_data->type == FORM_TYPE_TEXT) ||			(form->element_data->type == FORM_TYPE_TEXTAREA) ||			(form->element_data->type == FORM_TYPE_PASSWORD) ||			(form->element_data->type == FORM_TYPE_SELECT_MULT) #ifdef ENDER                || (form->element_data->type == FORM_TYPE_HTMLAREA)#endif /*ENDER*/                )        {			/* leave space for bonding box */			width = width + 2 * FORM_BOX_THICKNESS + 				FORM_BOX_LEFT_MARGIN + FORM_BOX_RIGHT_MARGIN;			height = height + 2 * FORM_BOX_THICKNESS +				FORM_BOX_TOP_MARGIN + FORM_BOX_BOTTOM_MARGIN;;			shadow_thickness += FORM_BOX_THICKNESS;			bottom_margin += FORM_BOX_BOTTOM_MARGIN;		}		/* leave space for scrollbar */		if ((form->element_data->type == FORM_TYPE_SELECT_MULT) &&			(height >= SCROLLBAR_MIN_HEIGHT)) {			/* no need to provide scrollbar if the list/text is not long enough */			width += SCROLLBAR_WIDTH;		}        if (!form->width)            form->width = width;        if (!form->height)            form->height = height;		/* readjust the baseline for the form element */		form->baseline = form->height - (descent + bottom_margin + shadow_thickness);        free_text_array(text_array);    }    break;        case FORM_TYPE_RADIO:	{		form->width = RADIOBOX_WIDTH + RADIOBOX_LEFT_MARGIN + RADIOBOX_RIGHT_MARGIN;		form->height = RADIOBOX_HEIGHT;	}	break;    case FORM_TYPE_CHECKBOX:	{		form->width = CHECKBOX_WIDTH + CHECKBOX_LEFT_MARGIN + CHECKBOX_RIGHT_MARGIN;		form->height = CHECKBOX_HEIGHT;	}	break;    default:        /* Other types of form element are unsupported. */        XP_TRACE(("PSFE_GetFormElementInfo: unsupported form element type."));        break;            }}