User: vg      
Date: 2007/01/15 06:36:31

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

Log:
 INTEGRATION: CWS dba22b (1.19.54); FILE MERGED
 2006/12/09 22:45:59 fs 1.19.54.1: #i72432# remove all PropertyContainer and 
PropertyArrayHelper stuff - it's not used anymore, and simply conflicts with 
derived classes with own properties

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.19&r2=1.20
Delta lines:  +1 -121
---------------------
--- singledoccontroller.cxx     17 Sep 2006 07:18:38 -0000      1.19
+++ singledoccontroller.cxx     15 Jan 2007 14:36:28 -0000      1.20
@@ -102,137 +102,21 @@
        using namespace ::com::sun::star::frame;
 
        //====================================================================
-       //= OConnectionChangeBroadcaster
-       //====================================================================
-       class OConnectionChangeBroadcaster
-       {
-       private:
-               OSingleDocumentController*      m_pController;
-               Reference< XConnection >        m_xOldConnection;
-
-       public:
-               OConnectionChangeBroadcaster( OSingleDocumentController* 
_pController );
-               ~OConnectionChangeBroadcaster();
-       };
-       
-       DBG_NAME(OConnectionChangeBroadcaster)
-       //--------------------------------------------------------------------
-       OConnectionChangeBroadcaster::OConnectionChangeBroadcaster( 
OSingleDocumentController* _pController )
-               :m_pController( _pController )
-       {
-               DBG_CTOR(OConnectionChangeBroadcaster,NULL); 
-               DBG_ASSERT( m_pController, 
"OConnectionChangeBroadcaster::OConnectionChangeBroadcaster: invalid 
controller!" );
-               if ( m_pController )
-                       m_xOldConnection = m_pController->getConnection();
-       }
-
-       //--------------------------------------------------------------------
-       OConnectionChangeBroadcaster::~OConnectionChangeBroadcaster()
-       {
-               DBG_DTOR(OConnectionChangeBroadcaster,NULL); 
-               if ( m_pController )
-               {
-                       // has the connection change while we were constructed?
-                       Reference< XConnection > xNewConnection = 
m_pController->getConnection();
-                       if ( m_xOldConnection.get() != xNewConnection.get() )
-                       {
-                               // yes -> fire the property change
-                               sal_Int32 mHandle = 
PROPERTY_ID_ACTIVECONNECTION;
-                               Any aNewValue = makeAny( xNewConnection );
-                               Any aOldValue = makeAny( m_xOldConnection );
-                               m_pController->fire( &mHandle, &aNewValue, 
&aOldValue, 1, sal_False );
-                       }
-               }
-       }
-
-       //====================================================================
        //= OSingleDocumentController
        //====================================================================
        //--------------------------------------------------------------------
        OSingleDocumentController::OSingleDocumentController(const Reference< 
XMultiServiceFactory >& _rxORB)
                :OSingleDocumentController_CBASE( _rxORB )
-               ,OSingleDocumentController_PBASE( getBroadcastHelper() )
                ,m_bSuspended( sal_False )
                ,m_bEditable(sal_True)
                ,m_bModified(sal_False)
 
        {
-//             registerProperty( PROPERTY_ACTIVECONNECTION, 
PROPERTY_ID_ACTIVECONNECTION, PropertyAttribute::READONLY | 
PropertyAttribute::BOUND,
-//                     &m_xConnection, ::getCppuType( &m_xConnection ) );
-        //  TODO: is this still needed?
-       }
-
-       //--------------------------------------------------------------------
-       Any SAL_CALL OSingleDocumentController::queryInterface( const Type& 
_rType ) throw (RuntimeException)
-       {
-               Any aReturn = OSingleDocumentController_CBASE::queryInterface( 
_rType );
-               if ( !aReturn.hasValue() )
-                       aReturn = 
OSingleDocumentController_PBASE::queryInterface( _rType );
-               return aReturn;
-       }
-
-       //--------------------------------------------------------------------
-       void SAL_CALL OSingleDocumentController::acquire(  ) throw ()
-       {
-               OSingleDocumentController_CBASE::acquire();
-       }
-
-       //--------------------------------------------------------------------
-       void SAL_CALL OSingleDocumentController::release(  ) throw ()
-       {
-               OSingleDocumentController_CBASE::release();
-       }
-
-       //--------------------------------------------------------------------
-       Sequence<sal_Int8> SAL_CALL 
OSingleDocumentController::getImplementationId(  ) throw(RuntimeException)
-       {
-               static ::cppu::OImplementationId * pId = 0;
-               if (! pId)
-               {
-                       ::osl::MutexGuard aGuard( 
::osl::Mutex::getGlobalMutex() );
-                       if (! pId)
-                       {
-                               static ::cppu::OImplementationId aId;
-                               pId = &aId;
-                       }
-               }
-               return pId->getImplementationId();
-       }
-
-       //--------------------------------------------------------------------
-       Sequence< Type > SAL_CALL OSingleDocumentController::getTypes(  ) throw 
(RuntimeException)
-       {
-               return ::comphelper::concatSequences(
-                       OSingleDocumentController_CBASE::getTypes(),
-                       OSingleDocumentController_PBASE::getTypes()
-               );
        }
 
-       
//-------------------------------------------------------------------------
-       Reference<XPropertySetInfo>  SAL_CALL 
OSingleDocumentController::getPropertySetInfo() throw(RuntimeException)
-       {
-               Reference<XPropertySetInfo>  xInfo( createPropertySetInfo( 
getInfoHelper() ) );
-               return xInfo;
-       }
-
-       
//-------------------------------------------------------------------------
-       ::cppu::IPropertyArrayHelper& OSingleDocumentController::getInfoHelper()
-       {
-               return 
*const_cast<OSingleDocumentController*>(this)->getArrayHelper();
-       }
-
-       //--------------------------------------------------------------------
-       ::cppu::IPropertyArrayHelper* 
OSingleDocumentController::createArrayHelper( ) const
-       {
-               Sequence< Property > aProps;
-               describeProperties(aProps);
-               return new ::cppu::OPropertyArrayHelper(aProps);
-       }
        //--------------------------------------------------------------------
        void OSingleDocumentController::initializeConnection( const Reference< 
XConnection >& _rxForeignConn )
        {
-               OConnectionChangeBroadcaster( this );
-
                DBG_ASSERT( !isConnected(), 
"OSingleDocumentController::initializeConnection: not to be called when already 
connected!" );
                        // usually this gets called from within initialize of 
derived classes ...
                if ( isConnected() )
@@ -273,7 +157,6 @@
        void OSingleDocumentController::reconnect( sal_Bool _bUI )
        {
                OSL_ENSURE(!m_bSuspended, "Cannot reconnect while suspended!");
-               OConnectionChangeBroadcaster( this );
 
                stopConnectionListening( m_xConnection );
         m_aSdbMetaData.reset( NULL );
@@ -301,8 +184,6 @@
        //--------------------------------------------------------------------
        void OSingleDocumentController::disconnect()
        {
-               OConnectionChangeBroadcaster( this );
-
                stopConnectionListening(m_xConnection);
         m_aSdbMetaData.reset( NULL );
         m_xConnection.clear();
@@ -321,7 +202,6 @@
        void SAL_CALL OSingleDocumentController::disposing()
        {
                OSingleDocumentController_CBASE::disposing();
-        OSingleDocumentController_PBASE::disposing();
                m_aUndoManager.Clear();
 
         disconnect();




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

Reply via email to