Package com.sun.star.frame

Examples of com.sun.star.frame.XStorable.storeAsURL()


        File tempFile = File.createTempFile( "xmlforms", ".odt" );
        tempFile.deleteOnExit();
        String fileURL = tempFile.toURL().toExternalForm();
        XStorable store = (XStorable)UnoRuntime.queryInterface( XStorable.class,
            m_document.getDocument() );
        store.storeAsURL( fileURL, new PropertyValue[] {} );
        assure( "document still modified after saving it", !m_document.isModified() );
    }

    /* ------------------------------------------------------------------ */
    public void after() throws com.sun.star.uno.Exception, java.lang.Exception
View Full Code Here


            } else {   
                stringConvertedFile = stringUrl + "." + stringExtension;
            }
           
            // Storing and converting the document
            xstorable.storeAsURL( stringConvertedFile, propertyvalue );
           
            XCloseable xcloseable = (XCloseable)UnoRuntime.queryInterface( XCloseable.class,xstorable );
           
            // Closing the converted document
            if ( xcloseable != null )
View Full Code Here

                        {
                            PropertyValue [] szEmptyArgs = new PropertyValue [0];
                           
                            GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Store document.");
                            _aGTA.getPerformance().startTime(PerformanceContainer.Store);
                            aStorable.storeAsURL(_sOutputURL, szEmptyArgs);
                            _aGTA.getPerformance().stopTime(PerformanceContainer.Store);

                            GlobalLogWriter.get().println(DateHelper.getDateTimeForHumanreadableLog() + " Store document done.");
                            TimeHelper.waitInSeconds(2, "After store as URL to:" + _sOutputURL);
                            GlobalLogWriter.get().println("Reload stored file test.");
View Full Code Here

                }

                sOutputURL = URLHelper.getFileURLFromSystemPath(sOutputFile);
                   
                GlobalLogWriter.get().println("Store document as '" + sOutputURL + "'");
                xStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
                GlobalLogWriter.get().println("Document stored.");
            }
            catch (com.sun.star.io.IOException e)
            {
                GlobalLogWriter.get().println("Can't store document '" + sOutputURL + "'. Message is :'" + e.getMessage() + "'");
View Full Code Here

            UnoRuntime.queryInterface(XDocumentDataSource.class, oDBSource);
            store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    xDDS.getDatabaseDocument());
            aFile = utils.getOfficeTemp ((XMultiServiceFactory) Param.getMSF ())+"TableWindow.odb";
            log.println("... filename will be "+aFile);
            store.storeAsURL(aFile,new PropertyValue[]{});
            log.println("... done");
        } catch (com.sun.star.uno.Exception e) {
            e.printStackTrace(log);
            throw new StatusException(Status.failed("Couldn't register object"));
        }
View Full Code Here

            if (aStorable != null)
            {
                log.println("store document as URL: '" + sOutputURL + "'");
                try
                {
                    aStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
                }
                catch (com.sun.star.io.IOException e)
                {
                    log.println("ERROR: Exception caught");
                    log.println("Can't write document URL: '" + sOutputURL + "'");
View Full Code Here

            if (aStorable != null)
            {
                GlobalLogWriter.get().println("store document as URL: '" + sOutputURL + "'");
                try
                {
                    aStorable.storeAsURL(sOutputURL, PropertyHelper.createPropertyValueArrayFormArrayList(aPropertyList));
                }
                catch (com.sun.star.io.IOException e)
                {
                    GlobalLogWriter.get().println("ERROR: Exception caught");
                    GlobalLogWriter.get().println("Can't write document URL: '" + sOutputURL + "'");
View Full Code Here

        storeProps[0] = new PropertyValue();
        storeProps[0].Name = "FilterName";
        storeProps[0].Value = "MS Word 97";       

        System.out.println("... store \"PrintDemo.odt\" to \"" + storeUrl + "\".");
        xStorable.storeAsURL(storeUrl, storeProps);          
    }
   
    protected void printDocComponent(XComponent xDoc) throws java.lang.Exception {
        XPrintable xPrintable = (XPrintable)UnoRuntime.queryInterface(
            XPrintable.class, xDoc);
View Full Code Here

        try
        {
            XStorable storable = (XStorable)m_document.query( XStorable.class );
            java.io.File testFile = java.io.File.createTempFile( getTestObjectName(),".ods");
            storable.storeAsURL( testFile.getAbsoluteFile().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} );
            testFile.deleteOnExit();
        }
        catch( java.lang.Throwable e )
        {
            e.printStackTrace();
View Full Code Here

        XStorable store = UnoRuntime.queryInterface( XStorable.class, m_document.getDocument() );
        String documentURL = util.utils.getOfficeTemp( m_orb ) + "document.odt";
        PropertyValue[] storeArguments = new PropertyValue[] { new PropertyValue() };
        storeArguments[0].Name = "FilterName";
        storeArguments[0].Value = "writer8";
        store.storeAsURL( documentURL, storeArguments );

        // close and re-load it
        impl_closeDoc();

        m_document = DocumentHelper.loadDocument( m_orb, documentURL );
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.