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