diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 5 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 12 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index a6f445ae9792..fb292278b131 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -897,6 +897,11 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) if ( QueryBox( NULL, SfxResId( RID_QUERY_CANCELCHECKOUT ) ).Execute( ) == RET_YES ) { CancelCheckOut( ); + + // Reload the document as we may still have local changes + SfxViewFrame *pFrame = GetFrame(); + if ( pFrame ) + pFrame->GetDispatcher()->Execute(SID_RELOAD); } break; } diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 44f9f92f991d..70e9c3d462ac 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -2519,7 +2519,8 @@ void SAL_CALL SfxBaseModel::checkOut( ) throw ( RuntimeException ) OUString sURL; aResult >>= sURL; - m_pData->m_pObjectShell->GetMedium( )->SwitchDocumentToFile( sURL ); + m_pData->m_pObjectShell->GetMedium( )->SetName( sURL ); + m_pData->m_pObjectShell->GetMedium( )->GetMedium_Impl( ); m_pData->m_xDocumentProperties->setTitle( getTitle( ) ); Sequence< beans::PropertyValue > aSequence ; TransformItems( SID_OPENDOC, *pMedium->GetItemSet(), aSequence ); @@ -2550,14 +2551,7 @@ void SAL_CALL SfxBaseModel::cancelCheckOut( ) throw ( RuntimeException ) OUString sURL; aResult >>= sURL; - m_pData->m_pObjectShell->GetMedium( )->SwitchDocumentToFile( sURL ); - m_pData->m_xDocumentProperties->setTitle( getTitle( ) ); - Sequence< beans::PropertyValue > aSequence ; - TransformItems( SID_OPENDOC, *pMedium->GetItemSet(), aSequence ); - attachResource( sURL, aSequence ); - - // Reload the CMIS properties - loadCmisProperties( ); + m_pData->m_pObjectShell->GetMedium( )->SetName( sURL ); } catch ( const Exception & e ) { |