Package com.sun.star.frame

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


        log.println("Storing test document...");

        XStorable xStor = (XStorable) UnoRuntime.queryInterface(
                    XStorable.class, xComp);

        xStor.storeToURL(file, new PropertyValue[0]);

        log.println("...done");
    }

    public XComponent doLoad(String file) throws Exception
View Full Code Here


            aStoreProperties[1].Name = "FilterName";
            aStoreProperties[1].Value = sFilter;
            XStorable xStorable = (XStorable)UnoRuntime.queryInterface(
                XStorable.class,
                m_xDoc);
            xStorable.storeToURL(sFileUrl, aStoreProperties);
            return util.WriterTools.loadTextDoc(m_xMsf, sFileUrl);
        } finally {
            if(util.utils.fileExists(m_xMsf, sFileUrl))
                util.utils.deleteFile(m_xMsf, sFileUrl);
        }
View Full Code Here

                }, context);

        // XStorable.storeToURL
        context = "storeToURL";
        impl_startObservingEvents(context);
        storeDoc.storeToURL(createTempFileURL(), new PropertyValue[0]);
        assureEquals("storetoURL is not expected to change the document URL", databaseDoc.getURL(), oldURL);
        impl_stopObservingEvents(m_globalEvents, new String[]
                {
                    "OnSaveTo", "OnSaveToDone"
                }, context);
View Full Code Here

    File tmpFile = File.createTempFile("officebean", "tmp");

    try {
      String tmpFileName = "file:///" + tmpFile.getAbsolutePath();
      xStorable.storeToURL(tmpFileName, new PropertyValue[0]);

      byte[] buffer = new byte[1024];
      InputStream in = new FileInputStream(tmpFile);

      int len = 0;
View Full Code Here

        try {
            XStorable store =
                (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    xTextDoc);
            store.storeToURL(tempdir + "DocInfo.oot",
                new PropertyValue[] {});
            DesktopTools.closeDoc(xTextDoc);
        } catch (Exception e) {
            assure("Couldn't store document", false);
        }
View Full Code Here

    }
    XStorable xStorable = (XStorable) UnoRuntime.queryInterface(
        XStorable.class, document.getXComponent());
    try {
      if (URL.length() != 0) {
        xStorable.storeToURL(URL, properties);
      } else {
        xStorable.store();
      }
    } catch (com.sun.star.io.IOException ioException) {
      throw new IOException(ioException.getMessage());
View Full Code Here

    newProperties[properties.length].Value = xOutputStream;

    XStorable xStorable = (XStorable) UnoRuntime.queryInterface(
        XStorable.class, document.getXComponent());
    try {
      xStorable.storeToURL("private:stream", newProperties);
    } catch (com.sun.star.io.IOException ioException) {
      throw new IOException(ioException.getMessage());
    }
  }
  // ----------------------------------------------------------------------------
View Full Code Here

        .getFilterDefinition(document);

    XStorable xStorable = (XStorable) UnoRuntime.queryInterface(
        XStorable.class, document.getXComponent());
    try {
      xStorable.storeToURL(URL, newProperties);
    } catch (com.sun.star.io.IOException ioException) {
      throw new IOException(ioException.getMessage());
    }
  }
View Full Code Here

        .getFilterDefinition(document);

    XStorable xStorable = (XStorable) UnoRuntime.queryInterface(
        XStorable.class, document.getXComponent());
    try {
      xStorable.storeToURL("private:stream", newProperties);
    } catch (com.sun.star.io.IOException ioException) {
      throw new IOException(ioException.getMessage());
    }
  }
  // ----------------------------------------------------------------------------
View Full Code Here

    newProperties[properties.length].Name = "FilterName";
    newProperties[properties.length].Value = filter.getFilterDefinition(document);
   
    XStorable xStorable = (XStorable)UnoRuntime.queryInterface(XStorable.class, document.getXComponent());
    try {
      xStorable.storeToURL(URL, newProperties);
    }
    catch(com.sun.star.io.IOException ioException) {
      throw new IOException(ioException.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.