Tag: cws_src680_hsqlcsv
User: fs      
Date: 2006/10/11 01:50:22

Modified:
   dba/dbaccess/source/ui/app/AppController.cxx

Log:
 RESYNC: (1.32-1.35); FILE MERGED

File Changes:

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.32.10.3&r2=1.32.10.4
Delta lines:  +34 -17
---------------------
--- AppController.cxx   18 Sep 2006 13:56:28 -0000      1.32.10.3
+++ AppController.cxx   11 Oct 2006 08:50:19 -0000      1.32.10.4
@@ -33,6 +33,9 @@
  *
  ************************************************************************/
 
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_dbaccess.hxx"
+
 #ifndef DBAUI_APPCONTROLLER_HXX
 #include "AppController.hxx"
 #endif
@@ -769,21 +772,24 @@
                                aReturn.bEnabled = 
getContainer()->getElementType() == E_TABLE && isConnected();
                                break;
                        case SID_DB_APP_DSPROPS:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_MOZILLA != eType && DST_EVOLUTION != eType && DST_KAB != eType && 
DST_OUTLOOK != eType && DST_OUTLOOKEXP != eType;
                                }
                                break;
                        case SID_DB_APP_DSCONNECTION_TYPE:
-                               if ( (aReturn.bEnabled = 
!isDataSourceReadOnly() && m_xDataSource.is()) )
+                aReturn.bEnabled = !isDataSourceReadOnly();
+                               if ( aReturn.bEnabled && m_xDataSource.is() )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        aReturn.bEnabled = DST_EMBEDDED != 
eType;
                                }
                                break;
                        case SID_DB_APP_DSADVANCED_SETTINGS:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_LDAP != eType && DST_CALC != eType && DST_MOZILLA != eType && 
DST_THUNDERBIRD != eType && DST_EVOLUTION != eType && DST_KAB != eType && 
DST_OUTLOOK != eType && DST_OUTLOOKEXP != eType;
@@ -834,7 +840,8 @@
                                aReturn.bEnabled = sal_False;
                                break;
                        case SID_DB_APP_STATUS_TYPE:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
                                        ::rtl::OUString sDSTypeName = 
m_aTypeCollection.getTypeDisplayName(eType);
@@ -842,7 +849,8 @@
                                }
                                break;
                        case SID_DB_APP_STATUS_DBNAME:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                               aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                                {
                                        ::rtl::OUString sTemp;
                                        
m_xDataSource->getPropertyValue(PROPERTY_URL) >>= sTemp;
@@ -878,11 +886,13 @@
                                }
                                break;
                        case SID_DB_APP_STATUS_USERNAME:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                               aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                     m_xDataSource->getPropertyValue( PROPERTY_USER ) >>= 
aReturn.sTitle;
                                break;
                        case SID_DB_APP_STATUS_HOSTNAME:
-                               if ( (aReturn.bEnabled = m_xDataSource.is()) )
+                               aReturn.bEnabled = m_xDataSource.is();
+                               if ( aReturn.bEnabled )
                                {
                                        ::rtl::OUString sTemp;
                                        
m_xDataSource->getPropertyValue(PROPERTY_URL) >>= sTemp;
@@ -1429,7 +1439,7 @@
                 default:
                     break;
                        }
-                       
getContainer()->elementAdded(eType,sName,_rEvent.Element,getConnection());
+                       
getContainer()->elementAdded(eType,sName,_rEvent.Element);
                }
        }
 }
@@ -1464,7 +1474,7 @@
             default:
                 break;
                }
-               getContainer()->elementRemoved(eType,sName,getConnection());
+               getContainer()->elementRemoved(eType,sName);
        }
 }
 // 
-----------------------------------------------------------------------------
@@ -1508,7 +1518,7 @@
                 default:
                     break;
                        }
-                       //      
getContainer()->elementReplaced(getContainer()->getElementType(),sName,sNewName,xConnection);
+                       //      
getContainer()->elementReplaced(getContainer()->getElementType(),sName,sNewName);
                }
                catch( Exception& )
                {
@@ -1835,7 +1845,7 @@
             ::std::auto_ptr< OSaveAsDlg > aDialog;
 
                        Reference<XRename> xRename;
-                       ElementType eType = getContainer()->getElementType();
+                       const ElementType eType = 
getContainer()->getElementType();
                        switch( eType )
                        {
                                case E_FORM:
@@ -1909,7 +1919,7 @@
                                                                ::rtl::OUString 
sCatalog = aDialog->getCatalog();
                                                                ::rtl::OUString 
sSchema  = aDialog->getSchema();
 
-                                                               sNewName = 
::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, sal_False, 
::dbtools::eInTableDefinitions );
+                                                               sNewName = 
::dbtools::composeTableName( m_xMetaData, sCatalog, sSchema, sName, sal_False, 
::dbtools::eInDataManipulation );
                                                        }
                                                        else
                                                                sNewName = 
aDialog->getName();
@@ -1927,7 +1937,14 @@
                                                        
xRename->rename(sNewName);
 
                                                        if ( !Reference< 
XNameAccess >( xRename, UNO_QUERY ).is() )
-                                                               
getContainer()->elementReplaced( getContainer()->getElementType(), sOldName, 
sNewName, getConnection() );
+                            {
+                                if ( eType == E_TABLE )
+                                {
+                                    Reference<XPropertySet> 
xProp(xRename,UNO_QUERY);
+                                    sNewName = ::dbaui::composeTableName( 
m_xMetaData, xProp, ::dbtools::eInDataManipulation, false, false, false );
+                                }
+                                                               
getContainer()->elementReplaced( eType , sOldName, sNewName );
+                            }
 
                                                        bTryAgain = sal_False;
                                                }




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

Reply via email to