break;
case CHAPTER_FIELD:
newfield=nextFieldSelection.replaceWithSimpleField(fieldType);
break;
case SIMPLE_VARIABLE_FIELD:
VariableField SimpleVariableField = (VariableField)orgField;
String simplefieldname = SimpleVariableField.getVariableName();
VariableField simplefield=Fields.createSimpleVariableField(document, simplefieldname);
nextFieldSelection.replaceWithVariableField(simplefield);
newfield=simplefield;
break;
case USER_VARIABLE_FIELD:
VariableField userVariableField = (VariableField)orgField;
TextUserFieldDeclElement textUserFieldDeclElement =(TextUserFieldDeclElement) userVariableField.getOdfElement();
String fieldname = userVariableField.getVariableName();
String value=textUserFieldDeclElement.getOfficeStringValueAttribute();
VariableField variableField=Fields.createUserVariableField(document, fieldname,value);
nextFieldSelection.replaceWithVariableField(variableField);
newfield=variableField;
break;
case CONDITION_FIELD:
ConditionField conditionField = (ConditionField)orgField;