Package com.sun.star.util

Examples of com.sun.star.util.XModifiable


    *  object </li>
    * </ul>
    */
    public void _suspend() {
        requiredMethod("restoreViewData()");
        XModifiable modify = (XModifiable) tEnv.getObjRelation("Modifiable");
        if (modify != null) {
            try {
                modify.setModified(false);
            } catch (com.sun.star.beans.PropertyVetoException pve) {
                log.println("PropertyVetoException, couldn't change Modify flag");
            }
        }
        tRes.tested( "suspend()", oObj.suspend(true) );
View Full Code Here


                {
                    "OnSaveAs", "OnSaveAsDone"
                }, context);

        // XModifiable.setModified
        final XModifiable modifyDoc = (XModifiable) UnoRuntime.queryInterface(XModifiable.class,
                databaseDoc);
        context = "setModified";
        impl_startObservingEvents(context);
        modifyDoc.setModified(true);
        assureEquals("setModified didn't work", modifyDoc.isModified(), true);
        impl_stopObservingEvents(m_globalEvents, new String[]
                {
                    "OnModifyChanged"
                }, 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

   *
   * @author Andreas Br�ker
   */
  public void setModified(boolean modified) throws DocumentException {
    try {
      XModifiable xModifiable = (XModifiable) UnoRuntime.queryInterface(XModifiable.class,
          xComponent);
      xModifiable.setModified(modified);
    }
    catch (Throwable throwable) {
      throw new DocumentException(throwable);
    }
  }
View Full Code Here

   *
   * @author Andreas Br�ker
   */
  public void setModified(boolean modified) throws DocumentException {
    try {
      XModifiable xModifiable = (XModifiable) UnoRuntime.queryInterface(
          XModifiable.class, xComponent);
      xModifiable.setModified(modified);
    } catch (Throwable throwable) {
      throw new DocumentException(throwable);
    }
  }
View Full Code Here

        XDrawPage new_page = the_pages.insertNewByIndex(1);
        tEnv.addObjRelation("DrawPage", new_page);

        log.println("Implementation Name: "+utils.getImplName(oObj));

        XModifiable modify = (XModifiable)
            UnoRuntime.queryInterface(XModifiable.class,xDrawDoc);

        tEnv.addObjRelation("Modifiable",modify);
       
        tEnv.addObjRelation("XComponent.DisposeThis", xDrawDoc);
View Full Code Here

        XDrawPage new_page = the_pages.insertNewByIndex(1);
        tEnv.addObjRelation("DrawPage", new_page);

        log.println("Implementation Name: "+utils.getImplName(oObj));

        XModifiable modify = (XModifiable)
            UnoRuntime.queryInterface(XModifiable.class,xDrawDoc);

        tEnv.addObjRelation("Modifiable",modify);
       
        tEnv.addObjRelation("XComponent.DisposeThis", xDrawDoc);
View Full Code Here

        XDrawPage new_page = the_pages.insertNewByIndex(1);
        tEnv.addObjRelation("DrawPage", new_page);

        log.println("Implementation Name: "+utils.getImplName(oObj));

        XModifiable modify = (XModifiable)
            UnoRuntime.queryInterface(XModifiable.class,xDrawDoc);

        tEnv.addObjRelation("Modifiable",modify);
       
        tEnv.addObjRelation("XComponent.DisposeThis", xDrawDoc);
View Full Code Here

        String kd = System.getProperty("KeepDocument");
        if (kd != null ) {
            System.out.println("The property 'KeepDocument' is set and so the document won't be disposed");
            return;
        }
        XModifiable modified = (XModifiable) UnoRuntime.queryInterface(
                                       XModifiable.class, DocumentToClose);
        XCloseable closer = (XCloseable) UnoRuntime.queryInterface(
                                    XCloseable.class, DocumentToClose);

        try {
            if (modified != null){
                modified.setModified(false);
            }
            closer.close(true);
        } catch (com.sun.star.util.CloseVetoException e) {
            System.out.println("Couldn't close document");
        } catch (com.sun.star.lang.DisposedException e) {
View Full Code Here

        XDrawPage new_page = the_pages.insertNewByIndex(1);
        tEnv.addObjRelation("DrawPage", new_page);

        log.println("Implementation Name: "+utils.getImplName(oObj));

        XModifiable modify = (XModifiable)
            UnoRuntime.queryInterface(XModifiable.class,xDrawDoc);

        tEnv.addObjRelation("Modifiable",modify);
       
        tEnv.addObjRelation("XComponent.DisposeThis", xDrawDoc);
View Full Code Here

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

        // XModifiable.setModified
        XModifiable modifyDoc = (XModifiable) UnoRuntime.queryInterface( XModifiable.class,
            databaseDoc );
        context = "setModified";
        impl_startObservingEvents( context );
        modifyDoc.setModified( true );
        assureEquals( "setModified didn't work", modifyDoc.isModified(), true );
        impl_stopObservingEvents( m_globalEvents, new String[] { "OnModifyChanged" }, 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 );

        // XComponentLoader.loadComponentFromURL
        newURL = impl_copyTempFile( databaseDoc.getURL() );
        XComponentLoader loader = (XComponentLoader)UnoRuntime.queryInterface( XComponentLoader.class,
View Full Code Here

TOP

Related Classes of com.sun.star.util.XModifiable

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.