Examples of XURLTransformer


Examples of com.sun.star.util.XURLTransformer

        // switching to 'Page Preview' mode
        try {
            XDispatchProvider xDispProv = (XDispatchProvider)
                UnoRuntime.queryInterface(XDispatchProvider.class, xController);
            XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
                UnoRuntime.queryInterface(XURLTransformer.class,
            ((XMultiServiceFactory)Param.getMSF()).createInstance("com.sun.star.util.URLTransformer"));
            // Because it's an in/out parameter we must use an array of URL objects.
            URL[] aParseURL = new URL[1];
            aParseURL[0] = new URL();
            aParseURL[0].Complete = ".uno:PrintPreview";
            xParser.parseStrict(aParseURL);
            URL aURL = aParseURL[0];
            XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
            if(xDispatcher != null)
                xDispatcher.dispatch( aURL, null );
        } catch (com.sun.star.uno.Exception e) {
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

            try {
                String aSlotID = ".uno:FontDialog";
                XDispatchProvider xDispProv = (XDispatchProvider) UnoRuntime.queryInterface(
                                                      XDispatchProvider.class,
                                                      xController);
                XURLTransformer xParser = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(
                                                  XURLTransformer.class,
                                                  msf.createInstance(
                                                          "com.sun.star.util.URLTransformer"));

                // Because it's an in/out parameter we must use an array of URL objects.
                URL[] aParseURL = new URL[1];
                aParseURL[0] = new URL();
                aParseURL[0].Complete = aSlotID;
                xParser.parseStrict(aParseURL);

                URL aURL = aParseURL[0];
                XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);

                if (xDispatcher != null) {
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

        XController secondController = aModel1.getCurrentController();

        XDispatchProvider aProv = (XDispatchProvider)UnoRuntime.
            queryInterface(XDispatchProvider.class, secondController);

        XURLTransformer urlTransf = null;

        try {
            XInterface transf = (XInterface)((XMultiServiceFactory)tParam.getMSF()).createInstance
                ("com.sun.star.util.URLTransformer");
            urlTransf = (XURLTransformer)UnoRuntime.queryInterface
                (XURLTransformer.class, transf);
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create URLTransformer", e );
        }

        XDispatch getting = null;
        log.println( "opening HyperlinkDialog" );
        URL[] url = new URL[1];
        url[0] = new URL();
        url[0].Complete = ".uno:HyperlinkDialog";
        urlTransf.parseStrict(url);
        getting = aProv.queryDispatch(url[0], "", 0);
        PropertyValue[] noArgs = new PropertyValue[0];
        getting.dispatch(url[0], noArgs);

        shortWait();
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

        XDispatchProvider aProv = (XDispatchProvider) UnoRuntime.queryInterface(
                                          XDispatchProvider.class,
                                          secondController);

        XURLTransformer urlTransf = null;

        try {
            XInterface transf = (XInterface) ((XMultiServiceFactory) tParam.getMSF()).createInstance(
                                        "com.sun.star.util.URLTransformer");
            urlTransf = (XURLTransformer) UnoRuntime.queryInterface(
                                XURLTransformer.class, transf);
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException("Couldn't create URLTransformer", e);
        }

        XDispatch getting = null;
        log.println("opening InsertField dialog");

        URL[] url = new URL[1];
        url[0] = new URL();
        url[0].Complete = ".uno:InsertField";
        urlTransf.parseStrict(url);
        getting = aProv.queryDispatch(url[0], "", 0);

        PropertyValue[] noArgs = new PropertyValue[0];
        getting.dispatch(url[0], noArgs);
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

    public static URL parseURL(XMultiServiceFactory xMSF, String url){
        URL[] rUrl = new URL[1];
        rUrl[0] = new URL();
        rUrl[0].Complete = url;

        XURLTransformer xTrans = null;
        try {
            Object inst = xMSF.createInstance
                ("com.sun.star.util.URLTransformer");
            xTrans = (XURLTransformer) UnoRuntime.queryInterface
                (XURLTransformer.class, inst);
        } catch (com.sun.star.uno.Exception e) {}

        xTrans.parseStrict(rUrl);

        return rUrl[0];
    }
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

        try {

            XDispatchProvider xDispProv = (XDispatchProvider)
                UnoRuntime.queryInterface( XDispatchProvider.class, xCont );
           
            XURLTransformer xParser = (com.sun.star.util.XURLTransformer)
                UnoRuntime.queryInterface(XURLTransformer.class, xMSF.createInstance("com.sun.star.util.URLTransformer"));

            // Because it's an in/out parameter we must use an array of URL objects.
            URL[] aParseURL = new URL[1];
            aParseURL[0] = new URL();
            aParseURL[0].Complete = URL;
            xParser.parseStrict(aParseURL);

            URL aURL = aParseURL[0];

            XDispatch xDispatcher = xDispProv.queryDispatch( aURL,"",0);
            xDispatcher.dispatch( aURL, null );
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

            if ( aURL.Path.compareTo("CreateExpression") == 0 ){
                /* This is just a button for "insert - object - formula "*/
                XDispatchProvider xDP =
                        (XDispatchProvider)UnoRuntime.queryInterface(
                        XDispatchProvider.class, xFrame);
                XURLTransformer xParser =
                        (XURLTransformer) UnoRuntime.queryInterface(
                        XURLTransformer.class,
                        xServiceManager.createInstanceWithContext(
                        "com.sun.star.util.URLTransformer",m_xContext));
                com.sun.star.util.URL[] aParseURL = new com.sun.star.util.URL[1];
                aParseURL[0] = new com.sun.star.util.URL();
                aParseURL[0].Complete = ".uno:InsertObjectStarMath";
                xParser.parseStrict (aParseURL);
                XDispatch xDispatcher = xDP.queryDispatch(aParseURL[0],"",0);
                if(xDispatcher!=null){
                    PropertyValue[] Properties = new PropertyValue[0];
                    xDispatcher.dispatch (aParseURL[0],Properties);
                }
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

                ControlCommand cc = new ControlCommand();
                cc.Command = "SetText";
                cc.Arguments = nv;
                /* send dispatch to frame */
                XMultiComponentFactory xServiceManager = m_xContext.getServiceManager();
                XURLTransformer xParser = (XURLTransformer) UnoRuntime.queryInterface(
                            XURLTransformer.class,
                            xServiceManager.createInstanceWithContext(
                            "com.sun.star.util.URLTransformer",m_xContext));
                URL[] aParseURL = new URL[1];
                aParseURL[0] = new URL();
                aParseURL[0].Complete = "com.CompPad.addon:editExprField";
                xParser.parseStrict(aParseURL);
                FeatureStateEvent aEvent = new FeatureStateEvent();
                aEvent.FeatureURL = aParseURL[0];
                aEvent.Source = this;
                aEvent.IsEnabled = true;
                aEvent.Requery = false;
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

    public static URL parseURL(XMultiServiceFactory xMSF, String url) {
        URL[] rUrl = new URL[1];
        rUrl[0] = new URL();
        rUrl[0].Complete = url;

        XURLTransformer xTrans = null;
        try {
            Object inst = xMSF.createInstance("com.sun.star.util.URLTransformer");
            xTrans = (XURLTransformer) UnoRuntime.queryInterface(XURLTransformer.class, inst);
        } catch (com.sun.star.uno.Exception e) {
        }

        xTrans.parseStrict(rUrl);

        return rUrl[0];
    }
View Full Code Here

Examples of com.sun.star.util.XURLTransformer

    public static void dispatchURL(XMultiServiceFactory xMSF, XController xCont, String URL) throws java.lang.Exception {
        try {

            XDispatchProvider xDispProv = (XDispatchProvider) UnoRuntime.queryInterface(XDispatchProvider.class, xCont);

            XURLTransformer xParser = (com.sun.star.util.XURLTransformer) UnoRuntime.queryInterface(
                XURLTransformer.class,
                xMSF.createInstance("com.sun.star.util.URLTransformer"));

            // Because it's an in/out parameter we must use an array of URL objects.
            URL[] aParseURL = new URL[1];
            aParseURL[0] = new URL();
            aParseURL[0].Complete = URL;
            xParser.parseStrict(aParseURL);

            URL aURL = aParseURL[0];

            XDispatch xDispatcher = xDispProv.queryDispatch(aURL, "", 0);
            xDispatcher.dispatch(aURL, null);
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.