Package com.sun.star.text

Examples of com.sun.star.text.XTextRange


    {
        this.oTextTableHandler = _oTextTableHandler;
        this.CurDBMetaData = _CurDBMetaData;
        CurDBField = CurDBMetaData.getFieldColumnByFieldName(_FieldName);
        bIsGroupColumn = true;
        XTextRange xTextCell;
        XCell xCell;
        getTableColumns(TableName);

        XTableRows xRows = null;
        try
View Full Code Here


    private boolean isNameCell(XTextCursor xCellCursor, String CurFieldName, String CompString)
    {
        try
        {
            xCellCursor.gotoStart(false);
            XTextRange xTextRange = xCellCursor.getEnd();
            Object oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField");
            if (AnyConverter.isVoid(oTextField))
            {
                return false;
            }
View Full Code Here

    public String getUserFieldContent(XTextCursor xTextCursor)
    {
        try
        {
            XTextRange xTextRange = xTextCursor.getEnd();
            Object oTextField = Helper.getUnoPropertyValue(xTextRange, "TextField");
            if (com.sun.star.uno.AnyConverter.isVoid(oTextField))
            {
                return PropertyNames.EMPTY_STRING;
            }
View Full Code Here

            }

            public void prepareToSort() {
                oTable.getCellByName("A1").setValue(4);

                XTextRange textRange = (XTextRange) UnoRuntime.queryInterface(
                                               XTextRange.class,
                                               oTable.getCellByName("A2"));
                textRange.setString("b");
                oTable.getCellByName("A3").setValue(3);
                textRange = (XTextRange) UnoRuntime.queryInterface(
                                    XTextRange.class,
                                    oTable.getCellByName("A4"));
                textRange.setString("a");
                oTable.getCellByName("A5").setValue(23);
                textRange = (XTextRange) UnoRuntime.queryInterface(
                                    XTextRange.class,
                                    oTable.getCellByName("A6"));
                textRange.setString("ab");

            }

            public boolean checkSort(boolean isSortNumbering,
                                     boolean isSortAscending) {
                out.println("Sort checking...");

                boolean res = false;
                String[] value = new String[6];

                for (int i = 0; i < 6; i++) {
                    XCell cell = oTable.getCellByName("A" + (i + 1));
                    XTextRange textRange = (XTextRange) UnoRuntime.queryInterface(
                                                   XTextRange.class, cell);
                    value[i] = textRange.getString();
                }

                if (isSortNumbering) {
                    if (isSortAscending) {
                        String[] rightVal = { "3", "4", "23" };
View Full Code Here

        XController xController = aModel.getCurrentController();

        XText text = document.getText();
        text.setString("normal");
        XTextRange end = text.getEnd();
        end.setString("bold");
        UnoRuntime.queryInterface(XPropertySet.class, end).setPropertyValue(
            "CharWeight", FontWeight.BOLD);
        UnoRuntime.queryInterface(XTextViewCursorSupplier.class, xController).
            getViewCursor().gotoRange(text, false);
View Full Code Here

     */
    public void _attach() {
        requiredMethod("getAnchor()");       
        try {
            XTextContent aContent = (XTextContent) tEnv.getObjRelation("CONTENT");           
            XTextRange aRange = (XTextRange) tEnv.getObjRelation("RANGE");

            if ( aContent !=null) {               
                aContent.attach(aRange);
            } else {               
                oObj.attach(aRange);
View Full Code Here

            System.out.println("...done");

            System.out.println("Checking some invalid args...");

            String content = "behold, for i am the content.";
            XTextRange xTR = new TestRange(content);
            XMetadatable xM = (XMetadatable) xTR;

            try {
                xDocMDAccess.getElementByURI(null);
                fail("getElementByURI: null allowed");
View Full Code Here

    protected TestEnvironment createTestEnvironment
        (TestParameters tParam, PrintWriter log) {

        XInterface oObj = null;
        // create testobject here
        XTextRange aRange = null;
        XShape oShape = null;

        try {
            SOfficeFactory SOF = SOfficeFactory.getFactory((XMultiServiceFactory)tParam.getMSF()) ;
            oShape = SOF.createShape
View Full Code Here

        try {
            XTextDocument xTextDoc = (XTextDocument)
                tEnv.getObjRelation("TextDoc");
            XText xText = xTextDoc.getText();
            XTextRange xTR = xText.getEnd();
            xTR.setString("IndexMark");

            XMultiServiceFactory xDocMSF = (XMultiServiceFactory)
                UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);

            Object idxMark = xDocMSF.createInstance
View Full Code Here

        final XTextContent chartTextContent = UnoRuntime.queryInterface( XTextContent.class, shapeProps );

        final XSelectionSupplier selSupplier = UnoRuntime.queryInterface( XSelectionSupplier.class,
                m_textDocument.getCurrentView().getController() );
        final Object selection = selSupplier.getSelection();
        final XTextRange textRange = getAssociatedTextRange( selection );
        if ( textRange == null )
            throw new RuntimeException( "can't locate a text range" );

        // insert the chart
        textRange.getText().insertTextContent(textRange, chartTextContent, false);

        // retrieve the chart model
        XChartDocument chartDoc = UnoRuntime.queryInterface( XChartDocument.class, shapeProps.getPropertyValue( "Model" ) );
        m_chartDocument = new OfficeDocument( i_orb, chartDoc );
View Full Code Here

TOP

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

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.