Package com.sun.star.text

Examples of com.sun.star.text.XRelativeTextContentInsert.insertTextContentBefore()


    try {
      XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert) UnoRuntime
      .queryInterface(XRelativeTextContentInsert.class, xText);
      if (newTextContent instanceof ITextTable) {
        IParagraph paragraph = constructNewParagraph();
        xRelativeTextContentInsert.insertTextContentBefore(paragraph
            .getXTextContent(), textContent.getXTextContent());
        xText.insertTextContent(
            paragraph.getXTextContent().getAnchor(), newTextContent
            .getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
View Full Code Here


        xText.insertTextContent(
            paragraph.getXTextContent().getAnchor(), newTextContent
            .getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
      } else {
        xRelativeTextContentInsert.insertTextContentBefore(
            newTextContent.getXTextContent(), textContent
            .getXTextContent());
        cleanupImage(textContent);
        cleanupTextShape(textContent);
      }
View Full Code Here

  public void insertTextContentBefore(ITextContent newTextContent, ITextContent textContent) throws TextException {
    try {
      XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert)UnoRuntime.queryInterface(XRelativeTextContentInsert.class, xText);
      if(newTextContent instanceof ITextTable) {
        IParagraph paragraph = constructNewParagraph();
        xRelativeTextContentInsert.insertTextContentBefore(paragraph.getXTextContent(), textContent.getXTextContent());
        xText.insertTextContent(paragraph.getXTextContent().getAnchor(), newTextContent.getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
      }
      else {
        xRelativeTextContentInsert.insertTextContentBefore(newTextContent.getXTextContent(), textContent.getXTextContent());
View Full Code Here

        xRelativeTextContentInsert.insertTextContentBefore(paragraph.getXTextContent(), textContent.getXTextContent());
        xText.insertTextContent(paragraph.getXTextContent().getAnchor(), newTextContent.getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
      }
      else {
        xRelativeTextContentInsert.insertTextContentBefore(newTextContent.getXTextContent(), textContent.getXTextContent());
        if(textContent instanceof ITextDocumentImage && imageToImageIds != null && xBitmapContainer != null) {
          String id = imageToImageIds.get(textContent);
          if(id != null) {
            imageToImageIds.remove(textContent);         
            xBitmapContainer.removeByName(id);
View Full Code Here

    try {
      XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert) UnoRuntime
          .queryInterface(XRelativeTextContentInsert.class, xText);
      if (newTextContent instanceof ITextTable) {
        IParagraph paragraph = constructNewParagraph();
        xRelativeTextContentInsert.insertTextContentBefore(paragraph
            .getXTextContent(), textContent.getXTextContent());
        xText.insertTextContent(
            paragraph.getXTextContent().getAnchor(), newTextContent
                .getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
View Full Code Here

        xText.insertTextContent(
            paragraph.getXTextContent().getAnchor(), newTextContent
                .getXTextContent(), false);
        xText.removeTextContent(paragraph.getXTextContent());
      } else {
        xRelativeTextContentInsert.insertTextContentBefore(
            newTextContent.getXTextContent(), textContent
                .getXTextContent());
        if (textContent instanceof ITextDocumentImage
            && imageToImageIds != null && xBitmapContainer != null) {
          String id = imageToImageIds.get(textContent);
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.