Tag: cws_src680_dba201b
User: fs      
Date: 05/07/20 02:57:51

Modified:
 /dba/dbaccess/source/ui/misc/
  singledoccontroller.cxx

Log:
 #i51255# XConnection (partly) replaced with SharedConnection

File Changes:

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

File [changed]: singledoccontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/singledoccontroller.cxx?r1=1.14&r2=1.14.44.1
Delta lines:  +15 -18
---------------------
--- singledoccontroller.cxx     10 Mar 2005 16:52:37 -0000      1.14
+++ singledoccontroller.cxx     20 Jul 2005 09:57:48 -0000      1.14.44.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: singledoccontroller.cxx,v $
  *
- *  $Revision: 1.14 $
+ *  $Revision: 1.14.44.1 $
  *
- *  last change: $Author: vg $ $Date: 2005/03/10 16:52:37 $
+ *  last change: $Author: fs $ $Date: 2005/07/20 09:57:48 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -365,17 +365,10 @@
                m_aUndoManager.Clear();
 
         disconnect();
-        Reference<XDocumentDataSource> 
xDocumentDataSource(m_xDataSource,UNO_QUERY);
-        if ( xDocumentDataSource.is() )
-        {
-                   Reference<XModel> 
xModel(xDocumentDataSource->getDatabaseDocument(),UNO_QUERY);
-                   if ( xModel.is() )
-                           xModel->disconnectController( this );
-        }
 
-               Reference < XFrame > xFrame;
-               attachFrame( xFrame );
+        m_aModelConnector.swap( ModelControllerConnector() );
                
+               attachFrame( Reference < XFrame >() );
 
                m_xDataSource.clear();
        }
@@ -562,12 +555,16 @@
                return NULL;//Reference< XModel >(m_xDataSource,UNO_QUERY); // 
OJ: i31891
        }
        // 
-----------------------------------------------------------------------------
-       sal_Bool SAL_CALL OSingleDocumentController::attachModel(const 
Reference< XModel > & xModel) throw( RuntimeException )
+       sal_Bool SAL_CALL OSingleDocumentController::attachModel(const 
Reference< XModel > & _rxModel) throw( RuntimeException )
        {
-               ::osl::MutexGuard aGuard(m_aMutex);     
-        Reference<XOfficeDatabaseDocument> xOfficeDoc(xModel,UNO_QUERY);
-        m_xDataSource.set(xOfficeDoc.is() ? xOfficeDoc->getDataSource() : 
Reference<XDataSource>(),UNO_QUERY);
-               return m_xDataSource.is();
+               ::osl::MutexGuard aGuard( m_aMutex );   
+
+        Reference< XOfficeDatabaseDocument > xOfficeDoc( _rxModel, UNO_QUERY );
+        m_xDataSource.set( xOfficeDoc.is() ? xOfficeDoc->getDataSource() : 
Reference<XDataSource>(), UNO_QUERY );
+
+        m_aModelConnector.swap( m_xDataSource.is() ? ModelControllerConnector( 
_rxModel, this ) : ModelControllerConnector() );
+
+        return sal_True;
        }
        // 
-----------------------------------------------------------------------------
         ::rtl::OUString OSingleDocumentController::getDataSourceName() const




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

Reply via email to