Kaydet (Commit) 96aca981 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Minor clean-up

Change-Id: I30a06f693704a8471af39e5232a7abef1056be32
üst cfbd74c3
...@@ -255,7 +255,6 @@ public: ...@@ -255,7 +255,6 @@ public:
virtual SfxObjectFactory& GetFactory() const=0; virtual SfxObjectFactory& GetFactory() const=0;
SfxMedium * GetMedium() const { return pMedium; } SfxMedium * GetMedium() const { return pMedium; }
void ForgetMedium() { pMedium = 0; }
::com::sun::star::uno::Reference< ::com::sun::star::uno::Reference<
::com::sun::star::document::XDocumentProperties > getDocProperties(); ::com::sun::star::document::XDocumentProperties > getDocProperties();
void UpdateDocInfoForSave( ); void UpdateDocInfoForSave( );
......
...@@ -1351,10 +1351,10 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() ...@@ -1351,10 +1351,10 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
// setting the new storage the medium will be based on // setting the new storage the medium will be based on
pTmpMedium->SetStorage_Impl( xTmpStor ); pTmpMedium->SetStorage_Impl( xTmpStor );
ForgetMedium(); pMedium = 0;
if( !DoSaveCompleted( pTmpMedium ) ) bool ok = DoSaveCompleted( pTmpMedium );
SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) ); assert(pMedium != 0);
else if( ok )
{ {
SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False ); SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, sal_False );
sal_Bool bSalvage = pSalvageItem ? sal_True : sal_False; sal_Bool bSalvage = pSalvageItem ? sal_True : sal_False;
...@@ -1368,6 +1368,10 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad() ...@@ -1368,6 +1368,10 @@ void SfxObjectShell::TemplateDisconnectionAfterLoad()
// the medium should not dispose the storage, DoSaveCompleted() has let it to do so // the medium should not dispose the storage, DoSaveCompleted() has let it to do so
pTmpMedium->CanDisposeStorage_Impl( sal_False ); pTmpMedium->CanDisposeStorage_Impl( sal_False );
} }
else
{
SetError( ERRCODE_IO_GENERAL, OUString( OSL_LOG_PREFIX ) );
}
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment