User: vg      
Date: 05/02/17 03:04:06

Modified:
 /dba/dbaccess/source/core/dataaccess/
  documentdefinition.cxx

Log:
 INTEGRATION: CWS dba23 (1.18.6); FILE MERGED
 2005/02/03 08:07:18 oj 1.18.6.2: RESYNC: (1.18-1.19); FILE MERGED
 2005/01/19 08:48:50 fs 1.18.6.1: #i40358# when loading an embedded document, 
set the data source as parent

File Changes:

Directory: /dba/dbaccess/source/core/dataaccess/
================================================

File [changed]: documentdefinition.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentdefinition.cxx?r1=1.19&r2=1.20
Delta lines:  +21 -2
--------------------
--- documentdefinition.cxx      21 Jan 2005 17:04:28 -0000      1.19
+++ documentdefinition.cxx      17 Feb 2005 11:04:03 -0000      1.20
@@ -1070,7 +1070,26 @@
                        xCommon->reload(aArgs,aEmbeddedObjectDescriptor);
                m_xEmbeddedObject->changeState(EmbedStates::RUNNING);
        }
+
        Reference<XModel> xModel(getComponent(),UNO_QUERY);
+       // set the OfficeDatabaseDocument instance as parent of the embedded 
document
+    // #i40358# / 2005-01-19 / [EMAIL PROTECTED]
+    Reference< XChild > xDepdendDocAsChild( xModel, UNO_QUERY );
+    if ( xDepdendDocAsChild.is() )
+    {
+        try
+        {
+            if ( !xDepdendDocAsChild->getParent().is() )
+            {   // first encounter
+                xDepdendDocAsChild->setParent( getDataSource( 
m_xParentContainer ) );
+            }
+        }
+        catch( const Exception& )
+        {
+            OSL_ENSURE( sal_False, "ODocumentDefinition::loadEmbeddedObject: 
caught an exception while setting the parent of the embedded object!" );
+        }
+    }
+
        if ( xModel.is() )
        {
                Sequence<PropertyValue> aArgs = xModel->getArgs();




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to