apparently digital unix's c compiler has a problem with the work 'readonly' (it appears to be a reserved word, as far as that compiler goes). So, I'm changing all occurences of the readonly form element attribute to read_only. Thanks to berkley@cs.wustl.edu (Berkley Shands) for the report and suggested fix.
git-svn-id: svn://10.0.0.236/trunk@1855 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1fd6c53148
commit
57a8a16052
@ -645,7 +645,7 @@ struct lo_FormElementTextData_struct {
|
||||
PA_Block name;
|
||||
PA_Block default_text;
|
||||
Bool disabled;
|
||||
Bool readonly;
|
||||
Bool read_only;
|
||||
PA_Block current_text;
|
||||
int32 size;
|
||||
int32 max_size;
|
||||
@ -663,7 +663,7 @@ struct lo_FormElementTextareaData_struct {
|
||||
PA_Block name;
|
||||
PA_Block default_text;
|
||||
Bool disabled;
|
||||
Bool readonly;
|
||||
Bool read_only;
|
||||
PA_Block current_text;
|
||||
int32 rows;
|
||||
int32 cols;
|
||||
|
||||
@ -986,14 +986,14 @@ lo_form_input_text(MWContext *context, lo_DocState *state,
|
||||
}
|
||||
#endif /* OLD_FILE_UPLOAD */
|
||||
|
||||
form_data->readonly = FALSE;
|
||||
form_data->read_only = FALSE;
|
||||
if (type != FORM_TYPE_FILE)
|
||||
{
|
||||
buff = lo_FetchParamValue(context, tag, PARAM_READONLY);
|
||||
if (buff != NULL)
|
||||
{
|
||||
PA_FREE(buff);
|
||||
form_data->readonly = TRUE;
|
||||
form_data->read_only = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1146,12 +1146,12 @@ lo_form_textarea(MWContext *context, lo_DocState *state,
|
||||
form_data->disabled = TRUE;
|
||||
}
|
||||
|
||||
form_data->readonly = FALSE;
|
||||
form_data->read_only = FALSE;
|
||||
buff = lo_FetchParamValue(context, tag, PARAM_READONLY);
|
||||
if (buff != NULL)
|
||||
{
|
||||
PA_FREE(buff);
|
||||
form_data->readonly = TRUE;
|
||||
form_data->read_only = TRUE;
|
||||
}
|
||||
|
||||
form_data->auto_wrap = TEXTAREA_WRAP_OFF;
|
||||
|
||||
@ -531,7 +531,7 @@ input_getProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
*vp = BOOLEAN_TO_JSVAL(text->disabled);
|
||||
goto good;
|
||||
case INPUT_READONLY:
|
||||
*vp = BOOLEAN_TO_JSVAL(text->readonly);
|
||||
*vp = BOOLEAN_TO_JSVAL(text->read_only);
|
||||
goto good;
|
||||
#endif
|
||||
default:
|
||||
@ -897,7 +897,7 @@ input_setProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp)
|
||||
case INPUT_READONLY:
|
||||
if (form_element->element_data->type == FORM_TYPE_FILE)
|
||||
break;
|
||||
text->readonly = JSVAL_TO_BOOLEAN(*vp);
|
||||
text->read_only = JSVAL_TO_BOOLEAN(*vp);
|
||||
if (context) {
|
||||
ET_PostManipulateForm(context, (LO_Element *)form_element,
|
||||
EVENT_CHANGE);
|
||||
|
||||
@ -189,9 +189,9 @@ XP_FormGetReadonly(LO_FormElementData *form)
|
||||
case FORM_TYPE_TEXT:
|
||||
case FORM_TYPE_PASSWORD:
|
||||
case FORM_TYPE_READONLY:
|
||||
return form->ele_text.readonly;
|
||||
return form->ele_text.read_only;
|
||||
case FORM_TYPE_TEXTAREA:
|
||||
return form->ele_textarea.readonly;
|
||||
return form->ele_textarea.read_only;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user