CVS wrapper -- version: 1.104 Index: docfile.cxx =================================================================== RCS file: /cvs/framework/sfx2/source/doc/docfile.cxx,v retrieving revision 1.198.22.4 diff -c -r1.198.22.4 docfile.cxx *** docfile.cxx 10 Jun 2008 15:04:48 -0000 1.198.22.4 --- docfile.cxx 1 Jul 2008 14:57:03 -0000 *************** *** 832,840 **** void SfxMedium::StorageBackup_Impl() { ::ucbhelper::Content aOriginalContent; ! Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; if ( BasedOnOriginalFile_Impl() && !pImp->m_aBackupURL.getLength() ! && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv, aOriginalContent ) ) { DoInternalBackup_Impl( aOriginalContent ); if( !pImp->m_aBackupURL.getLength() ) --- 832,846 ---- void SfxMedium::StorageBackup_Impl() { ::ucbhelper::Content aOriginalContent; ! ! Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv; ! Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler(); ! if ( xInteractionHandler.is() ) ! xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), ! Reference< ::com::sun::star::ucb::XProgressHandler >() ); ! if ( BasedOnOriginalFile_Impl() && !pImp->m_aBackupURL.getLength() ! && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), xEnv, aOriginalContent ) ) { DoInternalBackup_Impl( aOriginalContent ); if( !pImp->m_aBackupURL.getLength() ) *************** *** 1536,1544 **** sal_Bool SfxMedium::StorageCommit_Impl() { sal_Bool bResult = sal_False; ! Reference< ::com::sun::star::ucb::XCommandEnvironment > xDummyEnv; ::ucbhelper::Content aOriginalContent; if ( pImp->xStorage.is() ) { StorageBackup_Impl(); --- 1542,1555 ---- sal_Bool SfxMedium::StorageCommit_Impl() { sal_Bool bResult = sal_False; ! Reference< ::com::sun::star::ucb::XCommandEnvironment > xEnv; ::ucbhelper::Content aOriginalContent; + Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler = GetInteractionHandler(); + if ( xInteractionHandler.is() ) + xEnv = new ::ucbhelper::CommandEnvironment( new ::comphelper::StillReadWriteInteraction( xInteractionHandler ), + Reference< ::com::sun::star::ucb::XProgressHandler >() ); + if ( pImp->xStorage.is() ) { StorageBackup_Impl(); *************** *** 1561,1573 **** OSL_ENSURE( pImp->m_aBackupURL.getLength(), "No backup on storage commit!\n" ); if ( pImp->m_aBackupURL.getLength() && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), ! xDummyEnv, aOriginalContent ) ) { // use backup to restore the file // the storage has already disconnected from original location CloseAndReleaseStreams_Impl(); ! if ( !UseBackupToRestore_Impl( aOriginalContent, xDummyEnv ) ) { // connect the medium to the temporary file of the storage pImp->aContent = ::ucbhelper::Content(); --- 1572,1584 ---- OSL_ENSURE( pImp->m_aBackupURL.getLength(), "No backup on storage commit!\n" ); if ( pImp->m_aBackupURL.getLength() && ::ucbhelper::Content::create( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ), ! xEnv, aOriginalContent ) ) { // use backup to restore the file // the storage has already disconnected from original location CloseAndReleaseStreams_Impl(); ! if ( !UseBackupToRestore_Impl( aOriginalContent, xEnv ) ) { // connect the medium to the temporary file of the storage pImp->aContent = ::ucbhelper::Content(); *************** *** 2121,2127 **** DoInternalBackup_Impl( aOriginalContent, aPrefix, aExtension, aBakDir ); ! if ( !pImp->m_aBackupURL.getLength() ) { // the copiing to the backup catalog failed ( for example because // of using an encrypted partition as target catalog ) --- 2132,2138 ---- DoInternalBackup_Impl( aOriginalContent, aPrefix, aExtension, aBakDir ); ! if ( !pImp->m_aBackupURL.getLength() && ::utl::LocalFileHelper::IsLocalFile( GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ) ) { // the copiing to the backup catalog failed ( for example because // of using an encrypted partition as target catalog )