Examples of XHyphenatedWord


Examples of com.sun.star.linguistic2.XHyphenatedWord

    */
    public void _hyphenate() {
        boolean res = true;
        PropertyValue[] Props = null;
        try {
            XHyphenatedWord result = oObj.hyphenate(
                    "wacker",new Locale("de","DE",""),(short)3,Props);
            res &= (result != null);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            log.println("Exception while checking 'hyphenate'");
            res = false;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

    */
    public void _queryAlternativeSpelling() {
        boolean res = true;
        PropertyValue[] Props = null;
        try {
                XHyphenatedWord result = oObj.queryAlternativeSpelling(
                    "wacker",new Locale("de","DE",""),(short)2,Props);
                res &= (result != null);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            log.println("Exception while checking 'queryAlternativeSpelling'");
            res = false;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        {
            // maximum number of characters to remain before the hyphen
            // character in the resulting word of the hyphenation
            short nMaxLeading = 6;

            XHyphenatedWord xHyphWord = mxHyph.hyphenate( "waterfall", aLocale, nMaxLeading , aEmptyProps );
            if (xHyphWord == null)
                System.out.println( "no valid hyphenation position found" );
            else
            {
                System.out.println( "valid hyphenation pos found at " + xHyphWord.getHyphenationPos()
                        + " in " + xHyphWord.getWord() );
                System.out.println( "hyphenation char will be after char " + xHyphWord.getHyphenPos()
                        + " in " + xHyphWord.getHyphenatedWord() );
            }


            //! Note: 'aProps' needs to have set 'IsGermanPreReform' to true!
            xHyphWord = mxHyph.queryAlternativeSpelling( "Schiffahrt",
                                new Locale("de","DE",""), (short)4, aProps );
            if (xHyphWord == null)
                System.out.println( "no alternative spelling found at specified position." );
            else
            {
                if (xHyphWord.isAlternativeSpelling())
                    System.out.println( "alternative spelling detectetd!" );
                System.out.println( "valid hyphenation pos found at " + xHyphWord.getHyphenationPos()
                        + " in " + xHyphWord.getWord() );
                System.out.println( "hyphenation char will be after char " + xHyphWord.getHyphenPos()
                        + " in " + xHyphWord.getHyphenatedWord() );
            }


            XPossibleHyphens xPossHyph = mxHyph.createPossibleHyphens( "waterfall", aLocale, aEmptyProps );
            if (xPossHyph == null)
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        {
            // maximum number of characters to remain before the hyphen
            // character in the resulting word of the hyphenation
            short nMaxLeading = 6;

            XHyphenatedWord xHyphWord = mxHyph.hyphenate( "waterfall",
                                                          aLocale, nMaxLeading ,
                                                          aEmptyProps );
            if (xHyphWord == null)
                System.out.println( "no valid hyphenation position found" );
            else
            {
                System.out.println( "valid hyphenation pos found at "
                                    + xHyphWord.getHyphenationPos()
                        + " in " + xHyphWord.getWord() );
                System.out.println( "hyphenation char will be after char "
                                    + xHyphWord.getHyphenPos()
                        + " in " + xHyphWord.getHyphenatedWord() );
            }


            //! Note: 'aProps' needs to have set 'IsGermanPreReform' to true!
            xHyphWord = mxHyph.queryAlternativeSpelling( "Schiffahrt",
                                new Locale("de","DE",""), (short)4, aProps );
            if (xHyphWord == null)
                System.out.println( "no alternative spelling found at specified position." );
            else
            {
                if (xHyphWord.isAlternativeSpelling())
                    System.out.println( "alternative spelling detectetd!" );
                System.out.println( "valid hyphenation pos found at "
                                    + xHyphWord.getHyphenationPos()
                        + " in " + xHyphWord.getWord() );
                System.out.println( "hyphenation char will be after char "
                                    + xHyphWord.getHyphenPos()
                        + " in " + xHyphWord.getHyphenatedWord() );
            }


            XPossibleHyphens xPossHyph = mxHyph.createPossibleHyphens("waterfall",
                                                                      aLocale,
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

    */
    public void _hyphenate() {
        boolean res = true;
        PropertyValue[] Props = null;
        try {
            XHyphenatedWord result = oObj.hyphenate(
                    "wacker",new Locale("de","DE",""),(short)3,Props);
            res &= (result != null);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            log.println("Exception while checking 'hyphenate'");
            res = false;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

    */
    public void _queryAlternativeSpelling() {
        boolean res = true;
        PropertyValue[] Props = null;
        try {
                XHyphenatedWord result = oObj.queryAlternativeSpelling(
                    "wacker",new Locale("de","DE",""),(short)2,Props);
                res &= (result != null);
        } catch (com.sun.star.lang.IllegalArgumentException ex) {
            log.println("Exception while checking 'queryAlternativeSpelling'");
            res = false;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        boolean bIsGermanPreReform          = GetValueToUse( "IsGermanPreReform", false, aProperties );
        short   nHyphMinLeading             = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
        short   nHyphMinTrailing            = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
        short   nHyphMinWordLen             = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );

        XHyphenatedWord xRes = null;
       
        if (aWord.length() >= nHyphMinWordLen)
        {
            String  aHyphenatedWord = aWord;
            short   nHyphenationPos = -1;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        boolean bIsGermanPreReform          = GetValueToUse( "IsGermanPreReform", false, aProperties );
        short   nHyphMinLeading             = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
        short   nHyphMinTrailing            = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
        short   nHyphMinWordLen             = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );
       
        XHyphenatedWord xRes = null;

        //!! This code needs to be replaced by code calling the actual
        //!! implementation of your hyphenator
        if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) )
        {
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        boolean bIsGermanPreReform          = GetValueToUse( "IsGermanPreReform", false, aProperties );
        short   nHyphMinLeading             = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
        short   nHyphMinTrailing            = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
        short   nHyphMinWordLen             = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );

        XHyphenatedWord xRes = null;
       
        if (aWord.length() >= nHyphMinWordLen)
        {
            String  aHyphenatedWord = aWord;
            short   nHyphenationPos = -1;
View Full Code Here

Examples of com.sun.star.linguistic2.XHyphenatedWord

        boolean bIsGermanPreReform          = GetValueToUse( "IsGermanPreReform", false, aProperties );
        short   nHyphMinLeading             = GetValueToUse( "HyphMinLeading", (short)2, aProperties );
        short   nHyphMinTrailing            = GetValueToUse( "HyphMinTrailing", (short)2, aProperties );
        short   nHyphMinWordLen             = GetValueToUse( "HyphMinWordLength", (short)5, aProperties );
       
        XHyphenatedWord xRes = null;

        //!! This code needs to be replaced by code calling the actual
        //!! implementation of your hyphenator
        if ( IsEqual( aLocale, new Locale( "de", "DE", "" ) ) )
        {
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.