Tag: cws_src680_dba201
User: oj      
Date: 05/04/29 06:30:17

Modified:
 /dba/dbaccess/source/ui/browser/
  dsbrowserDnD.cxx, unodatbr.cxx

Log:
 #i47235# fix for refcount release

File Changes:

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

File [changed]: dsbrowserDnD.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/dsbrowserDnD.cxx?r1=1.69.22.1&r2=1.69.22.2
Delta lines:  +8 -2
-------------------
--- dsbrowserDnD.cxx    22 Apr 2005 06:06:31 -0000      1.69.22.1
+++ dsbrowserDnD.cxx    29 Apr 2005 13:30:13 -0000      1.69.22.2
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: dsbrowserDnD.cxx,v $
  *
- *  $Revision: 1.69.22.1 $
+ *  $Revision: 1.69.22.2 $
  *
- *  last change: $Author: oj $ $Date: 2005/04/22 06:06:31 $
+ *  last change: $Author: oj $ $Date: 2005/04/29 13:30:13 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -364,7 +364,13 @@
                                                        
xComponent->removeEventListener(xEvtL);
                                                }
                                                if ( m_bOwnConnection )
+                        {
+                            Reference< XModel > 
xModel(getDataSourceOrModel(::dbtools::findDataSource(pData->xObject)),UNO_QUERY);
                                                        
::comphelper::disposeComponent(pData->xObject);
+                            
+                            if ( xModel.is() )
+                                xModel->disconnectController(this);
+                        }
                                        }
 
                                        pData->xObject.clear();

File [changed]: unodatbr.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.170.2.1&r2=1.170.2.2
Delta lines:  +11 -3
--------------------
--- unodatbr.cxx        26 Apr 2005 10:48:49 -0000      1.170.2.1
+++ unodatbr.cxx        29 Apr 2005 13:30:14 -0000      1.170.2.2
@@ -2,9 +2,9 @@
  *
  *     $RCSfile: unodatbr.cxx,v $
  *
- *  $Revision: 1.170.2.1 $
+ *  $Revision: 1.170.2.2 $
  *
- *  last change: $Author: oj $ $Date: 2005/04/26 10:48:49 $
+ *  last change: $Author: oj $ $Date: 2005/04/29 13:30:14 $
  *
  *     The Contents of this file are made available subject to the terms of
  *     either of the following licenses
@@ -2910,7 +2910,10 @@
                        }
 
                        // dispose
+            Reference< XModel > 
xModel(getDataSourceOrModel(::dbtools::findDataSource(pData->xObject)),UNO_QUERY);
                        ::comphelper::disposeComponent( pData->xObject );
+            if ( xModel.is() )
+                xModel->disconnectController(this);
 
                        // clear
                        pData->xObject.clear();
@@ -3333,7 +3336,12 @@
 
                        // connect
             _xConnection = connect( getDataSourceAcessor( _pDSEntry ), 
sConnectingContext, rtl::OUString(), sal_True);
-                       m_bOwnConnection = _xConnection.is();
+                       if ( m_bOwnConnection = _xConnection.is() )
+            {
+                Reference< XModel > 
xModel(getDataSourceOrModel(::dbtools::findDataSource(_xConnection)),UNO_QUERY);
+                if ( xModel.is() )
+                    xModel->connectController(this);
+            }
 
                        // remember the connection
                        static_cast< DBTreeListModel::DBTreeListUserData* >( 
pData )->xObject = _xConnection;




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

Reply via email to