diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-17 14:34:33 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-17 14:34:33 +0000 |
commit | cbbacd7033e238e1f54907c9b892ef144413eb93 (patch) | |
tree | 0297ffa8d161adccf1e3a0d948ead5942c4836d4 /sfx2/source/doc/objstor.cxx | |
parent | f1b6f1de2d7f1b2d3e992fb9ae34f4091b00c0b9 (diff) |
INTEGRATION: CWS fwkp2fix02 (1.134.62); FILE MERGED
2004/11/06 14:50:19 mav 1.134.62.5: #i36591# document will always dispose own storage
2004/11/06 14:46:47 mav 1.134.62.4: #i36591# document will always dispose own storage
2004/11/05 09:43:36 mav 1.134.62.3: #i35435# allow SaveAs for readonly documents
2004/11/04 13:06:28 mba 1.134.62.2: RESYNC: (1.134-1.135); FILE MERGED
2004/11/03 16:57:51 mba 1.134.62.1: #i36459#: temporary storage was incomplete
Diffstat (limited to 'sfx2/source/doc/objstor.cxx')
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 6d533300511f..e45d76570151 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2,9 +2,9 @@ * * $RCSfile: objstor.cxx,v $ * - * $Revision: 1.139 $ + * $Revision: 1.140 $ * - * last change: $Author: obo $ $Date: 2004-11-17 13:37:31 $ + * last change: $Author: obo $ $Date: 2004-11-17 15:34:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -578,6 +578,8 @@ sal_Bool SfxObjectShell::DoInitNew( const uno::Reference< embed::XStorage >& xSt pMedium = new SfxMedium; } + pMedium->CanDisposeStorage_Impl( sal_True ); + if ( InitNew( xStorage ) ) { // empty documents always get their macros from the user, so there is no reason to restrict access @@ -755,6 +757,8 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed ) GetpApp()->ShowStatusText( SfxResId(STR_DOC_LOADING) ); pMedium = pMed; + pMedium->CanDisposeStorage_Impl( sal_True ); + sal_Bool bOk = sal_False; const SfxFilter* pFilter = pMed->GetFilter(); SfxItemSet* pSet = pMedium->GetItemSet(); @@ -1641,9 +1645,19 @@ sal_Bool SfxObjectShell::ConnectTmpStorage_Impl( const uno::Reference< embed::XS throw uno::RuntimeException(); // TODO/LATER: may be it should be done in SwitchPersistence also - CopyStoragesOfUnknownMediaType( xStorage, xTmpStorage ); + // TODO/LATER: find faster way to copy storage; perhaps sharing with backup?! + xStorage->copyToStorage( xTmpStorage ); + //CopyStoragesOfUnknownMediaType( xStorage, xTmpStorage ); SaveCompleted( xTmpStorage ); + SfxDialogLibraryContainer* pDialogCont = pImp->pDialogLibContainer; + if( pDialogCont ) + pDialogCont->setStorage( xTmpStorage ); + + SfxScriptLibraryContainer* pBasicCont = pImp->pBasicLibContainer; + if( pBasicCont ) + pBasicCont->setStorage( xTmpStorage ); + bResult = sal_True; } catch( uno::Exception& ) @@ -1773,7 +1787,10 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium * pNewMed ) // delete Medium (and Storage!) after all notifications SfxMedium* pOld = pMedium; if ( bMedChanged ) + { pMedium = pNewMed; + pMedium->CanDisposeStorage_Impl( sal_True ); + } const SfxFilter *pFilter = pMedium ? pMedium->GetFilter() : 0; if ( pNewMed ) |