Class FormsReader
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.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addControl
(ControlReader control) Add a controlgetAttribute
(String sName) Get an attribute of the forms.getControl
(String sId) Get a control by idGet aIterator
over all controls.Get a form by nameGet aIterator
over all forms.void
Read the content of anoffice:forms
element
-
Constructor Details
-
FormsReader
public FormsReader()
-
-
Method Details
-
read
Read the content of an
office:forms
element- Parameters:
formsElement
- a DOM element, which must beoffice:forms
node
-
getAttribute
Get an attribute of the forms. If the attribute does not exist, this method returns
null
.- Parameters:
sName
- the name of the attribute- Returns:
- the value of the attribute, or
null
-
getFormsIterator
Get a
Iterator
over all forms.- Returns:
- a
Iterator
over all forms
-
getForm
Get a form by name
- Parameters:
sName
- theform:name
of the form- Returns:
- the form as a
FormReader
object
-
getControlsIterator
Get a
Iterator
over all controls.- Returns:
- a
Iterator
over all controls
-
getControl
Get a control by id
- Parameters:
sId
- theform:control-id
of the control- Returns:
- the control as a
ControlReader
object
-
addControl
Add a control
- Parameters:
control
- aControlReader
representing the control
-