Examples of XFootnotesSupplier


Examples of com.sun.star.text.XFootnotesSupplier

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

    * to the text, and finally gets all footnotes of text document
    * through <code>XFootnotesSupplier</code> interface.
    */
    public synchronized TestEnvironment createTestEnvironment(
            TestParameters Param, PrintWriter log ) throws StatusException {
        XFootnotesSupplier oInterface = null;
        XInterface oObj = null;

        log.println( "Creating a test environment" );
        XMultiServiceFactory msf = (XMultiServiceFactory)
            UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
        log.println("creating a footnote");
        XFootnote oFootnote;

        try {
            oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
                    msf.createInstance("com.sun.star.text.Footnote"));
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create footnote", e);
        }

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

        log.println("inserting the footnote into text document");
        try {
            oText.insertTextContent(oCursor, oFootnote, false);
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't insert the footnote", e);
        }
        oInterface = (XFootnotesSupplier)
            UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
        oObj = oInterface.getFootnotes();

        log.println( "creating a new environment for Foontnotes object" );
        TestEnvironment tEnv = new TestEnvironment(oObj);
        return tEnv;
    }
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

            {"end", "office:styles"},
            {"end", "office:document-styles"}} ;

        tEnv.addObjRelation("XDocumentHandler.XMLData", xml) ;

        XFootnotesSupplier supp = (XFootnotesSupplier) UnoRuntime.queryInterface
            (XFootnotesSupplier.class, xTextDoc);
        final XPropertySet set = supp.getFootnoteSettings();
        final PrintWriter logF = log ;

        tEnv.addObjRelation("XDocumentHandler.ImportChecker",
            new ifc.xml.sax._XDocumentHandler.ImportChecker() {
                public boolean checkImport() {
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

        // create testobject here
        log.println( "creating a new environment" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        // Obtain Footnotes properties
        XFootnotesSupplier supp = (XFootnotesSupplier) UnoRuntime.queryInterface
            (XFootnotesSupplier.class, xTextDoc);
        XPropertySet set = supp.getFootnoteSettings();

        // Change property "Prefix"
        try {
            set.setPropertyValue("Prefix","New Property");
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

    * to the text document, and finally gets footnote settings from text
    * document through <code>XFootnotesSupplier</code> interface.<br>
    */
    public synchronized TestEnvironment createTestEnvironment(
            TestParameters Param, PrintWriter log ) throws StatusException {
        XFootnotesSupplier oInterface = null;
        XInterface oObj = null;
        XFootnote oFootnote;

        log.println( "Creating a test environment" );
        // get a soffice factory object
        XMultiServiceFactory msf = (XMultiServiceFactory)
            UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
        log.println("creating a footnote");

        try {
            oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
                    msf.createInstance("com.sun.star.text.Footnote"));
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create footnote", e);
        }

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

        log.println("inserting the footnote into text document");
        try {
            oText.insertTextContent(oCursor, oFootnote, false);
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't insert the footnote", e);
        }

        oInterface = (XFootnotesSupplier)
            UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
        oObj = oInterface.getFootnoteSettings();

        TestEnvironment tEnv = new TestEnvironment(oObj);
        return tEnv;
    }
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

           
            // ...insert it into the document
            mxDocText.insertTextContent ( mxDocCursor, xContent, false );
           
            // Get the XFootnotesSupplier interface of the document
            XFootnotesSupplier xFootnoteSupplier = (XFootnotesSupplier)
                UnoRuntime.queryInterface(XFootnotesSupplier.class, mxDoc );

            // Get an XIndexAccess interface to all footnotes
            XIndexAccess xFootnotes = ( XIndexAccess ) UnoRuntime.queryInterface (
                XIndexAccess.class, xFootnoteSupplier.getFootnotes() );

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

Examples of com.sun.star.text.XFootnotesSupplier

                    // ...insert it into the document
                    mxDocText.insertTextContent ( mxDocCursor, xContent, false );

                    // Get the XFootnotesSupplier interface of the document
                    XFootnotesSupplier xFootnoteSupplier = (XFootnotesSupplier) UnoRuntime.queryInterface(
                            XFootnotesSupplier.class, mxDoc );

                    // Get an XIndexAccess interface to all footnotes
                    XIndexAccess xFootnotes = ( XIndexAccess ) UnoRuntime.queryInterface (
                            XIndexAccess.class, xFootnoteSupplier.getFootnotes() );

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

Examples of com.sun.star.text.XFootnotesSupplier

      oNA = oTTS.getBookmarks();
    }

    if ( iDsc instanceof FootnoteDsc ) {
      XFootnotesSupplier oTTS = (XFootnotesSupplier)
          UnoRuntime.queryInterface(
                    XFootnotesSupplier.class, xParent );

      return( oTTS.getFootnotes() );
    }

    if ( iDsc instanceof TextSectionDsc ) {
      XTextSectionsSupplier oTSS = (XTextSectionsSupplier)
          UnoRuntime.queryInterface(
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

        // create testobject here
        log.println( "creating a new environment" );
        TestEnvironment tEnv = new TestEnvironment( oObj );

        // Obtain Footnotes properties
        XFootnotesSupplier supp = (XFootnotesSupplier) UnoRuntime.queryInterface
            (XFootnotesSupplier.class, xTextDoc);
        XPropertySet set = supp.getFootnoteSettings();

        // Change property "Prefix"
        try {
            set.setPropertyValue("Prefix","New Property");
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.text.XFootnotesSupplier

    * to the text document, and finally gets footnote settings from text
    * document through <code>XFootnotesSupplier</code> interface.<br>
    */
    public synchronized TestEnvironment createTestEnvironment(
            TestParameters Param, PrintWriter log ) throws StatusException {
        XFootnotesSupplier oInterface = null;
        XInterface oObj = null;
        XFootnote oFootnote;

        log.println( "Creating a test environment" );
        // get a soffice factory object
        XMultiServiceFactory msf = (XMultiServiceFactory)
            UnoRuntime.queryInterface(XMultiServiceFactory.class, xTextDoc);
        log.println("creating a footnote");

        try {
            oFootnote = (XFootnote) UnoRuntime.queryInterface(XFootnote.class,
                    msf.createInstance("com.sun.star.text.Footnote"));
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create footnote", e);
        }

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

        log.println("inserting the footnote into text document");
        try {
            oText.insertTextContent(oCursor, oFootnote, false);
        } catch (com.sun.star.lang.IllegalArgumentException e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't insert the footnote", e);
        }

        oInterface = (XFootnotesSupplier)
            UnoRuntime.queryInterface(XFootnotesSupplier.class, xTextDoc);
        oObj = oInterface.getFootnoteSettings();

        TestEnvironment tEnv = new TestEnvironment(oObj);
        return tEnv;
    }
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.