Package com.sun.star.io

Examples of com.sun.star.io.XActiveDataSink


        } catch (com.sun.star.uno.Exception e) {
        }

        log.println("Implementation name: "+ util.utils.getImplName(oObj));
       
        XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj);
        xSink.setInputStream(xStream);
        TestEnvironment tEnv = new TestEnvironment(oObj);
       
        tEnv.addObjRelation("InputStream", xStream);
       
        return tEnv;       
View Full Code Here


            oObj.endLayer();

            Object LayerParser = ((XMultiServiceFactory) tParam.getMSF()).createInstance(
                                         "com.sun.star.comp.configuration.backend.xml.LayerParser");

            XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(
                                            XActiveDataSink.class, LayerParser);
            Object fileacc = ((XMultiServiceFactory) tParam.getMSF()).createInstance(
                                     "com.sun.star.comp.ucb.SimpleFileAccess");
            XSimpleFileAccess simpleAccess = (XSimpleFileAccess) UnoRuntime.queryInterface(
                                                     XSimpleFileAccess.class,
                                                     fileacc);

            String filename = util.utils.getOfficeTemp(
                                      (XMultiServiceFactory) tParam.getMSF()) +
                              "LayerWriter.xcu";
            log.println("Going to parse: " + filename);

            XInputStream xStream = simpleAccess.openFileRead(filename);

            xSink.setInputStream(xStream);

            XLayer xLayer = (XLayer) UnoRuntime.queryInterface(XLayer.class,
                                                               LayerParser);

            XLayerHandlerImpl xLayerHandler = new XLayerHandlerImpl();
View Full Code Here

            Object mistream = ((XMultiServiceFactory)tParam.getMSF()).createInstance
                ("com.sun.star.io.MarkableInputStream");
            Object mostream = ((XMultiServiceFactory)tParam.getMSF()).createInstance
                ("com.sun.star.io.MarkableOutputStream");

            XActiveDataSink xdSi = (XActiveDataSink)
                UnoRuntime.queryInterface(XActiveDataSink.class, istream);
            XActiveDataSource xdSo = (XActiveDataSource)
                UnoRuntime.queryInterface(XActiveDataSource.class, ostream);
            XActiveDataSink xdSmi = (XActiveDataSink)
                UnoRuntime.queryInterface(XActiveDataSink.class, mistream);
            XActiveDataSource xdSmo = (XActiveDataSource)
                UnoRuntime.queryInterface(XActiveDataSource.class, mostream);

            XInputStream miStream = (XInputStream)
                UnoRuntime.queryInterface(XInputStream.class, mistream);
            XOutputStream moStream = (XOutputStream)
                UnoRuntime.queryInterface(XOutputStream.class, mostream);
            XInputStream PipeIn = (XInputStream)
                UnoRuntime.queryInterface(XInputStream.class, aPipe);
            XOutputStream PipeOut = (XOutputStream)
                UnoRuntime.queryInterface(XOutputStream.class,aPipe);

            xdSi.setInputStream(miStream);
            xdSo.setOutputStream(moStream);
            xdSmi.setInputStream(PipeIn);
            xdSmo.setOutputStream(PipeOut);

            iStream = (XObjectInputStream)
                UnoRuntime.queryInterface(XObjectInputStream.class, istream);
            oStream = (XObjectOutputStream)
View Full Code Here

            log.println("Going to parse: "+filename);
            xStream = simpleAccess.openFileRead(filename);
        } catch (com.sun.star.uno.Exception e) {
        }

        XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj);
        xSink.setInputStream(xStream);
    }
View Full Code Here

        } catch (com.sun.star.uno.Exception e) {
        }

        log.println("Implementation name: "+ util.utils.getImplName(oObj));
       
        XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj);
        xSink.setInputStream(xStream);
        TestEnvironment tEnv = new TestEnvironment(oObj);

        tEnv.addObjRelation("InputStream", xStream);
        tEnv.addObjRelation("ParsedFileName", filename);
        return tEnv;       
View Full Code Here

            OpenCommandArgument2 arg = new OpenCommandArgument2();
            arg.Mode = OpenMode.DOCUMENT;
            arg.Priority = 32768; // Final static for 32768

            // Create data sink implementation object.
            XActiveDataSink dataSink = new MyActiveDataSink();
            arg.Sink = dataSink;

            // Execute command "open". The implementation of the command will
            // supply an XInputStream implementation to the data sink.
            m_helper.executeCommand( m_content, "open", arg );

            // Get input stream supplied by the open command implementation.
            data = dataSink.getInputStream();
        }
        return data;
    }
View Full Code Here

            OpenCommandArgument2 arg = new OpenCommandArgument2();
            arg.Mode = OpenMode.DOCUMENT;
            arg.Priority = 32768; // Final static for 32768

            // Create data sink implementation object.
            XActiveDataSink dataSink = new MyActiveDataSink();
            arg.Sink = dataSink;

            // Execute command "open". The implementation of the command will
            // supply an XInputStream implementation to the data sink.
            m_helper.executeCommand( m_content, "open", arg );

            // Get input stream supplied by the open command implementation.
            data = dataSink.getInputStream();
        }
        return data;
    }
View Full Code Here

                            (XInputStream.class, oInStream);
                    } catch(com.sun.star.uno.Exception e) {
                        return null;
                    }

                    XActiveDataSink xDataSink = (XActiveDataSink)
                        UnoRuntime.queryInterface(
                            XActiveDataSink.class, xInStream);
                    xDataSink.setInputStream(xPipeInput);

                    return xInStream;
                }
            });
View Full Code Here

        } catch (com.sun.star.uno.Exception e) {
        }

        log.println("Implementation name: "+ util.utils.getImplName(oObj));
       
        XActiveDataSink xSink = (XActiveDataSink) UnoRuntime.queryInterface(XActiveDataSink.class, oObj);
        xSink.setInputStream(xStream);
        TestEnvironment tEnv = new TestEnvironment(oObj);
       
        tEnv.addObjRelation("InputStream", xStream);
       
        return tEnv;       
View Full Code Here

            OpenCommandArgument2 arg = new OpenCommandArgument2();
            arg.Mode = OpenMode.DOCUMENT;
            arg.Priority = 32768; // Final static for 32768

            // Create data sink implementation object.
            XActiveDataSink dataSink = new MyActiveDataSink();
            arg.Sink = dataSink;

            // Execute command "open". The implementation of the command will
            // supply an XInputStream implementation to the data sink.
            m_helper.executeCommand( m_content, "open", arg );

            // Get input stream supplied by the open command implementation.
            data = dataSink.getInputStream();
        }
        return data;
    }
View Full Code Here

TOP

Related Classes of com.sun.star.io.XActiveDataSink

Copyright © 2018 www.massapicom. 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.