Examples of XTempFile


Examples of com.sun.star.io.XTempFile

                m_aTestHelper.Message ( "==============================" );
                m_aTestHelper.Message ( sFilterName[i] );
                m_aTestHelper.Message ( "==============================" );
                //create a new temporary file
                Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
                XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface (
                    XTempFile.class, oTempFile );
               
                //create a text document and initiallize it
                Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
                XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface (
                        XLoadable.class, oTextDocument );
                xLoadable.initNew();
                m_aTestHelper.Message ( "New document initialized." );
               
                //store the instance to the temporary file URL
                XStorable xStorable = (XStorable) UnoRuntime.queryInterface (
                        XStorable.class, oTextDocument );
                String sURL = AnyConverter.toString ( xTempFile.getUri () );
                PropertyValue aProps[] = new PropertyValue[2];
                aProps[0] = new PropertyValue();
                aProps[0].Name = "DocumentTitle";
                aProps[0].Value = sDocTitle[i];
                aProps[1] = new PropertyValue();
View Full Code Here

Examples of com.sun.star.io.XTempFile

                m_aTestHelper.Message ( "==============================" );
                m_aTestHelper.Message ( sFilterName[i] );
                m_aTestHelper.Message ( "==============================" );
                //create a new temporary file
                Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
                XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface (
                    XTempFile.class, oTempFile );
               
                //create a text document and initiallize it
                Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
                XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface (
                        XLoadable.class, oTextDocument );
                xLoadable.initNew();
                m_aTestHelper.Message ( "New document initialized." );
               
                //store the instance to the temporary file URL
                XStorable xStorable = (XStorable) UnoRuntime.queryInterface (
                        XStorable.class, oTextDocument );
                String sURL = AnyConverter.toString ( xTempFile.getUri () );
                PropertyValue aProps[] = new PropertyValue[2];
                aProps[0] = new PropertyValue();
                aProps[0].Name = "DocumentTitle";
                aProps[0].Value = sDocTitle[i];
                aProps[1] = new PropertyValue();
View Full Code Here

