Tag: cws_src680_dba23b
User: fs      
Date: 2007-06-28 09:04:06+0000
Modified:
   dba/dbaccess/source/ui/browser/dbtreemodel.hxx
   dba/dbaccess/source/ui/browser/dsbrowserDnD.cxx
   dba/dbaccess/source/ui/browser/unodatbr.cxx
   dba/dbaccess/source/ui/inc/unodatbr.hxx

Log:
 #i78362# don't register the data source browser as controller for all opened 
database connections

File Changes:

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

File [changed]: dbtreemodel.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/dbtreemodel.hxx?r1=1.17&r2=1.17.90.1
Delta lines:  +3 -10
--------------------
--- dbtreemodel.hxx     2006-10-05 13:01:46+0000        1.17
+++ dbtreemodel.hxx     2007-06-28 09:04:03+0000        1.17.90.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dbtreemodel.hxx,v $
  *
- *  $Revision: 1.17 $
+ *  $Revision: 1.17.90.1 $
  *
- *  last change: $Author: kz $ $Date: 2006/10/05 13:01:46 $
+ *  last change: $Author: fs $ $Date: 2007/06/28 09:04:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -51,9 +51,6 @@
 #ifndef _SBA_UNODATBR_HXX_
 #include "unodatbr.hxx"
 #endif
-#ifndef DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX
-#include "documentcontroller.hxx"
-#endif
 #ifndef _DBAUI_COMMON_TYPES_HXX_
 #include "commontypes.hxx"
 #endif
@@ -88,10 +85,6 @@
                                                                    xContainer;
             /// if the entry denotes a data source, this is the connection for 
this data source (if already connection)
             SharedConnection                xConnection;
-            /** if the entry denotes a data source, this is the connector 
between the model and the controller,
-                keeping the model alive as long as necessary
-            */
-            ModelControllerConnector        aController;
                        SbaTableQueryBrowser::EntryType eType;
             String                          sAccessor;
 

File [changed]: dsbrowserDnD.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/dsbrowserDnD.cxx?r1=1.76&r2=1.76.12.1
Delta lines:  +4 -5
-------------------
--- dsbrowserDnD.cxx    2007-05-10 10:19:13+0000        1.76
+++ dsbrowserDnD.cxx    2007-06-28 09:04:03+0000        1.76.12.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: dsbrowserDnD.cxx,v $
  *
- *  $Revision: 1.76 $
+ *  $Revision: 1.76.12.1 $
  *
- *  last change: $Author: kz $ $Date: 2007/05/10 10:19:13 $
+ *  last change: $Author: fs $ $Date: 2007/06/28 09:04:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -314,11 +314,10 @@
                                        if ( pData->xConnection.is() )
                                        {
                         DBG_ASSERT( impl_isDataSourceEntry( pEntryLoop ), 
"SbaTableQueryBrowser::clearTreeModel: no data source entry, but a connection?" 
);
-                        // without this, pData->aController might not really 
be a valid ModelControllerConnector
+                        // connections are to be stored *only* at the data 
source entries
                         impl_releaseConnection( pData->xConnection );
                                        }
 
-                    pData->aController.clear();
                                        delete pData;
                                }
                                pEntryLoop = m_pTreeModel->Next(pEntryLoop);

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.186.12.1&r2=1.186.12.2
Delta lines:  +2 -34
--------------------
--- unodatbr.cxx        2007-06-11 20:00:38+0000        1.186.12.1
+++ unodatbr.cxx        2007-06-28 09:04:03+0000        1.186.12.2
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: unodatbr.cxx,v $
  *
- *  $Revision: 1.186.12.1 $
+ *  $Revision: 1.186.12.2 $
  *
- *  last change: $Author: fs $ $Date: 2007/06/11 20:00:38 $
+ *  last change: $Author: fs $ $Date: 2007/06/28 09:04:03 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -2031,8 +2031,6 @@
        pDSData->eType = etDatasource;
     pDSData->sAccessor = sDataSourceId;
        pDSData->xConnection = _rxConnection;
