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,