Examples of XEmbeddedScripts


Examples of com.sun.star.document.XEmbeddedScripts

    {
        // create an empty document
        XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();

        // create Basic library/module therein
        final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class,
                databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        final XNameContainer newLib = basicLibs.createLibrary("EventHandlers");
        final String eventHandlerCode =
                "Option Explicit\n" +
                "\n" +
                "Sub OnLoad\n" +
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    // -----------------------------------------------------------------------------------------------------------------
    private void impl_setupBrokenBasicScript()
    {
        try
        {
            final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface( XEmbeddedScripts.class, m_currentDocument.getDocument() );
            final XLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
            final XNameContainer basicLib = basicLibs.createLibrary( "default" );

            final String brokenScriptCode =
                "Option Explicit\n" +
                "\n" +
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    {
        // create an empty document
        XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();

        // create Basic library/module therein
        final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface(XEmbeddedScripts.class, databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        final XNameContainer newLib = basicLibs.createLibrary( _libName );
        newLib.insertByName( _moduleName, _code );

        return databaseDoc;
    }
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

        databaseDoc = impl_loadDocument( documentURL, impl_getMarkerLoadArgs() );
        // since we just put the marker into the load-call, it should be present at the doc
        assertTrue( "The test case marker got lost.", impl_hasMarker( databaseDoc.getArgs() ) );

        // The basic library should have survived
        final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface(XEmbeddedScripts.class, databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        assertTrue( "Baisc lib did not survive reloading a closed document", basicLibs.hasByName( "Lib" ) );
        final XNameContainer lib = UnoRuntime.queryInterface(XNameContainer.class, basicLibs.getByName("Lib"));
        assertTrue( "Basic module did not survive reloading a closed document", lib.hasByName( "Module" ) );

        // now closing the doc, and obtaining it from the data source, should preserve the marker we put into the load
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    {
        // create an empty document
        XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();

        // create Basic library/module therein
        final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class,
                databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        final XNameContainer newLib = basicLibs.createLibrary("EventHandlers");
        final String eventHandlerCode =
                "Option Explicit\n" +
                "\n" +
                "Sub OnLoad\n" +
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    {
        // create an empty document
        XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();

        // create Basic library/module therein
        XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface( XEmbeddedScripts.class,
            databaseDoc );
        XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        XNameContainer newLib = basicLibs.createLibrary( "EventHandlers" );
        String eventHandlerCode =
            "Option Explicit\n" +
            "\n" +
            "Sub OnLoad\n" +
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    // -----------------------------------------------------------------------------------------------------------------
    private void impl_setupBrokenBasicScript()
    {
        try
        {
            final XEmbeddedScripts embeddedScripts = UnoRuntime.queryInterface( XEmbeddedScripts.class, m_currentDocument.getDocument() );
            final XLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
            final XNameContainer basicLib = basicLibs.createLibrary( "default" );

            final String brokenScriptCode =
                "Option Explicit\n" +
                "\n" +
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

    {
        // create an empty document
        XModel databaseDoc = impl_createEmptyEmbeddedHSQLDocument();

        // create Basic library/module therein
        final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class,
                databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        final XNameContainer newLib = basicLibs.createLibrary( _libName );
        newLib.insertByName( _moduleName, _code );

        return databaseDoc;
    }
View Full Code Here

Examples of com.sun.star.document.XEmbeddedScripts

        databaseDoc = impl_loadDocument( documentURL, impl_getMarkerLoadArgs() );
        // since we just put the marker into the load-call, it should be present at the doc
        assure( "The test case marker got lost.", impl_hasMarker( databaseDoc.getArgs() ) );

        // The basic library should have survived
        final XEmbeddedScripts embeddedScripts = (XEmbeddedScripts) UnoRuntime.queryInterface(XEmbeddedScripts.class,
                databaseDoc);
        final XStorageBasedLibraryContainer basicLibs = embeddedScripts.getBasicLibraries();
        assure( "Baisc lib did not survive reloading a closed document", basicLibs.hasByName( "Lib" ) );
        final XNameContainer lib = (XNameContainer)UnoRuntime.queryInterface(
            XNameContainer.class, basicLibs.getByName( "Lib" ) );
        assure( "Basic module did not survive reloading a closed document", lib.hasByName( "Module" ) );
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.