-    if ( _rxConnection.is() )
-        pDSData->aController = ModelControllerConnector( 
impl_nf_getDBDocumentForConnection( _rxConnection ), this );
        pDatasourceEntry->SetUserData(pDSData);
 
        // the child for the queries container
@@ -2906,13 +2904,7 @@
        {
                DBTreeListModel::DBTreeListUserData* pTreeListData = 
static_cast< DBTreeListModel::DBTreeListUserData* >( _pDSEntry->GetUserData() );
                if ( pTreeListData )
-               {
-            DBG_ASSERT( !pTreeListData->xConnection.is() == 
!!pTreeListData->aController.empty(),
-                "SbaTableQueryBrowser::disposeConnection: inconsistency: there 
should either be a connection and a controller, or none of both!" );
-
             impl_releaseConnection( pTreeListData->xConnection );
-            pTreeListData->aController.clear();
-               }
        }
 }
 
@@ -3254,23 +3246,6 @@
 }
 #endif
 
-// -------------------------------------------------------------------------
-Reference< XModel > SbaTableQueryBrowser::impl_nf_getDBDocumentForConnection( 
const Reference< XConnection >& _rxConnection )
-{
-    Reference< XModel > xModel;
-    try
-    {
-           Reference< XChild > xChild( _rxConnection, UNO_QUERY_THROW );
-        Reference< XDocumentDataSource > xDS( xChild->getParent(), 
UNO_QUERY_THROW );
-        xModel = Reference< XModel >( xDS->getDatabaseDocument(), 
UNO_QUERY_THROW );
-    }
-    catch( const Exception& )
-    {
-       OSL_ENSURE( sal_False, 
"SbaTableQueryBrowser::impl_nf_getDBDocumentForConnection: caught an 
exception!" );
-    }
-    return xModel;
-}
-
 // 
-----------------------------------------------------------------------------
 sal_Bool SbaTableQueryBrowser::ensureConnection( SvLBoxEntry* _pDSEntry, void* 
pDSData, SharedConnection& _rConnection )
 {
@@ -3299,13 +3274,6 @@
                 connect( getDataSourceAcessor( _pDSEntry ), 
sConnectingContext, rtl::OUString(), sal_True ),
                 SharedConnection::TakeOwnership
             );
-                       if ( _rConnection.is() )
-            {
-                DBG_ASSERT( impl_isDataSourceEntry( _pDSEntry ), 
"SbaTableQueryBrowser::ensureConnection: this is no data source entry!" );
-                    // if this fails, we can't expect 
pTreeListData->aController to point to a valid
-                    // instance, since those instances are only filled for 
data source entries
-                pTreeListData->aController = ModelControllerConnector( 
impl_nf_getDBDocumentForConnection( _rConnection ), this );
-            }
 
                        // remember the connection
                        pTreeListData->xConnection = _rConnection;

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

File [changed]: unodatbr.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/unodatbr.hxx?r1=1.68&r2=1.68.14.1
Delta lines:  +3 -7
-------------------
--- unodatbr.hxx        2007-05-10 10:34:04+0000        1.68
+++ unodatbr.hxx        2007-06-28 09:04:04+0000        1.68.14.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: unodatbr.hxx,v $
  *
- *  $Revision: 1.68 $
+ *  $Revision: 1.68.14.1 $
  *
- *  last change: $Author: kz $ $Date: 2007/05/10 10:34:04 $
+ *  last change: $Author: fs $ $Date: 2007/06/28 09:04:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -465,10 +465,6 @@
         bool impl_isDataSourceEntry( SvLBoxEntry* _pEntry ) const;
 #endif
 
-        /// retrieves the database document to which a given connection belongs
-        ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
-            impl_nf_getDBDocumentForConnection( const 
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& 
_rxConnection );
-
         /// retrieves the data source URL/name for the given entry 
representing a data source
         String  getDataSourceAcessor( SvLBoxEntry* _pDataSourceEntry ) const;
 




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

Reply via email to