User: obo     
Date: 05/12/21 05:35:55

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

Log:
 INTEGRATION: CWS dba202a (1.15.24); FILE MERGED
 2005/11/28 13:54:58 fs 1.15.24.2: #i57097# don't default ClassId if the new 
doc is to be inserted from an existent document
 2005/11/01 09:03:15 fs 1.15.24.1: #i57097# +getDefaultDocumentTypeClassId

File Changes:

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

File [changed]: documentcontainer.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentcontainer.cxx?r1=1.15&r2=1.16
Delta lines:  +9 -3
-------------------
--- documentcontainer.cxx       23 Sep 2005 12:06:11 -0000      1.15
+++ documentcontainer.cxx       21 Dec 2005 13:35:43 -0000      1.16
@@ -203,8 +203,8 @@
 
                ODefinitionContainer_Impl* pItem = 
static_cast<ODefinitionContainer_Impl*>(m_pImpl.get());
 
-               sal_Bool bNew;
-               if ( bNew = (0 == sPersistentName.getLength()) )
+               sal_Bool bNew = ( 0 == sPersistentName.getLength() );
+               if ( bNew )
                {
                        const static ::rtl::OUString 
sBaseName(RTL_CONSTASCII_USTRINGPARAM("Obj"));
                        // 
-----------------------------------------------------------------------------
@@ -213,6 +213,7 @@
                        Reference<XNameAccess> 
xElements(getStorage(),UNO_QUERY);
                        if ( xElements.is() )
                                sPersistentName = 
::dbtools::createUniqueName(xElements,sPersistentName);
+
                        if ( xCopyFrom.is() )
                        {
                                Sequence<Any> aIni(2);
@@ -227,6 +228,11 @@
                 if ( xProp.is() && xProp->getPropertySetInfo().is() && 
xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_AS_TEMPLATE) )
                     xProp->getPropertyValue(PROPERTY_AS_TEMPLATE) >>= 
bAsTemplate;
                        }
+
+            if ( ( aClassID.getLength() == 0 ) && ( 0 == sURL.getLength() ) )
+                // default the class id, if none is given
+                // #i57097# / 2005-11-01 / [EMAIL PROTECTED]
+                aClassID = 
ODocumentDefinition::getDefaultDocumentTypeClassId();
                }
 
                ODefinitionContainer_Impl::Documents::iterator aFind = 
pItem->m_aDocumentMap.find(sName);




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

Reply via email to