Package com.sun.star.text

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


        xTable.initialize(1, 1);
        xText.insertTextContent(textRange.getXTextRange(), xTable,
            false);
        XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert) UnoRuntime
        .queryInterface(XRelativeTextContentInsert.class, xText);
        xRelativeTextContentInsert.insertTextContentAfter(textContent
            .getXTextContent(), xTable);
        xText.removeTextContent(xTable);
      } else {
        XText xText = textRange.getXTextRange().getText();
        XTextRange targetRange = textRange.getXTextRange();
View Full Code Here


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

        if (textContent instanceof ITextTable) {
          XTextContent newXTextContent = newTextContent
          .getXTextContent();
          XTextContent oldXTextContent = textContent
          .getXTextContent();
          xRelativeTextContentInsert.insertTextContentAfter(
              newXTextContent, oldXTextContent);
        } else {
          Object object = xMultiServiceFactory
          .createInstance("com.sun.star.text.TextTable");
          XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
View Full Code Here

          XTextTable xTable = (XTextTable) UnoRuntime.queryInterface(
              XTextTable.class, object);
          xTable.initialize(1, 1);
          xText.insertTextContent(textContent.getXTextContent()
              .getAnchor(), xTable, false);
          xRelativeTextContentInsert.insertTextContentAfter(
              newTextContent.getXTextContent(), xTable);
          xText.removeTextContent(xTable);
        }
      } else {
        XTextContent newContent = newTextContent.getXTextContent();
View Full Code Here

          xText.removeTextContent(xTable);
        }
      } else {
        XTextContent newContent = newTextContent.getXTextContent();
        XTextContent successor = textContent.getXTextContent();
        xRelativeTextContentInsert.insertTextContentAfter(newContent,
            successor);
        // xRelativeTextContentInsert.insertTextContentAfter(textContent.getXTextContent(),
        // newTextContent.getXTextContent());
        cleanupImage(textContent);
        cleanupTextShape(textContent);
View Full Code Here

        Object object = xMultiServiceFactory.createInstance("com.sun.star.text.TextTable");
        XTextTable xTable = (XTextTable)UnoRuntime.queryInterface(XTextTable.class, object);
        xTable.initialize(1,1);
        xText.insertTextContent(textRange.getXTextRange(), xTable, false);
        XRelativeTextContentInsert xRelativeTextContentInsert = (XRelativeTextContentInsert)UnoRuntime.queryInterface(XRelativeTextContentInsert.class, xText);
        xRelativeTextContentInsert.insertTextContentAfter(textContent.getXTextContent(), xTable);
        xText.removeTextContent(xTable);
      }
      else {
        XText xText = textRange.getXTextRange().getText();
        XTextRange targetRange = textRange.getXTextRange();
View Full Code Here

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

      }
      else if (newTextContent instanceof IParagraph) {       
        if (textContent instanceof ITextTable) {
          XTextContent newXTextContent = newTextContent.getXTextContent();
          XTextContent oldXTextContent = textContent.getXTextContent();
          xRelativeTextContentInsert.insertTextContentAfter(newXTextContent, oldXTextContent);
        }
        else {
          Object object = xMultiServiceFactory.createInstance("com.sun.star.text.TextTable");
          XTextTable xTable = (XTextTable)UnoRuntime.queryInterface(XTextTable.class, object);
          xTable.initialize(1,1);
View Full Code Here

        else {
          Object object = xMultiServiceFactory.createInstance("com.sun.star.text.TextTable");
          XTextTable xTable = (XTextTable)UnoRuntime.queryInterface(XTextTable.class, object);
          xTable.initialize(1,1);
          xText.insertTextContent(textContent.getXTextContent().getAnchor(), xTable, false);
          xRelativeTextContentInsert.insertTextContentAfter(newTextContent.getXTextContent(), xTable);
          xText.removeTextContent(xTable);
        }
      }
      else {
        XTextContent newContent = newTextContent.getXTextContent();
View Full Code Here

        }
      }
      else {
        XTextContent newContent = newTextContent.getXTextContent();
        XTextContent successor = textContent.getXTextContent();
        xRelativeTextContentInsert.insertTextContentAfter(newContent, successor);
        //xRelativeTextContentInsert.insertTextContentAfter(textContent.getXTextContent(), newTextContent.getXTextContent());
        if(textContent instanceof ITextDocumentImage && imageToImageIds != null && xBitmapContainer != null) {
          String id = imageToImageIds.get(textContent);
          if(id != null) {
            imageToImageIds.remove(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.