User: rt      
Date: 2007-07-24 12:07:39+0000
Modified:
   dba/dbaccess/source/ui/browser/unodatbr.cxx

Log:
 INTEGRATION: CWS dba23b (1.186.12); FILE MERGED
 2007/07/11 11:53:22 fs 1.186.12.4: RESYNC: (1.186-1.189); FILE MERGED
 2007/07/08 20:36:18 fs 1.186.12.3: during #i65812#: context details not used
 2007/06/28 09:04:03 fs 1.186.12.2: #i78362# don't register the data source 
browser as controller for all opened database connections
 2007/06/11 20:00:38 fs 1.186.12.1: #i76857# allow to disable 'Edit database 
file' context menu entry by configuration option

File Changes:

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

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.189&r2=1.190
Delta lines:  +1 -36
--------------------
--- unodatbr.cxx        2007-07-06 08:05:39+0000        1.189
+++ unodatbr.cxx        2007-07-24 12:07:37+0000        1.190
@@ -118,9 +118,6 @@
 #ifndef _UNOTOOLS_CONFIGNODE_HXX_
 #include <unotools/confignode.hxx>
 #endif
-#ifndef INCLUDED_SVTOOLS_MODULEOPTIONS_HXX
-#include <svtools/moduleoptions.hxx>
-#endif
 #ifndef _SV_WAITOBJ_HXX
 #include <vcl/waitobj.hxx>
 #endif
@@ -2031,8 +2028,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 +2901,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 +3243,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 )
 {
@@ -3296,16 +3268,9 @@
 
                        // connect
             _rConnection.reset(
-                connect( getDataSourceAcessor( _pDSEntry ), 
sConnectingContext, rtl::OUString(), sal_True ),
+                connect( getDataSourceAcessor( _pDSEntry ), 
sConnectingContext, 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;




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

Reply via email to