Package com.sun.star.frame

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


        // OK, here we will have small sample of wrong behavior, this means exception driven control flow... but it's easier ;p
        boolean result = true;
        XStorable storable = (XStorable) UnoRuntime.queryInterface(
                XStorable.class, m_xFrame.getController().getModel()) ;       
        try {
            storable.store();
        } catch (IOException ioe) {
            result = false;
        }
        return result;
    }
View Full Code Here


        // store the document, and close it
        final String documentURL = FileHelper.getOOoCompatibleFileURL(databaseDoc.getURL());
        final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                databaseDoc);
        storeDoc.store();
        impl_closeDocument(databaseDoc);

        // ensure the macro security configuration is "ask the user for document macro execution"
        final int oldSecurityLevel = impl_setMacroSecurityLevel(1);
View Full Code Here

        // XStorable.store
        final String oldURL = databaseDoc.getURL();
        context = "store";
        impl_startObservingEvents(context);
        storeDoc.store();
        assureEquals("store is not expected to change the document URL", databaseDoc.getURL(), oldURL);
        impl_stopObservingEvents(m_globalEvents, new String[]
                {
                    "OnSave", "OnSaveDone"
                }, context);
View Full Code Here

                }, context);

        // XStorable.store, with implicit reset of the "Modified" flag
        context = "store (2)";
        impl_startObservingEvents(context);
        storeDoc.store();
        assureEquals("'store' should implicitly reset the modified flag", modifyDoc.isModified(), false);
        impl_stopObservingEvents(m_globalEvents, new String[]
                {
                    "OnSave", "OnSaveDone", "OnModifyChanged"
                }, context);
View Full Code Here

        {
            final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    databaseDocument);
            if (storeDoc != null)
            {
                storeDoc.store();
            }
        }
        catch (com.sun.star.io.IOException iOException)
        {
        }
View Full Code Here

    {
        if (m_databaseDocument != null)
        {
            final XStorable storeDoc = (XStorable) UnoRuntime.queryInterface(XStorable.class,
                    m_databaseDocument);
            storeDoc.store();
        }
    }

    /** closes the database document
     *
 
View Full Code Here

    {
        if ( m_databaseDocument != null )
        {
            XStorable storeDoc = (XStorable)UnoRuntime.queryInterface( XStorable.class,
                m_databaseDocument );
            storeDoc.store();
        }
    }

    /** closes the database document
     *
 
View Full Code Here

   * @throws IOException
   */
  public boolean save () throws IOException
  {
    XStorable xStorable = (XStorable)(UnoRuntime.queryInterface (XStorable.class, myDocument));
    xStorable.store ();
    return true;
  }

  /**
   * Save the document.
View Full Code Here

//    else if (mDocumentURL.startsWith("private:") == true)
//      throw new java.io.IOException("The document URL has not been defined.");
    XStorable  storable  = (XStorable)UnoRuntime.queryInterface(
      XStorable.class, mFrame.getController().getModel());
    try {
      storable.store();
    } catch (com.sun.star.io.IOException exp) {
      throw new java.io.IOException(exp.getMessage());
    }
  }
View Full Code Here

                                                XNameContainer.class,
                                                defContainer);

        try {
            queryContainer.insertByName("Query1", newQuery);
            store.store();
            connection.close ();
        } catch (com.sun.star.lang.WrappedTargetException e) {
            e.printStackTrace(log);
            throw new StatusException(Status.failed("Couldn't insert query"));
        } catch (com.sun.star.container.ElementExistException e) {
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.