Examples of XTextCursor


Examples of com.sun.star.text.XTextCursor

    }


    public static XTextCursor createTextCursor(Object oCursorContainer) {
        XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface(XSimpleText.class, oCursorContainer);
        XTextCursor xTextCursor = xText.createTextCursor();
        return xTextCursor;
    }
View Full Code Here

Examples of com.sun.star.text.XTextCursor

    }


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

Examples of com.sun.star.text.XTextCursor

            int FieldCount = CurDBMetaData.FieldColumns.length;
            Object[] OldGroupFieldValues = new Object[GroupFieldCount];
            XTextTable[] xGroupBaseTables = new XTextTable[GroupFieldCount];
            int RecordFieldCount = FieldCount - GroupFieldCount;
            XTextDocument xTextDocument = CurReportDocument.xTextDocument;
            XTextCursor xTextCursor = ReportDocument.createTextCursor(CurReportDocument.xTextDocument.getText());
            xTextDocument.lockControllers();
            if (CurDBMetaData.ResultSet.next() == true) {
                replaceUserFields();
                Helper.setUnoPropertyValue(xTextCursor, "PageDescName", "First Page");
                for (ColIndex = 0; ColIndex < GroupFieldCount; ColIndex++) {
View Full Code Here

Examples of com.sun.star.text.XTextCursor

    }


    public void replaceUserFields() {
        DBColumn CurDBColumn;
        XTextCursor xNameCellCursor;
        String FieldContent;
        int iCount = CurReportDocument.DBColumnsVector.size();
        for (int i = 0; i < iCount; i++) {
            CurDBColumn = (DBColumn) CurReportDocument.DBColumnsVector.elementAt(i);
            xNameCellCursor = ReportDocument.createTextCursor(CurDBColumn.xNameCell);
            xNameCellCursor.gotoStart(false);
            FieldContent = CurReportDocument.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

    public void before() {
        log.println( "creating a text document" );
        xTextDoc = WriterTools.createTextDoc( (XMultiServiceFactory) param.getMSF());

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

        log.println( "inserting some lines" );
        try {
            for (int i=0; i<5; i++){
                oText.insertString( oCursor,"Paragraph Number: " + i, false);
View Full Code Here

Examples of com.sun.star.text.XTextCursor

        try {
            Object oGObject = (XInterface) xMSF.createInstance(
                                      "com.sun.star.text.GraphicObject");

            XText the_text = aDoc.getText();
            XTextCursor the_cursor = the_text.createTextCursor();
            XTextContent the_content = (XTextContent) UnoRuntime.queryInterface(
                                               XTextContent.class, oGObject);
            the_text.insertTextContent(the_cursor, the_content, true);

            XPropertySet oProps = (XPropertySet) UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.text.XTextCursor

    public void _createTextCursorByRange() {

        requiredMethod("createTextCursor()");
        oCursor.gotoStart(false);
        log.println( "Testing createTextCursorByRange()" );
        XTextCursor oTCursor = oObj.createTextCursorByRange(oCursor);
        tRes.tested("createTextCursorByRange()", oTCursor != null) ;
    }
View Full Code Here

Examples of com.sun.star.text.XTextCursor

            try
            {
                XCell xCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn,0);
                XTextRange xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell);
                String CompString = "Column";
                XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
                if (isNameCell(xLocCellCursor, CurDBField.FieldName, CompString) || (_bforce))
                {
                    xNameCell = xCell;
                    xNameTextCell = xTextCell;
                    xValCell = CurRecordTable.xCellRange.getCellByPosition(_nColumn,1);
View Full Code Here

Examples of com.sun.star.text.XTextCursor

                for (int m = 0; m < xRows.getCount(); m++)
                {
                    xCell = xCellRange.getCellByPosition(n,m);
                    xTextCell = (XTextRange) UnoRuntime.queryInterface(XTextRange.class, xCell);
                    String CompString = TableName.substring(4);
                    XTextCursor xLocCellCursor = TextDocument.createTextCursor(xCell);
                    if (isNameCell(xLocCellCursor, CurDBField.FieldName, CompString))
                    {
                        xNameCell = xCell;
                        xNameTextCell = xTextCell;
                    }
View Full Code Here

Examples of com.sun.star.text.XTextCursor

        }


    public void insertUserFieldToTableCell(TextFieldHandler oTextFieldHandler)
        {
            XTextCursor xTextCursor = TextDocument.createTextCursor(xNameCell);
            xTextCursor.gotoStart(false);
            xTextCursor.gotoEnd(true);
            xTextCursor.setString("");
            oTextFieldHandler.insertUserField(xTextCursor, CurDBField.FieldName, CurDBField.FieldTitle);
        }
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.