Package com.sun.star.text

Examples of com.sun.star.text.XTextCursor


        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XPropertySet oPropSet = null;
        XText oText = null;
        XTextCursor oCursor = null;

        // get a soffice factory object
        SOfficeFactory SOF = SOfficeFactory.getFactory( (XMultiServiceFactory)Param.getMSF() );
        // creating Frames
        log.println( "creating Frames" );
View Full Code Here


            DrawTools.getShapes(DrawTools.getDrawPage(xDrawDoc,0)).add(oShape) ;

            XSimpleText text = (XSimpleText) UnoRuntime.queryInterface
                (XSimpleText.class, oShape) ;

            XTextCursor cursor = text.createTextCursor() ;

            text.insertString(cursor, "Paragraph 1", false) ;
            text.insertControlCharacter(cursor,
                ControlCharacter.PARAGRAPH_BREAK, false) ;
            text.insertString(cursor, "Paragraph 2", false) ;
View Full Code Here

            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (XExporter.class,oObj);
            xEx.setSourceDocument(xTextDoc);

            XSimpleText aText = xTextDoc.getText();
            XTextCursor curs = (XTextCursor) aText.createTextCursor();
                        aText.insertString(curs, TEST_STR, false);
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException("Can't create component.", e) ;
        }
View Full Code Here

        log.println( "creating a test environment" );

        // create testobject here

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

        for (int j =0; j < 5; j++){
            try{
                oText.insertString( oCursor,
                    "SwXTextSearch...SwXTextSearch...SwXTextSearch", false);
View Full Code Here

        XText xDocumentText = xViewCursor.getText();

       

        XTextCursor xModelCursor = xDocumentText.createTextCursorByRange(xViewCursor);
           
           
        do{ // swith to the next page
         
          // select the current page of document with the cursor
          xPageCursor.jumpToEndOfPage();
          xModelCursor.gotoRange(xViewCursor,false);
          xModelCursor.setString("||page_break||");

        } while(xPageCursor.jumpToNextPage());

     
     
View Full Code Here

                            oooDocument.createField(outputFieldMaster);

                    // insert into document.  Last argument indicates NOT to replace
                    // the text range text.

                    XTextCursor xTextCursor=oooExpression.getTextCursor();
                    Boolean didGoRight = xTextCursor.goRight((short) 1, false);
                    xTextCursor.getText().insertTextContent(xTextCursor, xTextField, false);
                }
                else{
                    /* get outputFieldMaster */
                    outputFieldMaster = xDependentTextField.getTextFieldMaster();
                }
View Full Code Here

                        oooDocument.createField(errorFieldMaster);

                // insert into document.  Last argument indicates NOT to replace
                // the text range text.

                XTextCursor xTextCursor=oooExpression.getTextCursor();
                xTextCursor.goRight((short) 1, false);
                xTextCursor.getText().insertTextContent(xTextCursor, xTextField, false);
            }
            else{
                /* get outputFieldMaster */
                errorFieldMaster = xDependentTextField.getTextFieldMaster();
            }
View Full Code Here

                    XPropertySet.class, xTC );
                xFrameProps.setPropertyValue( "AnchorType",
                        TextContentAnchorType.AS_CHARACTER );
                xFrameProps.setPropertyValue("CLSID", OOODocument.CLSID_CHART);

                XTextCursor xTextCursor=oooExpression.getTextCursor();
                xTextCursor.goRight((short) 1, false);
                xTextCursor.getText().insertTextContent(
                        xTextCursor, xTC, false);
                XComponent xModel=
                        ((XEmbeddedObjectSupplier) UnoRuntime.queryInterface(
                        XEmbeddedObjectSupplier.class,xTC)).getEmbeddedObject();
                 xChartDoc= (XChartDocument)UnoRuntime.queryInterface(
View Full Code Here

      traceShapes(notesPage);
    }

    // Zone de texte des notes
    XText xNoteText = unoCast(XText.class, notesShape);
    XTextCursor cursor = xNoteText.createTextCursor();
    cursor.getStart();

    XPropertySet xCursorProps = unoCast(XPropertySet.class, cursor);
    tabStops = new TabStop[2];
    tabStops[0] = new TabStop(xmargin, TabAlign.LEFT, ',', ' ');
    tabStops[1] = new TabStop(21000 - 2 * xmargin - 2000, TabAlign.RIGHT,
View Full Code Here

      // Shape principal
      XShape mainShape = findShapeByType(planPage, SHAPE_TYPE_OUTLINER);
      if (mainShape != null) {
        XSimpleText mainText = unoCast(XSimpleText.class, mainShape);

        XTextCursor cursor = mainText.createTextCursor();
        cursor.getStart();

        XPropertySet xCursorProps = unoCast(XPropertySet.class, cursor);
        TabStop[] tabStops = new TabStop[1];
        tabStops[0] = new TabStop(bundle.getShortTocTabulation(),
            TabAlign.RIGHT, ',', '.');
View Full Code Here

TOP

Related Classes of com.sun.star.text.XTextCursor

Copyright © 2018 www.massapicom. 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.