Tag: cws_ooo300_dba30z
User: fs      
Date: 2008-09-11 07:15:29+0000
Modified:
   dba/dbaccess/source/core/dataaccess/ModelImpl.cxx

Log:
 #i93737# when switching to another URL, update our m_sName if it referred to 
the old URL

File Changes:

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

File [changed]: ModelImpl.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ModelImpl.cxx?r1=1.32&r2=1.32.42.1
Delta lines:  +8 -5
-------------------
--- ModelImpl.cxx       2008-06-30 15:10:05+0000        1.32
+++ ModelImpl.cxx       2008-09-11 07:15:27+0000        1.32.42.1
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: ModelImpl.cxx,v $
- * $Revision: 1.32 $
+ * $Revision: 1.32.42.1 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -1225,13 +1225,16 @@
                 m_pDBContext->registerPrivate( _rDocumentURL, this );
         }
 
-        // if we do not have a name, yet (i.e. are not registered at the 
database context),
-        // then use the URL as name
-        if ( !m_sName.getLength() )
+        if  (   ( m_sName == m_sDocumentURL )   // our name is our old URL
+            ||  ( !m_sName.getLength() )        // we do not have a name, yet 
(i.e. are not registered at the database context)
+            )
         {
                    INetURLObject aURL( _rDocumentURL );
                    if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
+            {
                            m_sName = _rDocumentURL;
+                // TODO: our data source must broadcast the change of the Name 
property
+            }
         }
        }
 




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

Reply via email to