Package org.odftoolkit.odfdom.dom.element.office

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


      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

      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

      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

   * @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

      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

      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

   * @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

   * @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

      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

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.