Examples of XLibraryContainer


Examples of com.sun.star.script.XLibraryContainer

    final protected void createListenerScript()
    {
        try
        {
            XPropertySet docProps = dbfTools.queryPropertySet( m_document.getDocument() );
            XLibraryContainer basicLibs = (XLibraryContainer)UnoRuntime.queryInterface(
                XLibraryContainer.class, docProps.getPropertyValue( "BasicLibraries" ) );
            XNameContainer basicLib = basicLibs.createLibrary( "default" );

            String sListSelectionScript =
                "Option Explicit\n" +
                "\n" +
                "Sub onListBoxSelected( oEvent as Object )\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

    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" +
                "Sub brokenScript\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

        try {
            Object obj = xmcf.createInstanceWithContext(
               "com.sun.star.script.Application" + name + "LibraryContainer",
               context.getComponentContext());

            XLibraryContainer xLibraryContainer = (XLibraryContainer)
                UnoRuntime.queryInterface(XLibraryContainer.class, obj);

            System.err.println("Got XLibraryContainer");

            Object serviceObj = context.getComponentContext().getValueByName(
                "/singletons/com.sun.star.util.theMacroExpander");
                                                                               
            XMacroExpander xme = (XMacroExpander) AnyConverter.toObject(
                new Type(XMacroExpander.class), serviceObj);
                                                                               
            String bootstrapName = "bootstraprc";
            if (System.getProperty("os.name").startsWith("Windows")) {
                bootstrapName = "bootstrap.ini";
            }

            String libURL = xme.expandMacros(
                "${$BRAND_BASE_DIR/program/" + bootstrapName + "::BaseInstallation}" +
                "/share/basic/ScriptBindingLibrary/" +
                name.toLowerCase() + ".xlb/");

            System.err.println("libURL is: " + libURL);

            xLibraryContainer.createLibraryLink(
                "ScriptBindingLibrary", libURL, false);

            System.err.println("liblink created");

        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

    final protected void createListenerScript()
    {
        try
        {
            XPropertySet docProps = dbfTools.queryPropertySet( m_document.getDocument() );
            XLibraryContainer basicLibs = (XLibraryContainer)UnoRuntime.queryInterface(
                XLibraryContainer.class, docProps.getPropertyValue( "BasicLibraries" ) );
            XNameContainer basicLib = basicLibs.createLibrary( "default" );

            String sListSelectionScript =
                "Option Explicit\n" +
                "\n" +
                "Sub onListBoxSelected( oEvent as Object )\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

    final private void impl_setupListenerScript()
    {
        try
        {
            XPropertySet docProps = dbfTools.queryPropertySet( m_document.getDocument() );
            XLibraryContainer basicLibs = (XLibraryContainer)UnoRuntime.queryInterface(
                XLibraryContainer.class, docProps.getPropertyValue( "BasicLibraries" ) );
            XNameContainer basicLib = basicLibs.createLibrary( "default" );

            String sListSelectionScript =
                "Option Explicit\n" +
                "\n" +
                "Sub onListBoxSelected( oEvent as Object )\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

        try {
            Object obj = xmcf.createInstanceWithContext(
               "com.sun.star.script.Application" + name + "LibraryContainer",
               context.getComponentContext());

            XLibraryContainer xLibraryContainer = (XLibraryContainer)
                UnoRuntime.queryInterface(XLibraryContainer.class, obj);

            System.err.println("Got XLibraryContainer");

            Object serviceObj = context.getComponentContext().getValueByName(
                "/singletons/com.sun.star.util.theMacroExpander");
                                                                               
            XMacroExpander xme = (XMacroExpander) AnyConverter.toObject(
                new Type(XMacroExpander.class), serviceObj);
                                                                               
            String bootstrapName = "bootstraprc";
            if (System.getProperty("os.name").startsWith("Windows")) {
                bootstrapName = "bootstrap.ini";
            }

            String libURL = xme.expandMacros(
                "${$BRAND_BASE_DIR/program/" + bootstrapName + "::BaseInstallation}" +
                "/share/basic/ScriptBindingLibrary/" +
                name.toLowerCase() + ".xlb/");

            System.err.println("libURL is: " + libURL);

            xLibraryContainer.createLibraryLink(
                "ScriptBindingLibrary", libURL, false);

            System.err.println("liblink created");

        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

    final protected void createListenerScript()
    {
        try
        {
            XPropertySet docProps = dbfTools.queryPropertySet( m_document.getDocument() );
            XLibraryContainer basicLibs = (XLibraryContainer)UnoRuntime.queryInterface(
                XLibraryContainer.class, docProps.getPropertyValue( "BasicLibraries" ) );
            XNameContainer basicLib = basicLibs.createLibrary( "default" );

            String sListSelectionScript =
                "Option Explicit\n" +
                "\n" +
                "Sub onListBoxSelected( oEvent as Object )\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

        try {
            Object obj = xmcf.createInstanceWithContext(
               "com.sun.star.script.Application" + name + "LibraryContainer",
               context.getComponentContext());

            XLibraryContainer xLibraryContainer = (XLibraryContainer)
                UnoRuntime.queryInterface(XLibraryContainer.class, obj);

            System.err.println("Got XLibraryContainer");

            Object serviceObj = context.getComponentContext().getValueByName(
                "/singletons/com.sun.star.util.theMacroExpander");
                                                                               
            XMacroExpander xme = (XMacroExpander) AnyConverter.toObject(
                new Type(XMacroExpander.class), serviceObj);
                                                                               
            String bootstrapName = "bootstraprc";
            if (System.getProperty("os.name").startsWith("Windows")) {
                bootstrapName = "bootstrap.ini";
            }

            String libURL = xme.expandMacros(
                "${$OOO_BASE_DIR/program/" + bootstrapName + "::BaseInstallation}" +
                "/share/basic/ScriptBindingLibrary/" +
                name.toLowerCase() + ".xlb/");

            System.err.println("libURL is: " + libURL);

            xLibraryContainer.createLibraryLink(
                "ScriptBindingLibrary", libURL, false);

            System.err.println("liblink created");

        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

    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" +
                "Sub brokenScript\n" +
View Full Code Here

Examples of com.sun.star.script.XLibraryContainer

        try {
            Object obj = xmcf.createInstanceWithContext(
               "com.sun.star.script.Application" + name + "LibraryContainer",
               context.getComponentContext());

            XLibraryContainer xLibraryContainer = (XLibraryContainer)
                UnoRuntime.queryInterface(XLibraryContainer.class, obj);

            System.err.println("Got XLibraryContainer");

            Object serviceObj = context.getComponentContext().getValueByName(
                "/singletons/com.sun.star.util.theMacroExpander");
                                                                               
            XMacroExpander xme = (XMacroExpander) AnyConverter.toObject(
                new Type(XMacroExpander.class), serviceObj);
                                                                               
            String bootstrapName = "bootstraprc";
            if (System.getProperty("os.name").startsWith("Windows")) {
                bootstrapName = "bootstrap.ini";
            }

            String libURL = xme.expandMacros(
                "${$SYSBINDIR/" + bootstrapName + "::BaseInstallation}" +
                "/share/basic/ScriptBindingLibrary/" +
                name.toLowerCase() + ".xlb/");

            System.err.println("libURL is: " + libURL);

            xLibraryContainer.createLibraryLink(
                "ScriptBindingLibrary", libURL, false);

            System.err.println("liblink created");

        } catch (com.sun.star.uno.Exception e) {
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.