Package com.sun.star.text

Examples of com.sun.star.text.XSimpleText


                    // Getting the cell of the bug id
                    XCell xcell = xcellrange.getCellByPosition(
                    this.INT_COLUMN_FEATURE, intRow );
                   
                    // Querying for the interface XSimpleText
                    XSimpleText xsimpletext = ( XSimpleText )
                    UnoRuntime.queryInterface( XSimpleText.class, xcell );
                   
                    // Getting the text cursor
                    XTextCursor xtextcursor = xsimpletext.createTextCursor();
                   
                    // Querying for the interface XTextRange
                    XTextRange xtextrange = ( XTextRange )
                    UnoRuntime.queryInterface( XTextRange.class, xtextcursor );
                   
View Full Code Here


        tRes.tested( "removeByIndex()", result );
    } // end removeByIndex()

    private void setCellText(XCell cell, String text) {
        XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface
            (XSimpleText.class, cell) ;
        xText.setString(text);
    }
View Full Code Here

        XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface
            (XSimpleText.class, cell) ;
        xText.setString(text);
    }
    private String getCellText(XCell cell) {
        XSimpleText xText = (XSimpleText) UnoRuntime.queryInterface
            (XSimpleText.class, cell) ;
        return xText.getString();
    }
View Full Code Here

            // Get the XFootnote interface to the first footnote inserted ('Numbers')
            XFootnote xNumbers = ( XFootnote ) UnoRuntime.queryInterface (
                XFootnote.class, xFootnotes.getByIndex( 0 ) );

            // Get the XSimpleText interface to the Footnote
            XSimpleText xSimple = (XSimpleText ) UnoRuntime.queryInterface (
                XSimpleText.class, xNumbers );
           
            // Create a text cursor for the foot note text
            XTextRange xRange = (XTextRange ) UnoRuntime.queryInterface (
                XTextRange.class, xSimple.createTextCursor() );
           
            // And insert the actual text of the footnote.
            xSimple.insertString (
                xRange, "  The numbers were generated by using java.util.Random", false );
        }
        catch (Exception e)
        {
            e.printStackTrace();
View Full Code Here

            XExporter xEx = (XExporter) UnoRuntime.queryInterface
                (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

    * Sets the string of annotation, then makes it visible and
    * checks the value returned by <code>getIsVisible</code> method. <p>
    * Returns <b>true</b> if the method returns <code>true</code>.
    */
    protected boolean check_getIsVisible() {
      XSimpleText oText  = (XSimpleText)
        UnoRuntime.queryInterface(XSimpleText.class, anno);
      oText.setString("XSheetAnnotation");
      anno.setIsVisible(true);
      boolean bVis = anno.getIsVisible();
      return bVis;
    }
View Full Code Here

    * returns <code>false</code> in the first case and <code>true</code>
    * in the second.
    */
    protected boolean check_setIsVisible() {
      boolean bResult = true;
      XSimpleText oText  = (XSimpleText)
          UnoRuntime.queryInterface(XSimpleText.class, anno);
      oText.setString("XSheetAnnotation");
      anno.setIsVisible(false);
      boolean bVis = anno.getIsVisible();
      if (!bVis) {
          anno.setIsVisible(true);
          bVis = anno.getIsVisible();
View Full Code Here

            XSheetAnnotationAnchor oAnnoA = (XSheetAnnotationAnchor)
                UnoRuntime.queryInterface(XSheetAnnotationAnchor.class, oCell);

            XSheetAnnotation oAnno = oAnnoA.getAnnotation();
            XSimpleText aText = (XSimpleText)
                            UnoRuntime.queryInterface(XSimpleText.class,oAnno);
            aText.setString("A nice little Test");
            oObj = aText.createTextCursor();

        } catch (Exception e) {
            e.printStackTrace(log) ;
            throw new StatusException(
                    "Error getting test object from spreadsheet document",e) ;
View Full Code Here

        }

        XSheetAnnotationAnchor oAnnoA = (XSheetAnnotationAnchor)
            UnoRuntime.queryInterface(XSheetAnnotationAnchor.class, oCell);
        XSheetAnnotation oAnno = oAnnoA.getAnnotation();
        XSimpleText sText = ((XSimpleText)
            UnoRuntime.queryInterface(XSimpleText.class, oAnno));
        sText.setString("ScAnnotationsObj");

        XSheetAnnotationsSupplier supp = (XSheetAnnotationsSupplier)
            UnoRuntime.queryInterface(
                XSheetAnnotationsSupplier.class, oSheet);
        oObj = supp.getAnnotations();
View Full Code Here

        * Sets the string of annotation, then makes it visible and
        * checks the value returned by <code>getIsVisible</code> method. <p>
        * Has <b>OK</b> status if the method returns <code>true</code>.
        */
        public void _getIsVisible() {
          XSimpleText oText  = (XSimpleText)
            UnoRuntime.queryInterface(XSimpleText.class, oObj);
          oText.setString("XSheetAnnotation");
          oObj.setIsVisible(true);
          boolean bVis = oObj.getIsVisible();
          tRes.tested("getIsVisible()", bVis);
        }
View Full Code Here

TOP

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

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.