Examples of com.sun.star.io.XTempFile

    {
        try
        {
            //create a new temporary stream
            Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
            XTempFile xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile);
            m_aTestHelper.Message ( "A new temporary stream created." );
           
            //create OLESimpleStorage based on it
            Object pArgs[] = new Object[2];
            pArgs[0] = (Object) xTempFile;
            pArgs[1] = new Boolean( true );
            Object oOLESimpleStorage = m_xMSF.createInstanceWithArguments ( "com.sun.star.embed.OLESimpleStorage", pArgs );
            XOLESimpleStorage xOLESimpleStorage = UnoRuntime.queryInterface(XOLESimpleStorage.class, oOLESimpleStorage);
            m_aTestHelper.Message ( "OLESimpleStorage based on XStream created." );
           
            //fill it with some streams
            Object oStream[] = new Object[pStreamCnt];
            byte pBytesIn[][][] = new byte [pStreamCnt][1][pBytesCnt];
            byte pBytesOut[][] = new byte [pStreamCnt][pBytesCnt];
            XTempFile xTempStream[] = new XTempFile[pStreamCnt];
            Random oRandom = new Random ();
            final String sSubStreamPrefix = "SubStream";
            for ( int i = 0; i < pStreamCnt; i++ )
            {
                oRandom.nextBytes (pBytesOut[i]);
View Full Code Here

Examples of com.sun.star.io.XTempFile

                m_aTestHelper.Message ( "==============================" );
                m_aTestHelper.Message ( sFilterName[i] );
                m_aTestHelper.Message ( "==============================" );
                //create a new temporary file
                Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
                XTempFile xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile);
               
                //create a text document and initiallize it
                Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
                XLoadable xLoadable = UnoRuntime.queryInterface(XLoadable.class, oTextDocument);
                xLoadable.initNew();
                m_aTestHelper.Message ( "New document initialized." );
               
                //store the instance to the temporary file URL
                XStorable xStorable = UnoRuntime.queryInterface(XStorable.class, oTextDocument);
                String sURL = AnyConverter.toString ( xTempFile.getUri () );
                PropertyValue aProps[] = new PropertyValue[2];
                aProps[0] = new PropertyValue();
                aProps[0].Name = "DocumentTitle";
                aProps[0].Value = sDocTitle[i];
                aProps[1] = new PropertyValue();
View Full Code Here

Examples of com.sun.star.io.XTempFile

                m_aTestHelper.Message ( "==============================" );
                m_aTestHelper.Message ( sFilterName[i] );
                m_aTestHelper.Message ( "==============================" );
                //create a new temporary file
                Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
                XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface (
                    XTempFile.class, oTempFile );
               
                //create a text document and initiallize it
                Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
                XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface (
                        XLoadable.class, oTextDocument );
                xLoadable.initNew();
                m_aTestHelper.Message ( "New document initialized." );
               
                //store the instance to the temporary file URL
                XStorable xStorable = (XStorable) UnoRuntime.queryInterface (
                        XStorable.class, oTextDocument );
                String sURL = AnyConverter.toString ( xTempFile.getUri () );
                PropertyValue aProps[] = new PropertyValue[2];
                aProps[0] = new PropertyValue();
                aProps[0].Name = "DocumentTitle";
                aProps[0].Value = sDocTitle[i];
                aProps[1] = new PropertyValue();
View Full Code Here

Examples of com.sun.star.io.XTempFile

    {
        try
        {
            //create a new temporary stream
            Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
            XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface ( XTempFile.class, oTempFile );
            m_aTestHelper.Message ( "A new temporary stream created." );
           
            //create OLESimpleStorage based on it
            Object pArgs[] = new Object[2];
            pArgs[0] = (Object) xTempFile;
            pArgs[1] = new Boolean( true );
            Object oOLESimpleStorage = m_xMSF.createInstanceWithArguments ( "com.sun.star.embed.OLESimpleStorage", pArgs );
            XOLESimpleStorage xOLESimpleStorage = (XOLESimpleStorage) UnoRuntime.queryInterface ( XOLESimpleStorage.class, oOLESimpleStorage );
            m_aTestHelper.Message ( "OLESimpleStorage based on XStream created." );
           
            //fill it with some streams
            Object oStream[] = new Object[pStreamCnt];
            byte pBytesIn[][][] = new byte [pStreamCnt][1][pBytesCnt];
            byte pBytesOut[][] = new byte [pStreamCnt][pBytesCnt];
            XTempFile xTempStream[] = new XTempFile[pStreamCnt];
            Random oRandom = new Random ();
            final String sSubStreamPrefix = "SubStream";
            for ( int i = 0; i < pStreamCnt; i++ )
            {
                oRandom.nextBytes (pBytesOut[i]);
View Full Code Here

Examples of com.sun.star.io.XTempFile

                m_aTestHelper.Message ( "==============================" );
                m_aTestHelper.Message ( sFilterName[i] );
                m_aTestHelper.Message ( "==============================" );
                //create a new temporary file
                Object oTempFile = m_xMSF.createInstance ( "com.sun.star.io.TempFile" );
                XTempFile xTempFile = (XTempFile) UnoRuntime.queryInterface (
                    XTempFile.class, oTempFile );
               
                //create a text document and initiallize it
                Object oTextDocument = m_xMSF.createInstance ( "com.sun.star.text.TextDocument" );
                XLoadable xLoadable = (XLoadable) UnoRuntime.queryInterface (
                        XLoadable.class, oTextDocument );
                xLoadable.initNew();
                m_aTestHelper.Message ( "New document initialized." );
               
                //store the instance to the temporary file URL
                XStorable xStorable = (XStorable) UnoRuntime.queryInterface (
                        XStorable.class, oTextDocument );
                String sURL = AnyConverter.toString ( xTempFile.getUri () );
                PropertyValue aProps[] = new PropertyValue[2];
                aProps[0] = new PropertyValue();
                aProps[0].Name = "DocumentTitle";
                aProps[0].Value = sDocTitle[i];
                aProps[1] = new PropertyValue();
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.