Package com.independentsoft.office.odf

# Class OfficeScripts

java.lang.Object
com.independentsoft.office.odf.OfficeScripts

public class OfficeScripts extends Object
Represents all script for a document.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OfficeScripts()`
  Initializes a new instance of the OfficeScripts class.
  `OfficeScripts​(InternalXMLStreamReader reader)`
  Instantiates a new office scripts.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OfficeScripts`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `List<IEventListener>`
  `getEventListeners()`
  Contains a collection of listeners.
  `List<Script>`
  `getScripts()`
  Contains a collection of scripts.
  `boolean`
  `isPresent()`
  Returns true if an office:scripts element was present in the source document.
  `void`
  `setPresent​(boolean present)`
  Sets whether an office:scripts element should be emitted even when empty.
  `String`
  `toString()`
  Converts the value of the current OfficeScripts object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### OfficeScripts

    public OfficeScripts()
    Initializes a new instance of the OfficeScripts class.

  - ### OfficeScripts

    public OfficeScripts​(InternalXMLStreamReader reader) throws XMLStreamException
    Instantiates a new office scripts.
    Parameters:
      `reader` - the reader
    Throws:
      `XMLStreamException` - the xML stream exception

- ## Method Details

  - ### isPresent

    public boolean isPresent()
    Returns true if an office:scripts element was present in the source document.
    Returns:
      true if present

  - ### setPresent

    public void setPresent​(boolean present)
    Sets whether an office:scripts element should be emitted even when empty.
    Parameters:
      `present` - true to emit

  - ### clone

    public OfficeScripts clone()
    Creates a new object that is a deep copy of the current instance.
    Overrides:
      `clone` in class `Object`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current OfficeScripts object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getScripts

    public List<Script> getScripts()
    Contains a collection of scripts.
    Returns:
      the scripts

  - ### getEventListeners

    public List<IEventListener> getEventListeners()
    Contains a collection of listeners.
    Returns:
      the event listeners