summaryrefslogtreecommitdiff
path: root/embeddedobj
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-02-01 18:04:52 +0000
committerKurt Zenker <kz@openoffice.org>2006-02-01 18:04:52 +0000
commitd526714f9ac0671841d6f38832f12a97aafdbe00 (patch)
tree5b2643f3bb684a3b86fce90c65dfe06a8566bb8f /embeddedobj
parent45eaae1413e49752911fa45338938c99022c33aa (diff)
INTEGRATION: CWS mav19 (1.21.2); FILE MERGED
2005/11/24 15:09:47 mav 1.21.2.1: #126228# improve storing of own objects inserted from file
Diffstat (limited to 'embeddedobj')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index af91f7ba1f97..d18ddda0e30e 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: persistence.cxx,v $
*
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
- * last change: $Author: obo $ $Date: 2006-01-20 09:50:17 $
+ * last change: $Author: kz $ $Date: 2006-02-01 19:04:52 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -686,7 +686,8 @@ void OCommonEmbeddedObject::SaveObject_Impl()
void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed::XStorage >& xStorage,
sal_Int32 nStorageFormat,
const ::rtl::OUString& aBaseURL,
- const ::rtl::OUString& aHierarchName )
+ const ::rtl::OUString& aHierarchName,
+ sal_Bool bAttachToTheStorage )
{
OSL_ENSURE( xStorage.is(), "No storage is provided for storing!" );
@@ -726,6 +727,8 @@ void OCommonEmbeddedObject::StoreDocToStorage_Impl( const uno::Reference< embed:
aArgs[1].Value <<= aHierarchName;
xDoc->storeToStorage( xStorage, aArgs );
+ if ( bAttachToTheStorage )
+ xDoc->switchToStorage( xStorage );
}
else
#endif
@@ -1134,7 +1137,7 @@ void SAL_CALL OCommonEmbeddedObject::storeToEntry( const uno::Reference< embed::
aGuard.clear();
// TODO/LATER: support hierarchical name for embedded objects in embedded objects
- StoreDocToStorage_Impl( xSubStorage, nTargetStorageFormat, GetBaseURLFrom_Impl( lArguments, lObjArgs ), sEntName );
+ StoreDocToStorage_Impl( xSubStorage, nTargetStorageFormat, GetBaseURLFrom_Impl( lArguments, lObjArgs ), sEntName, sal_False );
aGuard.reset();
if ( bSwitchBackToLoaded )
@@ -1267,7 +1270,7 @@ void SAL_CALL OCommonEmbeddedObject::storeAsEntry( const uno::Reference< embed::
{
aGuard.clear();
// TODO/LATER: support hierarchical name for embedded objects in embedded objects
- StoreDocToStorage_Impl( xSubStorage, nTargetStorageFormat, GetBaseURLFrom_Impl( lArguments, lObjArgs ), sEntName );
+ StoreDocToStorage_Impl( xSubStorage, nTargetStorageFormat, GetBaseURLFrom_Impl( lArguments, lObjArgs ), sEntName, sal_False );
aGuard.reset();
if ( bSwitchBackToLoaded )
@@ -1490,7 +1493,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn()
}
aGuard.clear();
- StoreDocToStorage_Impl( m_xObjectStorage, nStorageFormat, GetBaseURL_Impl(), m_aEntryName );
+ StoreDocToStorage_Impl( m_xObjectStorage, nStorageFormat, GetBaseURL_Impl(), m_aEntryName, sal_True );
aGuard.reset();
}