Tag: cws_src680_hsqlcsv User: fs Date: 2006/09/18 06:57:03 Modified: dba/dbaccess/source/ui/app/AppControllerGen.cxx
Log: #i69526# XDatabaseDocumentUI implementation File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppControllerGen.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.20&r2=1.20.36.1 Delta lines: +47 -3 -------------------- --- AppControllerGen.cxx 19 Jul 2006 16:01:34 -0000 1.20 +++ AppControllerGen.cxx 18 Sep 2006 13:57:00 -0000 1.20.36.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerGen.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.20.36.1 $ * - * last change: $Author: kz $ $Date: 2006/07/19 16:01:34 $ + * last change: $Author: fs $ $Date: 2006/09/18 13:57:00 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -139,6 +139,7 @@ using namespace ::dbtools; using namespace ::svx; using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::awt; using namespace ::com::sun::star::util; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; @@ -322,6 +323,49 @@ aEvt.Source = m_xModel; modified(aEvt); } + +// ----------------------------------------------------------------------------- +Reference< XDataSource > SAL_CALL OApplicationController::getDataSource() throw (RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); + return xDataSource; +} + +// ----------------------------------------------------------------------------- +Reference< XWindow > SAL_CALL OApplicationController::getApplicationMainWindow() throw (RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + Reference< XFrame > xFrame( getFrame(), UNO_QUERY_THROW ); + Reference< XWindow > xWindow( xFrame->getContainerWindow(), UNO_QUERY_THROW ); + return xWindow; +} + +// ----------------------------------------------------------------------------- +Reference< XConnection > SAL_CALL OApplicationController::getActiveConnection() throw (RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + return m_xDataSourceConnection.getTyped(); +} + +// ----------------------------------------------------------------------------- +::sal_Bool SAL_CALL OApplicationController::isConnected( ) throw (RuntimeException) +{ + ::osl::MutexGuard aGuard(m_aMutex); + return m_xDataSourceConnection.is(); +} + +// ----------------------------------------------------------------------------- +::sal_Bool SAL_CALL OApplicationController::connect( ) throw (RuntimeException) +{ + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + ::osl::MutexGuard aGuard(m_aMutex); + + ensureConnection(); + return isConnected(); +} + + // ----------------------------------------------------------------------------- void OApplicationController::previewChanged( sal_Int32 _nMode ) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
