Tag: cws_src680_qiq
User: fs      
Date: 06/05/10 07:23:19

Modified:
 /dba/dbaccess/source/core/api/
  querycontainer.cxx

Log:
 #i51143# when creating a new object, insert it into the command definition 
container (nearly) *last*

File Changes:

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

File [changed]: querycontainer.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/querycontainer.cxx?r1=1.23&r2=1.23.4.1
Delta lines:  +10 -21
---------------------
--- querycontainer.cxx  4 May 2006 08:36:19 -0000       1.23
+++ querycontainer.cxx  10 May 2006 14:23:16 -0000      1.23.4.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: querycontainer.cxx,v $
  *
- *  $Revision: 1.23 $
+ *  $Revision: 1.23.4.1 $
  *
- *  last change: $Author: rt $ $Date: 2006/05/04 08:36:19 $
+ *  last change: $Author: fs $ $Date: 2006/05/10 14:23:16 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -201,7 +201,12 @@
        }
 
        ::comphelper::copyProperties(_rxDesc, xCommandDefinitionPart);
-       // and insert it into the CommDef container
+    // TODO : the columns part of the descriptor has to be copied
+
+    // create a wrapper for the object (*before* inserting into our command 
definition container)
+       xNewObject = implCreateWrapper(Reference< 
XContent>(xCommandDefinitionPart,UNO_QUERY));
+
+       // insert the basic object into the definition container
        _rxDesc->getPropertyValue(PROPERTY_NAME) >>= sNewObjectName;
        {
                m_eDoingCurrently =     INSERTING;
@@ -209,22 +214,6 @@
                m_xCommandDefinitions->insertByName(sNewObjectName, 
makeAny(xCommandDefinitionPart));
        }
 
-#if DBG_UTIL
-       // check if the object was really inserted
-       try
-       {
-               Reference< XPropertySet > 
xNewEl(m_xCommandDefinitions->getByName(sNewObjectName),UNO_QUERY);
-               DBG_ASSERT(xNewEl.get() == xCommandDefinitionPart.get(), 
"OQueryContainer::appendByDescriptor : the CommandDefinition container worked 
as it had a descriptor !");
-                       // normally should not have changed after inserting
-       }
-       catch(Exception&)
-       {
-               DBG_ERROR("OQueryContainer::appendByDescriptor : could not find 
the just inserted CommandDefinition !");
-       }
-#endif
-       // TODO : the columns part of the descriptor has to be copied
-       xNewObject = implCreateWrapper(Reference< 
XContent>(xCommandDefinitionPart,UNO_QUERY));
-
        implAppend(sNewObjectName, xNewObject);
 
        notifyByName(aGuard,sNewObjectName,xNewObject,NULL,E_INSERTED);




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

Reply via email to