Examples of storeAsURL()


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

            } else
                oStoreProperties = new PropertyValue[0];
            if (bStoreToUrl == true)
                xStoreable.storeToURL(StorePath, oStoreProperties);
            else
                xStoreable.storeAsURL(StorePath, oStoreProperties);
            return true;
        } catch (Exception exception) {
           
            exception.printStackTrace(System.out);
            //TODO make sure that the peer of the dialog is used when available
View Full Code Here

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

        m_dataSource = new DataSource( m_orb, m_databaseDocument.getDataSource() );
        XPropertySet dsProperties = (XPropertySet)UnoRuntime.queryInterface( XPropertySet.class, m_databaseDocument.getDataSource() );
        dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb");

        XStorable storable = (XStorable)UnoRuntime.queryInterface( XStorable.class, m_databaseDocument );
        storable.storeAsURL(m_databaseDocumentFile,new PropertyValue[]{});
    }

    /** returns a connection to the database
     *
     * Multiple calls to this method return the same connection. The HsqlDatabase object keeps
View Full Code Here

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

            } 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

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

            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

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

        XDocumentDataSource xDDS = (XDocumentDataSource)
        UnoRuntime.queryInterface(XDocumentDataSource.class, dataSource);
        XStorable store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                xDDS.getDatabaseDocument());
        String aFile = utils.getOfficeTemp(xMSF) + name + ".odb";
        store.storeAsURL(aFile, new PropertyValue[] {  });

        registerDB(name, dataSource) ;
    }

    /**
 
View Full Code Here

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

        PropertyValue pvFilterName = new PropertyValue("FilterName", -1, exportFilter, com.sun.star.beans.PropertyState.getDefault());
        PropertyValue pvOverwrite = new PropertyValue("Overwrite", -1, new Boolean(true), com.sun.star.beans.PropertyState.getDefault());

        try
        {
            xStorable.storeAsURL(resultURL, new PropertyValue[]{pvFilterName, pvOverwrite});
        }
        catch (com.sun.star.io.IOException e)
        {
            // wrap IOException
            throw new ConvWatchCancelException("Wrap IOException caught, " + e.getMessage());
View Full Code Here

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

        String storepath = FileAccess.getOfficePath(xMSF, "Temp", xSimpleFileAccess) + "/" + _storename;
        XStorable xStoreable = (XStorable) UnoRuntime.queryInterface(XStorable.class, _xcomponent);
        PropertyValue[] oStoreProperties = new PropertyValue[1];
        oStoreProperties[0] = Properties.createProperty("FilterName", "writer8");
        storepath += ".odt";
        xStoreable.storeAsURL(storepath, oStoreProperties);
        return true;
    } catch (Exception e) {
        e.printStackTrace(System.out);
        return false;
    }}
View Full Code Here

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

            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

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

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

        }

        try
        {
            XStorable storable = (XStorable)m_document.query( XStorable.class );
            storable.storeAsURL( java.io.File.createTempFile( getTestObjectName(),".oxs").getAbsoluteFile().toURL().toString(), new com.sun.star.beans.PropertyValue[]{} );
        }
        catch( java.lang.Throwable e )
        {
            e.printStackTrace();
        }
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.