java.lang.Objectcom.aspose.words.FieldOptions
public class FieldOptions
Example:
// Set the culture used during field update to the culture used by the field.
doc.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE);
doc.getMailMerge().execute(new String[] { "Date2" }, new Object[] { new SimpleDateFormat("yyyy/MM/DD").parse("2011/01/01") });
Property Getters/Setters Summary | ||
---|---|---|
IBarcodeGenerator | getBarcodeGenerator() | |
void | setBarcodeGenerator(IBarcodeGenerator value) | |
Gets or set custom barcode generator. | ||
java.lang.String | getCustomTocStyleSeparator() | |
void | setCustomTocStyleSeparator(java.lang.String value) | |
Gets or sets custom style separator for the \t switch in TOC field. | ||
java.lang.String | getDefaultDocumentAuthor() | |
void | setDefaultDocumentAuthor(java.lang.String value) | |
Gets or sets default document author's name. If author's name is already specified in built-in document properties, this option is not considered. | ||
int | getFieldUpdateCultureSource() | |
void | setFieldUpdateCultureSource(int value) | |
Specifies what culture to use to format the field result. The value of the property is FieldUpdateCultureSource integer constant. | ||
boolean | isBidiTextSupportedOnUpdate() | |
void | isBidiTextSupportedOnUpdate(boolean value) | |
Gets or sets the value indicating whether bidirectional text is fully supported during field update or not. | ||
boolean | getLegacyNumberFormat() | |
void | setLegacyNumberFormat(boolean value) | |
Gets or sets the value indicating whether legacy (early than AW 13.10) number format for fields is enabled or not. | ||
boolean | getUseInvariantCultureNumberFormat() | |
void | setUseInvariantCultureNumberFormat(boolean value) | |
Gets or sets the value indicating that number format is parsed using invariant culture or not | ||
IFieldUserPromptRespondent | getUserPromptRespondent() | |
void | setUserPromptRespondent(IFieldUserPromptRespondent value) | |
Gets or sets the respondent to user prompts during field update. |
Property Getters/Setters Detail |
---|
getBarcodeGenerator/setBarcodeGenerator | |
public IBarcodeGenerator getBarcodeGenerator() / public void setBarcodeGenerator(IBarcodeGenerator value) |
getCustomTocStyleSeparator/setCustomTocStyleSeparator | |
public java.lang.String getCustomTocStyleSeparator() / public void setCustomTocStyleSeparator(java.lang.String value) |
getDefaultDocumentAuthor/setDefaultDocumentAuthor | |
public java.lang.String getDefaultDocumentAuthor() / public void setDefaultDocumentAuthor(java.lang.String value) |
getFieldUpdateCultureSource/setFieldUpdateCultureSource | |
public int getFieldUpdateCultureSource() / public void setFieldUpdateCultureSource(int value) |
By default, the culture of the current thread is used.
The setting affects only date/time fields with \\@ format switch.
Example:
Shows how to specify where the locale for date formatting during field update and mail merge is chosen from.// Set the culture used during field update to the culture used by the field. doc.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE); doc.getMailMerge().execute(new String[] { "Date2" }, new Object[] { new SimpleDateFormat("yyyy/MM/DD").parse("2011/01/01") });
isBidiTextSupportedOnUpdate/isBidiTextSupportedOnUpdate | |
public boolean isBidiTextSupportedOnUpdate() / public void isBidiTextSupportedOnUpdate(boolean value) |
When this property is set to true, additional steps are performed to produce Right-To-Left language (i.e. Arabic or Hebrew) compatible field result during its update.
When this property is set to false and Right-To-Left language is used, correctness of field result after its update is not guaranteed.
The default value is false.
getLegacyNumberFormat/setLegacyNumberFormat | |
public boolean getLegacyNumberFormat() / public void setLegacyNumberFormat(boolean value) |
When this property is set to true, template symbol "#" worked as in .net: Replaces the pound sign with the corresponding digit if one is present; otherwise, no symbols appears in the result string.
When this property is set to false, template symbol "#" works as MS Word: This format item specifies the requisite numeric places to display in the result. If the result does not include a digit in that place, MS Word displays a space. For example, { = 9 + 6 \# $### } displays $ 15.
The default value is false.
getUseInvariantCultureNumberFormat/setUseInvariantCultureNumberFormat | |
public boolean getUseInvariantCultureNumberFormat() / public void setUseInvariantCultureNumberFormat(boolean value) |
When this property is set to true, number format is taken from an invariant culture.
When this property is set to false, number format is taken from the current thread's culture.
The default value is false.
getUserPromptRespondent/setUserPromptRespondent | |
public IFieldUserPromptRespondent getUserPromptRespondent() / public void setUserPromptRespondent(IFieldUserPromptRespondent value) |
If the value of this property is set to null, the fields that require user response on prompting (such as ASK or FILLIN) are not updated.
The default value is null.