Package com.sun.star.text

Examples of com.sun.star.text.XWordCursor.gotoNextWord()


            xText.setString( "This is an example sentence" );
           
            XWordCursor xWordCursor = (XWordCursor) UnoRuntime.queryInterface(
                XWordCursor.class, xText.getStart() );
           
            xWordCursor.gotoNextWord(false);
            xWordCursor.gotoNextWord(false);
            xWordCursor.gotoEndOfWord(true);
           
            XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(
                XPropertySet.class, xWordCursor );
View Full Code Here


           
            XWordCursor xWordCursor = (XWordCursor) UnoRuntime.queryInterface(
                XWordCursor.class, xText.getStart() );
           
            xWordCursor.gotoNextWord(false);
            xWordCursor.gotoNextWord(false);
            xWordCursor.gotoEndOfWord(true);
           
            XPropertySet xPropertySet = (XPropertySet) UnoRuntime.queryInterface(
                XPropertySet.class, xWordCursor );
            xPropertySet.setPropertyValue("CharWeight", new Float( com.sun.star.awt.FontWeight.BOLD ) );
View Full Code Here

        xText.setString("Two words");
        xTextCursor.gotoStart(false);
        XWordCursor xWordCursor = (XWordCursor)
            UnoRuntime.queryInterface(XWordCursor.class, xTextCursor);

        bSuccess = xWordCursor.gotoNextWord(true);
        assure("gotoNextWord(): failed", bSuccess);
        {
            String string = xTextCursor.getString();
            assure("gotoNextWord(): wrong string: " + string,
                    "Two ".equals(string));
View Full Code Here

        {
            String string = xTextCursor.getString();
            assure("gotoNextWord(): wrong string: " + string,
                    "Two ".equals(string));
        }
        bSuccess = xWordCursor.gotoNextWord(false);
        assure("gotoNextWord(): succeeded", !bSuccess);
        xTextCursor.collapseToEnd();
        bSuccess = xWordCursor.gotoPreviousWord(true);
        assure("gotoPreviousWord(): failed", bSuccess);
        {
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.