Package com.sun.star.frame

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


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

            try{
            if ( stor.isStreamElement("db.script.new") )
                stor.removeElement("db.script.new");
            } catch(Exception e){}
            XStorable mod = (XStorable)UnoRuntime.queryInterface(XStorable.class,ds);
            mod.store();
            XComponent xComp = (XComponent)UnoRuntime.queryInterface(XComponent.class,stor);
            if ( xComp != null )
                xComp.dispose();
        } catch(Exception e){}
View Full Code Here

                System.out.println("Total Test Time: " + sw.elapsedTime());
            } catch(Exception e){}

            try{
                XStorable mod2 = (XStorable)UnoRuntime.queryInterface(XStorable.class,ds);
                mod2.store();
            } catch(Exception e){}
        }catch(Exception e){}
    }
    public void test2(){
        mThreadTimeOut = 10000000;
View Full Code Here

        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"));
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

        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

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

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

        // store the document, and close it
        String documentURL = databaseDoc.getURL();
        documentURL = impl_correctFileURL( documentURL );
        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"
        int oldSecurityLevel = impl_setMacroSecurityLevel( 1 );
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.