Examples of XTextCursor


Examples of com.sun.star.text.XTextCursor

        }

   
    public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler, XCell xCell)
        {
            XTextCursor xTextCursor = TextDocument.createTextCursor(xCell);
            xTextCursor.gotoStart(false);
            xTextCursor.gotoEnd(true);
            xTextCursor.setString("");
            oTextFieldHandler.insertUserField(xTextCursor, CurDBField.FieldName, CurDBField.FieldTitle);
        }
View Full Code Here

Examples of com.sun.star.text.XTextCursor

        }

        oObj = (XInterface) oGObject;

        XText the_text = xTextDoc.getText();
        XTextCursor the_cursor = the_text.createTextCursor();
        XTextContent the_content = (XTextContent)
                            UnoRuntime.queryInterface(XTextContent.class,oObj);

       log.println( "inserting graphic" );
        try {
View Full Code Here

Examples of com.sun.star.text.XTextCursor

                (XExporter.class,oObj);
            xEx.setSourceDocument(xTextDoc);

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

Examples of com.sun.star.text.XTextCursor

    public synchronized TestEnvironment createTestEnvironment(
            TestParameters Param, PrintWriter log ) throws StatusException {
        XInterface oObj = null;
        XTextFrame oFrame1 = null;
        XText oText = null;
        XTextCursor oCursor = null;
        XMultiServiceFactory oDocMSF = null;
        XTextFramesSupplier oInterface = null;

        log.println( "creating a test environment" );
        try {
View Full Code Here

Examples of com.sun.star.text.XTextCursor

        } catch(com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create instance", e);
        }

        XTextCursor the_Cursor = left.createTextCursor();

        try {
            left.insertTextContent(the_Cursor,the_Field, false);
            PropSet.setPropertyValue("RightPageHeaderContent", RPHC);
        } catch(com.sun.star.lang.IllegalArgumentException e) {
View Full Code Here

Examples of com.sun.star.text.XTextCursor

    }
   
    public void addTextSectionCopies()
        {
            m_aDoc.setLayoutSectionsVisible(false);
            XTextCursor xTextCursor = ReportTextDocument.createTextCursor(m_aDoc.xTextDocument.getText());
            xTextCursor.gotoStart(false);
            for (int i = 0; i < getRecordParser().GroupFieldNames.length; i++)
            {
                XNamed xNamedTextSection = addLinkedTextSection(xTextCursor, ReportTextDocument.GROUPSECTION + Integer.toString(i + 1), null, null);
                xNamedTextSection.setName(ReportTextDocument.COPYOFGROUPSECTION + (i+1));
                renameTableofLastSection(ReportTextDocument.COPYOFTBLGROUPSECTION + (i+1));
View Full Code Here

Examples of com.sun.star.text.XTextCursor

                int FieldCount = getRecordParser().FieldColumns.length;
                Object[] OldGroupFieldValues = new Object[GroupFieldCount];
                XTextTable[] xGroupBaseTables = new XTextTable[GroupFieldCount];
                int RecordFieldCount = FieldCount - GroupFieldCount;
                XTextDocument xTextDocument = getDoc().xTextDocument;
                XTextCursor xTextCursor = ReportTextDocument.createTextCursor(getDoc().xTextDocument.getText());
                xTextDocument.lockControllers();

                if (getRecordParser().ResultSet.next() == true)
                {
                    replaceUserFields();
View Full Code Here

Examples of com.sun.star.text.XTextCursor


    private void replaceUserFields()
        {
            DBColumn CurDBColumn;
            XTextCursor xNameCellCursor;
            String FieldContent;
            int iCount = getDoc().DBColumnsVector.size();
            for (int i = 0; i < iCount; i++)
            {
                CurDBColumn = (DBColumn) getDoc().DBColumnsVector.elementAt(i);
                xNameCellCursor = ReportTextDocument.createTextCursor(CurDBColumn.xNameCell);
                xNameCellCursor.gotoStart(false);
                FieldContent = getDoc().oTextFieldHandler.getUserFieldContent(xNameCellCursor);
                if (!FieldContent.equals(""))
                {
                    xNameCellCursor.goRight((short) 1, true);
                    xNameCellCursor.setString(FieldContent);
                }
            }
        }
View Full Code Here

Examples of com.sun.star.text.XTextCursor

                    xTF.attachTextFieldMaster(PFieldMaster);
                }

                oText = (XText)UnoRuntime.queryInterface(XText.class, xCell);
                XTextCursor the_Cursor = oText.createTextCursor();

                oText.insertTextContent(
                    the_Cursor, oContent, true);

            } catch (com.sun.star.lang.WrappedTargetException e) {
View Full Code Here

Examples of com.sun.star.text.XTextCursor

  static void testWriter(XComponent rCmp) throws IOException {
    XTextDocument rTextDoc = (XTextDocument)UnoRuntime.queryInterface(XTextDocument.class, rCmp);

    XText rText = (XText)UnoRuntime.queryInterface(XText.class, rTextDoc.getText());
    XTextCursor rCursor = (XTextCursor)UnoRuntime.queryInterface(XTextCursor.class, rText.createTextCursor());
    XTextRange rRange = (XTextRange)UnoRuntime.queryInterface(XTextRange.class, rCursor);

    byte pcText[] = new byte[1024];
    pcText[0] = 0;
    System.err.println("pleast type any text\n");
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.