Tag: cws_src680_hsqlcsv User: fs Date: 2006/09/18 06:56:31 Modified: dba/dbaccess/source/ui/app/AppController.cxx dba/dbaccess/source/ui/app/AppController.hxx
Log: #i69526# XDatabaseDocumentUI passed to the various DatabaseObjectView flavors File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppController.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.32.10.2&r2=1.32.10.3 Delta lines: +9 -9 ------------------- --- AppController.cxx 18 Sep 2006 12:17:04 -0000 1.32.10.2 +++ AppController.cxx 18 Sep 2006 13:56:28 -0000 1.32.10.3 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.cxx,v $ * - * $Revision: 1.32.10.2 $ + * $Revision: 1.32.10.3 $ * - * last change: $Author: fs $ $Date: 2006/09/18 12:17:04 $ + * last change: $Author: fs $ $Date: 2006/09/18 13:56:28 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1154,7 +1154,7 @@ SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) { - QueryDesigner aDesigner( getORB(), xConnection, sal_True, SID_DB_NEW_VIEW_SQL == _nId ); + QueryDesigner aDesigner( getORB(), this, sal_True, SID_DB_NEW_VIEW_SQL == _nId ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY ); @@ -1202,7 +1202,7 @@ SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) { - RelationDesigner aDesigner( getORB(), xConnection ); + RelationDesigner aDesigner( getORB(), this ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY ); addDocumentListener( xComponent, NULL ); @@ -1650,17 +1650,17 @@ { if ( _eType == E_TABLE ) { - pDesigner.reset( new TableDesigner( getORB(), xConnection ) ); + pDesigner.reset( new TableDesigner( getORB(), this ) ); } else { - pDesigner.reset( new QueryDesigner( getORB(), xConnection, sal_False, sal_False ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, sal_False, sal_False ) ); } aDataSource <<= m_xDataSource; } else { - pDesigner.reset( new ResultSetBrowser( getORB(), xConnection, _eType == E_TABLE ) ); + pDesigner.reset( new ResultSetBrowser( getORB(), this, _eType == E_TABLE ) ); aArgs.realloc(1); aArgs[0].Name = PROPERTY_SHOWMENU; @@ -1774,11 +1774,11 @@ { if ( _eType == E_TABLE ) { - pDesigner.reset( new TableDesigner( getORB(), xConnection ) ); + pDesigner.reset( new TableDesigner( getORB(), this ) ); } else { - pDesigner.reset( new QueryDesigner( getORB(), xConnection, sal_False, _bSQLView ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, sal_False, _bSQLView ) ); } Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( pDesigner->createNew( xDataSource ), UNO_QUERY ); File [changed]: AppController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.14&r2=1.14.46.1 Delta lines: +28 -12 --------------------- --- AppController.hxx 10 Jul 2006 15:22:23 -0000 1.14 +++ AppController.hxx 18 Sep 2006 13:56:28 -0000 1.14.46.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.hxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.14.46.1 $ * - * last change: $Author: obo $ $Date: 2006/07/10 15:22:23 $ + * last change: $Author: fs $ $Date: 2006/09/18 13:56:28 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,14 +39,11 @@ #ifndef DBAUI_GENERICCONTROLLER_HXX #include "genericcontroller.hxx" #endif -#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_ -#include <com/sun/star/container/XContainerListener.hpp> -#endif #ifndef _SV_TIMER_HXX #include <vcl/timer.hxx> #endif -#ifndef _CPPUHELPER_IMPLBASE2_HXX_ -#include <cppuhelper/implbase2.hxx> +#ifndef _CPPUHELPER_IMPLBASE3_HXX_ +#include <cppuhelper/implbase3.hxx> #endif #ifndef _COMPHELPER_STLTYPES_HXX_ #include <comphelper/stl_types.hxx> @@ -69,9 +66,17 @@ #ifndef DBAUI_IAPPELEMENTNOTIFICATION_HXX #include "IAppElementNotification.hxx" #endif +/** === begin UNO includes === **/ +#ifndef _COM_SUN_STAR_CONTAINER_XCONTAINERLISTENER_HPP_ +#include <com/sun/star/container/XContainerListener.hpp> +#endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_ #include <com/sun/star/beans/XPropertyChangeListener.hpp> #endif +#ifndef _COM_SUN_STAR_SDB_APPLICATION_XDATABASEDOCUMENTUI_HPP_ +#include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp> +#endif +/** === end UNO includes === **/ #ifndef _DBACCESS_UI_CALLBACKS_HXX_ #include "callbacks.hxx" #endif @@ -116,8 +121,9 @@ class OApplicationView; class OLinkedDocumentsAccess; typedef OGenericUnoController OApplicationController_CBASE; - typedef ::cppu::ImplHelper2 < ::com::sun::star::container::XContainerListener, - ::com::sun::star::beans::XPropertyChangeListener + typedef ::cppu::ImplHelper3 < ::com::sun::star::container::XContainerListener + , ::com::sun::star::beans::XPropertyChangeListener + , ::com::sun::star::sdb::application::XDatabaseDocumentUI > OApplicationController_Base; class OApplicationController @@ -458,6 +464,7 @@ virtual void impl_initialize(); virtual ~OApplicationController(); + public: OApplicationController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB); @@ -489,6 +496,13 @@ // XPropertyChangeListener virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException); + // XDatabaseDocumentUI + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > SAL_CALL getDataSource() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getApplicationMainWindow() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getActiveConnection() throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL isConnected( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Bool SAL_CALL connect( ) throw (::com::sun::star::uno::RuntimeException); + /** retrieves the current connection, creates it if necessary */ const SharedConnection& ensureConnection(); @@ -536,7 +550,9 @@ // IViewChangeListener virtual void previewChanged( sal_Int32 _nMode); + protected: + using OApplicationController_CBASE::connect; /** disconnects from our XConnection, and cleans up this connection */ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
