Tag: cws_src680_dba205a
User: oj      
Date: 2006/07/28 06:03:11

Modified:
   dba/dbaccess/source/ui/app/AppController.cxx
   dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx
   dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx
   dba/dbaccess/source/ui/app/AppDetailView.cxx
   dba/dbaccess/source/ui/app/AppDetailView.hxx
   dba/dbaccess/source/ui/app/AppView.cxx
   dba/dbaccess/source/ui/app/AppView.hxx

Log:
 #i67014# replaceElement now uses the correct name for table/view

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.31&r2=1.31.10.1
Delta lines:  +27 -13
---------------------
--- AppController.cxx   10 Jul 2006 15:22:12 -0000      1.31
+++ AppController.cxx   28 Jul 2006 13:03:08 -0000      1.31.10.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.31 $
+ *  $Revision: 1.31.10.1 $
  *
- *  last change: $Author: obo $ $Date: 2006/07/10 15:22:12 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -769,21 +769,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 +837,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 +846,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 +883,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;
@@ -1831,7 +1838,7 @@
             ::std::auto_ptr< OSaveAsDlg > aDialog;
 
                        Reference<XRename> xRename;
-                       ElementType eType = getContainer()->getElementType();
+                       const ElementType eType = 
getContainer()->getElementType();
                        switch( eType )
                        {
                                case E_FORM:
@@ -1923,7 +1930,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, 
getConnection(),xRename );
+                            }
 
                                                        bTryAgain = sal_False;
                                                }

File [changed]: AppDetailPageHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.14.10.1&r2=1.14.10.2
Delta lines:  +5 -4
-------------------
--- AppDetailPageHelper.cxx     27 Jul 2006 12:28:37 -0000      1.14.10.1
+++ AppDetailPageHelper.cxx     28 Jul 2006 13:03:08 -0000      1.14.10.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailPageHelper.cxx,v $
  *
- *  $Revision: 1.14.10.1 $
+ *  $Revision: 1.14.10.2 $
  *
- *  last change: $Author: oj $ $Date: 2006/07/27 12:28:37 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -764,7 +764,8 @@
 void OAppDetailPageHelper::elementReplaced(ElementType _eType
                                                                                
                        ,const ::rtl::OUString& _rOldName
                                                                                
                        ,const ::rtl::OUString& _rNewName
-                                                                               
                        ,const Reference< XConnection >& _rxConn )
+                                                                               
                        ,const Reference< XConnection >& _rxConn
