writer2latex.office
Class FormsReader
java.lang.Object
writer2latex.office.FormsReader
public class FormsReader
extends java.lang.Object
This class reads the collection of all forms in an OOo document
(the
office:forms
element).
An OOo document may contain any number of forms; these are declared
within this element. In OOo, unlike eg. html, the form declaration is
separated from the presentation. This element contains the
declaration. The
presentation is given by inclusion of
draw:control
elements in the document flow. These refer to form
controls by id.
Note: A form is identified by a unique name, a control is
identified by a (globally) unique id.
addControl
protected void addControl(ControlReader control)
Add a control
control
- a ControlReader
representing the control
getAttribute
public String getAttribute(String sName)
Get an attribute of the forms. If the attribute does not exist,
this method returns null
.
sName
- the name of the attribute
- the value of the attribute, or
null
getControl
public ControlReader getControl(String sId)
Get a control by id
sId
- the form:control-id
of the control
- the control as a
ControlReader
object
getControlsIterator
public Iterator getControlsIterator()
Get a Iterator
over all controls.
- a
Iterator
over all controls
getForm
public FormReader getForm(String sName)
Get a form by name
sName
- the form:name
of the form
- the form as a
FormReader
object
getFormsIterator
public Iterator getFormsIterator()
Get a Iterator
over all forms.
- a
Iterator
over all forms
read
public void read(Element formsElement)
Read the content of an office:forms
element
formsElement
- a DOM element, which must be office:forms
node