Tag: cws_src680_odbmacros2 User: fs Date: 2007-12-13 11:21:54+0000 Modified: dba/dbaccess/source/ui/app/AppController.cxx dba/dbaccess/source/ui/app/AppController.hxx dba/dbaccess/source/ui/app/AppControllerGen.cxx
Log: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change 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.50&r2=1.50.2.1 Delta lines: +15 -33 --------------------- --- AppController.cxx 2007-11-21 16:57:49+0000 1.50 +++ AppController.cxx 2007-12-13 11:21:51+0000 1.50.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.cxx,v $ * - * $Revision: 1.50 $ + * $Revision: 1.50.2.1 $ * - * last change: $Author: ihi $ $Date: 2007/11/21 16:57:49 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:21:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1249,7 +1249,7 @@ SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) { - QueryDesigner aDesigner( getORB(), this, m_xCurrentFrame, true, SID_DB_NEW_VIEW_SQL == _nId ); + QueryDesigner aDesigner( getORB(), this, getFrame(), true, SID_DB_NEW_VIEW_SQL == _nId ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY ); @@ -1298,7 +1298,7 @@ SharedConnection xConnection( ensureConnection() ); if ( xConnection.is() ) { - RelationDesigner aDesigner( getORB(), this, m_xCurrentFrame ); + RelationDesigner aDesigner( getORB(), this, getFrame() ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( aDesigner.createNew( xDataSource ), UNO_QUERY ); addDocumentListener( xComponent, NULL ); @@ -1366,7 +1366,7 @@ { SfxMailModel aSendMail; if ( aSendMail.AttachDocument(rtl::OUString(),getModel(), rtl::OUString()) == SfxMailModel::SEND_MAIL_OK ) - aSendMail.Send(m_xCurrentFrame); + aSendMail.Send( getFrame() ); } break; case SID_DB_APP_SENDREPORTASMAIL: @@ -1794,23 +1794,23 @@ if ( _eType == E_TABLE ) { if ( impl_isAlterableView_nothrow( _sName ) ) - pDesigner.reset( new QueryDesigner( getORB(), this, m_xCurrentFrame, true, bQuerySQLMode ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), true, bQuerySQLMode ) ); else - pDesigner.reset( new TableDesigner( getORB(), this, m_xCurrentFrame ) ); + pDesigner.reset( new TableDesigner( getORB(), this, getFrame() ) ); } else if ( _eType == E_QUERY ) { - pDesigner.reset( new QueryDesigner( getORB(), this, m_xCurrentFrame, false, bQuerySQLMode ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), false, bQuerySQLMode ) ); } else if ( _eType == E_REPORT ) { - pDesigner.reset( new ReportDesigner( getORB(),this, m_xCurrentFrame ) ); + pDesigner.reset( new ReportDesigner( getORB(),this, getFrame() ) ); } aDataSource <<= m_xDataSource; } else { - pDesigner.reset( new ResultSetBrowser( getORB(), this, m_xCurrentFrame, _eType == E_TABLE ) ); + pDesigner.reset( new ResultSetBrowser( getORB(), this, getFrame(), _eType == E_TABLE ) ); aArgs.realloc(1); aArgs[0].Name = PROPERTY_SHOWMENU; @@ -1908,14 +1908,14 @@ { if ( _eType == E_TABLE ) { - pDesigner.reset( new TableDesigner( getORB(), this, m_xCurrentFrame ) ); + pDesigner.reset( new TableDesigner( getORB(), this, getFrame() ) ); } else if ( _eType == E_QUERY ) { - pDesigner.reset( new QueryDesigner( getORB(), this, m_xCurrentFrame, false, _bSQLView ) ); + pDesigner.reset( new QueryDesigner( getORB(), this, getFrame(), false, _bSQLView ) ); } else - pDesigner.reset( new ReportDesigner( getORB(), this, m_xCurrentFrame ) ); + pDesigner.reset( new ReportDesigner( getORB(), this, getFrame() ) ); Reference< XDataSource > xDataSource( m_xDataSource, UNO_QUERY ); Reference< XComponent > xComponent( pDesigner->createNew( xDataSource ), UNO_QUERY ); @@ -2180,25 +2180,7 @@ pView->showPreview(xContent); } -//------------------------------------------------------------------------------ -void OApplicationController::frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard(m_aMutex); - if ((XFrame*)aEvent.Frame.get() == (XFrame*)m_xCurrentFrame.get()) - switch (aEvent.Action) - { - case FrameAction_FRAME_ACTIVATED: - case FrameAction_FRAME_UI_ACTIVATED: - m_bFrameUiActive = sal_True; - break; - case FrameAction_FRAME_DEACTIVATING: - case FrameAction_FRAME_UI_DEACTIVATING: - m_bFrameUiActive = sal_False; - break; - default: - break; - } -} + //------------------------------------------------------------------------------ IMPL_LINK( OApplicationController, OnClipboardChanged, void*, EMPTYARG ) { File [changed]: AppController.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.hxx?r1=1.22&r2=1.22.2.1 Delta lines: +23 -63 --------------------- --- AppController.hxx 2007-11-21 15:49:47+0000 1.22 +++ AppController.hxx 2007-12-13 11:21:52+0000 1.22.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppController.hxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.22.2.1 $ * - * last change: $Author: ihi $ $Date: 2007/11/21 15:49:47 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:21:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,68 +36,30 @@ #ifndef DBAUI_APPCONTROLLER_HXX #define DBAUI_APPCONTROLLER_HXX -#ifndef DBAUI_GENERICCONTROLLER_HXX -#include "genericcontroller.hxx" -#endif -#ifndef _SV_TIMER_HXX -#include <vcl/timer.hxx> -#endif -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ -#include <cppuhelper/implbase3.hxx> -#endif -#ifndef _COMPHELPER_STLTYPES_HXX_ -#include <comphelper/stl_types.hxx> -#endif -#ifndef _COMPHELPER_UNO3_HXX_ -#include <comphelper/uno3.hxx> -#endif -#ifndef _TRANSFER_HXX -#include <svtools/transfer.hxx> -#endif -#ifndef _SVX_DATACCESSDESCRIPTOR_HXX_ -#include <svx/dataaccessdescriptor.hxx> -#endif -#ifndef DBAUI_APPELEMENTTYPE_HXX #include "AppElementType.hxx" -#endif -#ifndef _SOT_STORAGE_HXX -#include <sot/storage.hxx> -#endif -#ifndef DBAUI_IAPPELEMENTNOTIFICATION_HXX +#include "callbacks.hxx" +#include "commontypes.hxx" +#include "documentcontroller.hxx" +#include "dsntypes.hxx" +#include "genericcontroller.hxx" #include "IAppElementNotification.hxx" -#endif +#include "linkeddocuments.hxx" +#include "moduledbu.hxx" +#include "TableCopyHelper.hxx" + /** === 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/container/XContainerListener.hpp> #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp> -#endif /** === end UNO includes === **/ -#ifndef _DBACCESS_UI_CALLBACKS_HXX_ -#include "callbacks.hxx" -#endif -#ifndef _DBAUI_DSNTYPES_HXX_ -#include "dsntypes.hxx" -#endif -#ifndef DBUI_TABLECOPYHELPER_HXX -#include "TableCopyHelper.hxx" -#endif -#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_ -#include "linkeddocuments.hxx" -#endif -#ifndef DBACCESS_SOURCE_UI_INC_DOCUMENTCONTROLLER_HXX -#include "documentcontroller.hxx" -#endif -#ifndef _DBAUI_COMMON_TYPES_HXX_ -#include "commontypes.hxx" -#endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" -#endif + +#include <comphelper/stl_types.hxx> +#include <comphelper/uno3.hxx> +#include <cppuhelper/implbase3.hxx> +#include <sot/storage.hxx> +#include <svtools/transfer.hxx> +#include <svx/dataaccessdescriptor.hxx> +#include <vcl/timer.hxx> #include <memory> @@ -113,6 +75,7 @@ FORWARD_DECLARE_INTERFACE(util,XNumberFormatter) FORWARD_DECLARE_INTERFACE(util,XCloseable) FORWARD_DECLARE_INTERFACE(ucb,XContent) + //........................................................................ namespace dbaui { @@ -500,9 +463,6 @@ virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException ); - // ::com::sun::star::frame::XFrameActionListener - virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException ); - // ::com::sun::star::container::XContainerListener virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException ); File [changed]: AppControllerGen.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.28&r2=1.28.56.1 Delta lines: +4 -4 ------------------- --- AppControllerGen.cxx 2007-09-26 14:46:50+0000 1.28 +++ AppControllerGen.cxx 2007-12-13 11:21:52+0000 1.28.56.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerGen.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.28.56.1 $ * - * last change: $Author: hr $ $Date: 2007/09/26 14:46:50 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:21:52 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -782,7 +782,7 @@ eResult = aSendMail.AttachDocument(aDocTypeString,xModel,componentIter->first); } if ( !aSendMail.IsEmpty() ) - aSendMail.Send( m_xCurrentFrame ); + aSendMail.Send( getFrame() ); } } // ----------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
