Examples of storeAsURL()


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

            // 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

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

            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

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()

            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()

   * Sauvegarde le document
   */
  public void save() {
    try {
      XStorable xStorable = unoCast(XStorable.class, component);
      xStorable.storeAsURL(xStorable.getLocation(), null);
      // Attention : ne pas utiliser la methode store, elle verole le
      // fichier
    } catch (Exception e) {
      throw new ImpressException(e);
    }
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);
View Full Code Here

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

        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

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

        // 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

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()

        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
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.