summaryrefslogtreecommitdiff
path: root/embeddedobj/source/commonembedding
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2006-10-06 09:37:30 +0000
committerKurt Zenker <kz@openoffice.org>2006-10-06 09:37:30 +0000
commit4662727432d3048249c6ddfa1fe513e6a89782eb (patch)
tree6cbc8834d5ff3d7c6e3fd24a14fff068e418284d /embeddedobj/source/commonembedding
parent2aebc8ddae11145098760387324799ef1011a8b7 (diff)
INTEGRATION: CWS fwk46 (1.24.10); FILE MERGED
2006/08/17 09:46:06 mav 1.24.10.1: #i65568# do not switch the persistance of the linked document
Diffstat (limited to 'embeddedobj/source/commonembedding')
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx14
1 files changed, 9 insertions, 5 deletions
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index d5db096e81..fcede746b2 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: persistence.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 00:41:06 $
+ * last change: $Author: kz $ $Date: 2006-10-06 10:37:30 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -276,9 +276,13 @@ void OCommonEmbeddedObject::SwitchOwnPersistence( const uno::Reference< embed::X
m_aEntryName = aNewName;
#ifdef USE_STORAGEBASED_DOCUMENT
- uno::Reference< document::XStorageBasedDocument > xDoc( m_pDocHolder->GetComponent(), uno::UNO_QUERY );
- if ( xDoc.is() )
- xDoc->switchToStorage( m_xObjectStorage );
+ // the linked document should not be switched
+ if ( !m_bIsLink )
+ {
+ uno::Reference< document::XStorageBasedDocument > xDoc( m_pDocHolder->GetComponent(), uno::UNO_QUERY );
+ if ( xDoc.is() )
+ xDoc->switchToStorage( m_xObjectStorage );
+ }
#endif
try {