Examples of XEventsSupplier


Examples of com.sun.star.document.XEventsSupplier

        xMSF = _xMSF;
    }

    public static void attachEventCall(XComponent xComponent, String EventName, String EventType, String EventURL) {
        try {
            XEventsSupplier xEventsSuppl = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, xComponent);
            PropertyValue[] oEventProperties = new PropertyValue[2];
            oEventProperties[0] = new PropertyValue();
            oEventProperties[0].Name = "EventType";
            oEventProperties[0].Value = EventType; // "Service", "StarBasic"
            oEventProperties[1] = new PropertyValue();
            oEventProperties[1].Name = "Script"; //"URL";
            oEventProperties[1].Value = EventURL;
            xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties);
        } catch (Exception exception) {
            exception.printStackTrace(System.out);
        }
    }
View Full Code Here

Examples of com.sun.star.document.XEventsSupplier

    public static void attachEventCall(XComponent xComponent, String EventName, String EventType, String EventURL)
    {
        try
        {
            XEventsSupplier xEventsSuppl = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class, xComponent);
            PropertyValue[] oEventProperties = new PropertyValue[2];
            oEventProperties[0] = new PropertyValue();
            oEventProperties[0].Name = "EventType";
            oEventProperties[0].Value = EventType; // "Service", "StarBasic"
            oEventProperties[1] = new PropertyValue();
            oEventProperties[1].Name = "Script"; //"URL";
            oEventProperties[1].Value = EventURL;
            xEventsSuppl.getEvents().replaceByName(EventName, oEventProperties);
        }
        catch (Exception exception)
        {
            exception.printStackTrace(System.out);
        }
View Full Code Here

Examples of com.sun.star.document.XEventsSupplier

        XModel databaseDoc = impl_createDocWithMacro( libName, moduleName, eventHandlerCode );
        final String documentURL = databaseDoc.getURL();

        // bind the macro to the OnLoad event
        final String macroURI = "vnd.sun.star.script:" + libName + "." + moduleName + ".OnLoad?language=Basic&location=document";
        final XEventsSupplier eventsSupplier = (XEventsSupplier) UnoRuntime.queryInterface(XEventsSupplier.class,
                databaseDoc);
        eventsSupplier.getEvents().replaceByName("OnLoad", new PropertyValue[]
                {
                    new PropertyValue("EventType", 0, "Script", PropertyState.DIRECT_VALUE),
                    new PropertyValue("Script", 0, macroURI, PropertyState.DIRECT_VALUE)
                });
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.