Tag: cws_src680_dba202d
User: fs      
Date: 06/01/24 02:00:42

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

Log:
 RESYNC: (1.15-1.16); FILE MERGED

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.50.1&r2=1.15.50.2
Delta lines:  +12 -6
--------------------
--- documentcontainer.cxx       13 Dec 2005 09:14:26 -0000      1.15.50.1
+++ documentcontainer.cxx       24 Jan 2006 10:00:38 -0000      1.15.50.2
@@ -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