Package com.sun.star.frame

Examples of com.sun.star.frame.XSynchronousFrameLoader


      if ((type == null) || (type.length() == 0))
        type  = "writer_Text";
                        System.out.println(type);
      // Get document frame loader factory.
      Object object  = mFrameLoaderFactory.createInstance(type);
      XSynchronousFrameLoader  frameLoader;
      frameLoader  = (XSynchronousFrameLoader)UnoRuntime.queryInterface(
        XSynchronousFrameLoader.class, object);
      // Create the document descriptor.
      PropertyValue[]  desc  = new PropertyValue[2];
      desc[0= new PropertyValue(
        "FileName", 0, url, PropertyState.DIRECT_VALUE);
      desc[1= new PropertyValue(
        "TypeName", 0, type, PropertyState.DIRECT_VALUE);
      // Avoid Dialog 'Document changed' while reloading
      try {
        setModified(false);
      } catch (java.lang.IllegalStateException exp) {
      }
      // Load the document.
      if (frameLoader.load(desc, mFrame) == false) {
        throw new java.io.IOException(
          "Can not load a document: \"" + url + "\"");
      }
      mDocumentURL  = url;
      // Get document's XModifiable interface if any.
View Full Code Here

TOP

Related Classes of com.sun.star.frame.XSynchronousFrameLoader

Copyright © 2018 www.massapicom. 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.