Package com.sun.star.text

Examples of com.sun.star.text.XText.insertString()


    // Remarque : je ne sais plus comment ça marche...

    // Titre de la table de matieres
    try {
      applyTextStyle(xCursorProps, "preference.toc.notes.title");
      xNoteText.insertString(cursor, toc.getTitle(), true);
      xNoteText.insertControlCharacter(cursor,
          ControlCharacter.PARAGRAPH_BREAK, false);
    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here


            // Access the XText interface of the text contained within the frame
            XText xFrameText = xFrame.getText();
            // Create a TextCursor over the frame's contents
            XTextCursor xFrameCursor = xFrameText.createTextCursor();
            // Insert some text into the frame
            xFrameText.insertString(
                xFrameCursor, "The first line in the newly created text frame.",
                false );
            xFrameText.insertString(
                xFrameCursor, "\nThe second line in the new text frame.", false );
            // Insert a paragraph break into the document (not the frame)
View Full Code Here

            XTextCursor xFrameCursor = xFrameText.createTextCursor();
            // Insert some text into the frame
            xFrameText.insertString(
                xFrameCursor, "The first line in the newly created text frame.",
                false );
            xFrameText.insertString(
                xFrameCursor, "\nThe second line in the new text frame.", false );
            // Insert a paragraph break into the document (not the frame)
            mxDocText.insertControlCharacter (
                mxDocCursor, ControlCharacter.PARAGRAPH_BREAK, false );
        }
View Full Code Here

        XText xText = xTextDoc.getText();
        XTextCursor xTextCursor = xText.createTextCursor();

        for (int i = 0; i < 11; i++) {
            xText.insertString(xTextCursor, "A sample text and why not? ", false);
        }

        XFrame xFrame = xTextDoc.getCurrentController().getFrame();
        XPropertySet xProp = (XPropertySet)UnoRuntime.queryInterface(XPropertySet.class, xFrame);
        try {
View Full Code Here

            log.println("inserting some lines");

            try {
                for (int i = 0; i < 5; i++) {
                    oText.insertString(oCursor, "Paragraph Number: " + i,
                                       false);
                    oText.insertString(oCursor,
                                       " The quick brown fox jumps over the lazy Dog: SwXParagraph",
                                       false);
                    oText.insertControlCharacter(oCursor,
View Full Code Here

            try {
                for (int i = 0; i < 5; i++) {
                    oText.insertString(oCursor, "Paragraph Number: " + i,
                                       false);
                    oText.insertString(oCursor,
                                       " The quick brown fox jumps over the lazy Dog: SwXParagraph",
                                       false);
                    oText.insertControlCharacter(oCursor,
                                                 ControlCharacter.PARAGRAPH_BREAK,
                                                 false);
View Full Code Here

                                       " The quick brown fox jumps over the lazy Dog: SwXParagraph",
                                       false);
                    oText.insertControlCharacter(oCursor,
                                                 ControlCharacter.PARAGRAPH_BREAK,
                                                 false);
                    oText.insertString(oCursor,
                                       "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG: SwXParagraph",
                                       false);
                    oText.insertControlCharacter(oCursor,
                                                 ControlCharacter.PARAGRAPH_BREAK,
                                                 false);
View Full Code Here

                    oText.insertControlCharacter(oCursor,
                                                 ControlCharacter.LINE_BREAK,
                                                 false);
                }
                            for (int i = 0; i < 11; i++) {
                oText.insertString(oCursor, "xTextDoc ", false);
                           
            }
            } catch (com.sun.star.lang.IllegalArgumentException e) {
                e.printStackTrace(log);
                throw new StatusException("Couldn't insert lines", e);
View Full Code Here

            XText oText = xTextDoc.getText();
            XTextCursor oTextCursor = oText.createTextCursor();

            for (int i = 0; i < 11; i++) {
                oText.insertString(oTextCursor, "xTextDoc ", false);
            }

            tEnv = new TestEnvironment(xTextDoc);
        } else {
            log.println("Failed to create instance.");
View Full Code Here

      String string = new String(pcText);
      if(string.equals("end")) break;

      string += " ";

      rText.insertString(rRange , string, false);
    }
  }

  static void testDocument(XMultiServiceFactory rSmgr) throws com.sun.star.uno.Exception, IOException {
    XComponentLoader rLoader = UnoRuntime.queryInterface(XComponentLoader.class, rSmgr.createInstance("com.sun.star.frame.Desktop"));
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.