+                                                    ,const 
Reference<XInterface>& _xObject)
 {
        DBTreeListBox* pTreeView = getCurrentView();
        if ( pTreeView )
@@ -776,7 +777,7 @@
                        case E_TABLE:
                                OSL_ENSURE(_rxConn.is(),"Connection is NULL! 
->GPF");
                                
static_cast<OTableTreeListBox*>(pTreeView)->removedTable(_rxConn,_rOldName);
-                               
static_cast<OTableTreeListBox*>(pTreeView)->addedTable(_rxConn,_rNewName, 
Any());
+                               
static_cast<OTableTreeListBox*>(pTreeView)->addedTable(_rxConn,_rNewName, 
makeAny(_xObject));
                                return;
 
                        case E_QUERY:

File [changed]: AppDetailPageHelper.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.hxx?r1=1.9&r2=1.9.14.1
Delta lines:  +5 -4
-------------------
--- AppDetailPageHelper.hxx     20 Jun 2006 02:54:20 -0000      1.9
+++ AppDetailPageHelper.hxx     28 Jul 2006 13:03:08 -0000      1.9.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailPageHelper.hxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.14.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:54:20 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -340,7 +340,8 @@
                void elementReplaced(ElementType eType
                                                ,const ::rtl::OUString& 
_rOldName
                                                ,const ::rtl::OUString& 
_rNewName
-                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL);
+                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL
+                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface>& _xObject = NULL);
 
                /** removes an element from the detail page.
                        @param  _eType

File [changed]: AppDetailView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.cxx?r1=1.17&r2=1.17.12.1
Delta lines:  +6 -5
-------------------
--- AppDetailView.cxx   20 Jun 2006 02:54:33 -0000      1.17
+++ AppDetailView.cxx   28 Jul 2006 13:03:08 -0000      1.17.12.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailView.cxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.12.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:54:33 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -812,10 +812,11 @@
 void OApplicationDetailView::elementReplaced(ElementType _eType
                                                                                
                        ,const ::rtl::OUString& _rOldName
                                                                                
                        ,const ::rtl::OUString& _rNewName
-                                                                               
                        ,const Reference< XConnection >& _rxConn )
+                                                                               
                        ,const Reference< XConnection >& _rxConn
+                                                    ,const 
Reference<XInterface>& _xObject)
 {
        DBG_CHKTHIS(OApplicationDetailView,NULL);
-       m_pControlHelper->elementReplaced(_eType, _rOldName,_rNewName,_rxConn );
+       m_pControlHelper->elementReplaced(_eType, 
_rOldName,_rNewName,_rxConn,_xObject );
 }
 // 
-----------------------------------------------------------------------------
 PreviewMode OApplicationDetailView::getPreviewMode()

File [changed]: AppDetailView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailView.hxx?r1=1.11&r2=1.11.106.1
Delta lines:  +7 -4
-------------------
--- AppDetailView.hxx   3 Jan 2006 16:16:14 -0000       1.11
+++ AppDetailView.hxx   28 Jul 2006 13:03:08 -0000      1.11.106.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppDetailView.hxx,v $
  *
- *  $Revision: 1.11 $
+ *  $Revision: 1.11.106.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/01/03 16:16:14 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:08 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -286,11 +286,14 @@
                                The new name of the object to be replaced
                        @param  _rxConn
                                If we insert a table, the connection must be 
set.
+            @param  _xObject
+                The object which was replaced
                */
                void elementReplaced(ElementType eType
                                                ,const ::rtl::OUString& 
_rOldName
                                                ,const ::rtl::OUString& 
_rNewName
-                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL);
+                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL
+                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface>& _xObject = NULL);
 
                /** removes an element from the detail page.
                        @param  _eType

File [changed]: AppView.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppView.cxx?r1=1.14&r2=1.14.12.1
Delta lines:  +6 -5
-------------------
--- AppView.cxx 20 Jun 2006 02:55:11 -0000      1.14
+++ AppView.cxx 28 Jul 2006 13:03:09 -0000      1.14.12.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppView.cxx,v $
  *
- *  $Revision: 1.14 $
+ *  $Revision: 1.14.12.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:55:11 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:09 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -498,10 +498,11 @@
 void OApplicationView::elementReplaced(ElementType _eType
                                                                                
                        ,const ::rtl::OUString& _rOldName
                                                                                
                        ,const ::rtl::OUString& _rNewName
-                                                                               
                        ,const Reference< XConnection >& _rxConn )
+                                                                               
                        ,const Reference< XConnection >& _rxConn
+                                                    ,const 
Reference<XInterface>& _xObject)
 {
        OSL_ENSURE(m_pWin && getDetailView(),"Detail view is NULL! -> GPF");
-       getDetailView()->elementReplaced(_eType, _rOldName,_rNewName,_rxConn );
+       getDetailView()->elementReplaced(_eType, _rOldName,_rNewName,_rxConn 
,_xObject);
 }
 // 
-----------------------------------------------------------------------------
 void OApplicationView::clearPages(sal_Bool _bTaskAlso)

File [changed]: AppView.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppView.hxx?r1=1.9&r2=1.9.14.1
Delta lines:  +7 -4
-------------------
--- AppView.hxx 20 Jun 2006 02:55:23 -0000      1.9
+++ AppView.hxx 28 Jul 2006 13:03:09 -0000      1.9.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppView.hxx,v $
  *
- *  $Revision: 1.9 $
+ *  $Revision: 1.9.14.1 $
  *
- *  last change: $Author: hr $ $Date: 2006/06/20 02:55:23 $
+ *  last change: $Author: oj $ $Date: 2006/07/28 13:03:09 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -273,11 +273,14 @@
                                The new name of the object to be replaced
                        @param  _rxConn
                                If we insert a table, the connection must be 
set.
+            @param  _xObject
+                The object which was replaced
                */
                void elementReplaced(ElementType eType
                                                ,const ::rtl::OUString& 
_rOldName
                                                ,const ::rtl::OUString& 
_rNewName
-                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL);
+                                               ,const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConn = NULL
+                        ,const ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface>& _xObject = NULL);
 
                /** removes an element from the detail page.
                        @param  _eType




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

Reply via email to