Package org.odftoolkit.odfdom.dom.element.text

Examples of org.odftoolkit.odfdom.dom.element.text.TextVariableDeclElement


  public VariableField getVariableFieldByName(String name) {
    OdfElement containerElement = getVariableContainerElement();
    TextVariableDeclsElement simpleVariableElements = OdfElement.findFirstChildNode(TextVariableDeclsElement.class,
        containerElement);
    if (simpleVariableElements != null) {
      TextVariableDeclElement simpleVariableElement = (TextVariableDeclElement) simpleVariableElements
          .getFirstChild();
      while (simpleVariableElement != null) {
        if (name.equals(simpleVariableElement.getTextNameAttribute())) {
          return Fields.createSimpleVariableField(this, name);
        } else {
          simpleVariableElement = (TextVariableDeclElement) simpleVariableElement.getNextSibling();
        }
      }
    }
    TextUserFieldDeclsElement userVariableElements = OdfElement.findFirstChildNode(TextUserFieldDeclsElement.class,
        containerElement);
View Full Code Here


      if (simpleVariableElements == null) {
        simpleVariableElements = ((OdfFileDom) containerElement.getOwnerDocument())
            .newOdfElement(TextVariableDeclsElement.class);
        containerElement.insertBefore(simpleVariableElements, containerElement.getFirstChild());
      } else {
        TextVariableDeclElement simpleVariableElementTmp = (TextVariableDeclElement) simpleVariableElements
            .getFirstChild();
        while (simpleVariableElementTmp != null) {
          if (name.equals(simpleVariableElementTmp.getTextNameAttribute())) {
            simpleVariableElement = simpleVariableElementTmp;
            break;
          } else {
            simpleVariableElementTmp = (TextVariableDeclElement) simpleVariableElementTmp.getNextSibling();
          }
        }
      }
      if (simpleVariableElement == null) {
        simpleVariableElement = simpleVariableElements.newTextVariableDeclElement("string", name);
View Full Code Here

  public VariableField getVariableFieldByName(String name) {
    OdfElement containerElement = getVariableContainerElement();
    TextVariableDeclsElement simpleVariableElements = OdfElement.findFirstChildNode(TextVariableDeclsElement.class,
        containerElement);
    if (simpleVariableElements != null) {
      TextVariableDeclElement simpleVariableElement = (TextVariableDeclElement) simpleVariableElements
          .getFirstChild();
      while (simpleVariableElement != null) {
        if (name.equals(simpleVariableElement.getTextNameAttribute())) {
          return Fields.createSimpleVariableField(this, name);
        } else {
          simpleVariableElement = (TextVariableDeclElement) simpleVariableElement.getNextSibling();
        }
      }
    }
    TextUserFieldDeclsElement userVariableElements = OdfElement.findFirstChildNode(TextUserFieldDeclsElement.class,
        containerElement);
View Full Code Here

TOP

Related Classes of org.odftoolkit.odfdom.dom.element.text.TextVariableDeclElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.