Examples of newTextPElement()


Examples of org.odftoolkit.odfdom.dom.element.office.OfficeAnnotationElement.newTextPElement()

      annotation = (OfficeAnnotationElement) OdfXMLFactory.newOdfElement(dom, OdfName.newName(
          OdfDocumentNamespace.OFFICE, "annotation"));
    }
    TextPElement noteElement = OdfElement.findFirstChildNode(TextPElement.class, annotation);
    if (noteElement == null) {
      noteElement = annotation.newTextPElement();
    }
    noteElement.setTextContent(note);
    DcCreatorElement dcCreatorElement = OdfElement.findFirstChildNode(DcCreatorElement.class, annotation);
    if (dcCreatorElement == null) {
      dcCreatorElement = annotation.newDcCreatorElement();
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeAnnotationElement.newTextPElement()

    dcCreatorElement.setTextContent(creator);
    // set date
    String dcDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss").format(new Date());
    DcDateElement dcDateElement = annotationElement.newDcDateElement();
    dcDateElement.setTextContent(dcDate);
    TextPElement notePElement = annotationElement.newTextPElement();
    TextSpanElement noteSpanElement = notePElement.newTextSpanElement();
    // set comment style
    OdfOfficeAutomaticStyles styles = null;
    if (dom instanceof OdfContentDom) {
      styles = ((OdfContentDom) dom).getAutomaticStyles();
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

   * @see Paragraph#newParagraph(ParagraphContainer)
   * @see #addParagraph(String)
   */
  public OdfTextParagraph newParagraph() throws Exception {
    OfficeTextElement odfText = getContentRoot();
    return (OdfTextParagraph) odfText.newTextPElement();
  }

  /**
   * Append text to the end of a text document. If there is no paragraph at
   * the end of a document, a new one will be created.
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      style.newStyleParagraphPropertiesElement().setFoBreakBeforeAttribute(breakAttribute);
      if(refParagraph == null){
        pEle = getContentRoot().newTextPElement();
      } else {
        OfficeTextElement contentRoot = getContentRoot();
        pEle = contentRoot.newTextPElement();
        OdfElement refEle = refParagraph.getOdfElement();
        contentRoot.insertBefore(pEle, refEle.getNextSibling());
      }
      pEle.setStyleName(style.getStyleNameAttribute());
    } catch (Exception e) {
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      frame1.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.PAGE.toString());
      frame1.setTextAnchorPageNumberAttribute(1);

      //add paragraph
      OfficeTextElement office = doc.getContentRoot();
      OdfTextParagraph para1 = (OdfTextParagraph) office.newTextPElement();
      para1.setTextContent("insert an image here");
      String imagePath2 = doc.newImage(mImageUri_ODFDOM);

      OdfTextParagraph para2 = (OdfTextParagraph) office.newTextPElement();
      para2.setTextContent("another");
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      OfficeTextElement office = doc.getContentRoot();
      OdfTextParagraph para1 = (OdfTextParagraph) office.newTextPElement();
      para1.setTextContent("insert an image here");
      String imagePath2 = doc.newImage(mImageUri_ODFDOM);

      OdfTextParagraph para2 = (OdfTextParagraph) office.newTextPElement();
      para2.setTextContent("another");
      String imagePath3 = doc.newImage(mImageUri_ODFDOM);
      OdfDrawImage image3 = getImageByPath(doc, imagePath3).get(1);
      OdfDrawFrame frame3 = (OdfDrawFrame) image3.getParentNode();
      frame3.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.CHAR.toString());
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

   * @return The new paragraph
   * @throws Exception if the file DOM could not be created.
   */
  public OdfTextParagraph newParagraph() throws Exception {
    OfficeTextElement odfText = getContentRoot();
    return (OdfTextParagraph) odfText.newTextPElement();
  }

  /**
   * Append text to the end of a text document.
   * If there is no paragraph at the end of a document, a new one will be created.
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      frame1.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.PAGE.toString());
      frame1.setTextAnchorPageNumberAttribute(1);

      //add paragraph
      OfficeTextElement office = doc.getContentRoot();
      OdfTextParagraph para1 = (OdfTextParagraph) office.newTextPElement();
      para1.setTextContent("insert an image here");
      String imagePath2 = doc.newImage(mImageUri_ODFDOM);

      OdfTextParagraph para2 = (OdfTextParagraph) office.newTextPElement();
      para2.setTextContent("another");
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

      OfficeTextElement office = doc.getContentRoot();
      OdfTextParagraph para1 = (OdfTextParagraph) office.newTextPElement();
      para1.setTextContent("insert an image here");
      String imagePath2 = doc.newImage(mImageUri_ODFDOM);

      OdfTextParagraph para2 = (OdfTextParagraph) office.newTextPElement();
      para2.setTextContent("another");
      String imagePath3 = doc.newImage(mImageUri_ODFDOM);
      OdfDrawImage image3 = getImageByPath(doc, imagePath3).get(1);
      OdfDrawFrame frame3 = (OdfDrawFrame) image3.getParentNode();
      frame3.setTextAnchorTypeAttribute(TextAnchorTypeAttribute.Value.CHAR.toString());
View Full Code Here

Examples of org.odftoolkit.odfdom.dom.element.office.OfficeTextElement.newTextPElement()

   * @return The new paragraph
   * @throws Exception if the file DOM could not be created.
   */
  public OdfTextParagraph newParagraph() throws Exception {
    OfficeTextElement odfText = getContentRoot();
    return (OdfTextParagraph) odfText.newTextPElement();
  }

  /**
   * Append text to the end of a text document.
   * If there is no paragraph at the end of a document, a new one will be created.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.