User: vg      
Date: 05/03/23 01:45:10

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

Log:
 INTEGRATION: CWS dba26 (1.3.60); FILE MERGED
 2005/03/11 13:30:36 fs 1.3.60.1: #i44786# setPropertyValues('Title'): re-route 
to rename implementation

File Changes:

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

File [changed]: ContentHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ContentHelper.cxx?r1=1.3&r2=1.4
Delta lines:  +16 -5
--------------------
--- ContentHelper.cxx   16 Nov 2004 09:27:28 -0000      1.3
+++ ContentHelper.cxx   23 Mar 2005 09:45:08 -0000      1.4
@@ -441,13 +441,21 @@
                                {
                                        aEvent.PropertyName = rValue.Name;
                     aEvent.OldValue     = makeAny( m_pImpl->m_aProps.aTitle );
-                    aEvent.NewValue     = makeAny( aNewValue );
 
-                                       aChanges.getArray()[ nChanged ] = 
aEvent;
+                    try
+                    {
+                        rename( aNewValue );
+                        OSL_ENSURE( m_pImpl->m_aProps.aTitle == aNewValue, 
"OContentHelper::setPropertyValues('Title'): rename did not work!" );
 
-                                       m_pImpl->m_aProps.aTitle = aNewValue;
+                        aEvent.NewValue     = makeAny( aNewValue );
+                                           aChanges.getArray()[ nChanged ] = 
aEvent;
                                        nChanged++;
                                }
+                    catch( const Exception& )
+                    {
+                       OSL_ENSURE( sal_False, 
"OContentHelper::setPropertyValues('Title'): caught an exception while 
renaming!" );
+                    }
+                               }
                 else
                 {
                     // Old value equals new value. No error!
@@ -680,6 +688,9 @@
 void SAL_CALL OContentHelper::rename( const ::rtl::OUString& newName ) throw 
(SQLException, ElementExistException, RuntimeException)
 {
        ::osl::MutexGuard  aGuard(m_aMutex);
+    if ( newName.equals( m_pImpl->m_aProps.aTitle ) )
+        return;
+
        Reference<XNameContainer> xNameCont(m_xParentContainer,UNO_QUERY);
        if ( xNameCont.is() )
        {




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

Reply via email to