Package com.sun.star.frame

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


                }

                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


            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

            // save it as temp file
            XStorable xStore = (XStorable)UnoRuntime.queryInterface(
                                            XStorable.class,
                                            xDoc);
            xStore.storeAsURL(sTargetURL, lSaveProps);
           
            // Dont forget to close this file. Otherwise the temp file is locked!
            XCloseable xClose = (XCloseable)UnoRuntime.queryInterface(
                                                XCloseable.class,
                                                xDoc);
View Full Code Here

        final XPropertySet dsProperties = (XPropertySet) UnoRuntime.queryInterface(XPropertySet.class, m_databaseDocument.getDataSource());
        dsProperties.setPropertyValue("URL", "sdbc:dbase:" + path);

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

    /** drops the table with a given name
View Full Code Here

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

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

    /** drops the table with a given name
View Full Code Here

        final XPropertySet dsProperties = (XPropertySet) UnoRuntime.queryInterface(
                XPropertySet.class, dataSourceAccess.getDataSource());
        dsProperties.setPropertyValue("URL", "sdbc:embedded:hsqldb");

        final String documentURL = createTempFileURL();
        storeDoc.storeAsURL(documentURL, new PropertyValue[0]);

        // now that the document is stored, ...
        // ... its URL should be correct
        assureEquals("wrong URL after storing the document", documentURL, databaseDoc.getURL());
        // ... it should be initialized
View Full Code Here

        // XStorable.storeAsURL
        newURL = createTempFileURL();
        context = "storeAsURL";
        impl_startObservingEvents(context);
        storeDoc.storeAsURL(newURL, new PropertyValue[0]);
        assureEquals("storeAsURL is expected to change the document URL", databaseDoc.getURL(), newURL);
        impl_stopObservingEvents(m_globalEvents, new String[]
                {
                    "OnSaveAs", "OnSaveAsDone"
                }, context);
View Full Code Here

        final String newDocumentURL = URLHelper.getFileURLFromSystemPath(documentFile.getAbsoluteFile());

        // store the doc in a new location
        final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                m_databaseDocument);
        storeDoc.storeAsURL(newDocumentURL, new PropertyValue[]
                {
                });

        // connect
        m_documentUI.connect();
View Full Code Here

            UnoRuntime.queryInterface(XDocumentDataSource.class, oDBSource);
            store = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    xDDS.getDatabaseDocument());
            aFile = utils.getOfficeTemp ((XMultiServiceFactory) Param.getMSF ())+"JoinView.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);
View Full Code Here

        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

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.