summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2007-01-23 06:39:40 +0000
committerOliver Bolte <obo@openoffice.org>2007-01-23 06:39:40 +0000
commit10a1f583d3863dcb5bbd1e709a75c45b8d388042 (patch)
tree27de262ee942ae5288a74dea21ff7a6e8892a497
parent52d575008408c315d721b6429a9aa59ca8d088d2 (diff)
INTEGRATION: CWS fwk59 (1.187.40); FILE MERGED
2006/12/19 14:26:56 mav 1.187.40.1: #i676658# handle the special cases as well
-rw-r--r--sfx2/source/doc/objstor.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index fe9276488565..01fa354bedc9 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: objstor.cxx,v $
*
- * $Revision: 1.187 $
+ * $Revision: 1.188 $
*
- * last change: $Author: kz $ $Date: 2006-11-09 14:29:32 $
+ * last change: $Author: obo $ $Date: 2007-01-23 07:39:40 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1978,9 +1978,13 @@ sal_Bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
if ( !pFilter || IsPackageStorageFormat_Impl( *pMedium ) )
{
uno::Reference < embed::XStorage > xOld = GetStorage();
+
+ // when the package based medium is broken and has no storage or if the storage
+ // is the same as the document storage the current document storage should be preserved
xStorage = pMedium->GetStorage();
bOk = SaveCompleted( xStorage );
- if ( bOk && (!pOld || !pOld->HasStorage_Impl() || xOld != pOld->GetStorage() ) )
+ if ( bOk && xStorage.is() && xOld != xStorage
+ && (!pOld || !pOld->HasStorage_Impl() || xOld != pOld->GetStorage() ) )
{
// old own storage was not controlled by old Medium -> dispose it
try {