Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.5-incubating
-
None
Description
The Value of VariableField always is "" when try to get a VariableField instance by TextDocument.getVariableFieldByName.
Here is the sample codes to show the error.
try {
TextDocument sourcedoc = (TextDocument) Document.loadDocument(ResourceUtilities.getAbsolutePath("TestMySelectionResultsssss.odt"));
VariableField userVariableField = sourcedoc.getVariableFieldByName("textt");
if (userVariableField.getOdfElement() instanceof TextUserFieldDeclElement)
} catch (FileNotFoundException e1)
{ e1.printStackTrace(); } catch (Exception e1) { e1.printStackTrace(); }