Tag: cws_src680_odbmacros2 User: fs Date: 2007-12-13 11:19:25+0000 Modified: dba/dbaccess/inc/genericcontroller.hxx
Log: #i49133# replaced m_xCurrentFrame with m_aCurrentFrame of type ControllerFrame, to have a central place for handling the global WorkingDocument File Changes: Directory: /dba/dbaccess/inc/ ============================= File [changed]: genericcontroller.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/inc/genericcontroller.hxx?r1=1.5&r2=1.5.82.1 Delta lines: +42 -84 --------------------- --- genericcontroller.hxx 2007-08-02 14:25:13+0000 1.5 +++ genericcontroller.hxx 2007-12-13 11:19:22+0000 1.5.82.1 @@ -4,9 +4,9 @@ * * $RCSfile: genericcontroller.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.5.82.1 $ * - * last change: $Author: hr $ $Date: 2007/08/02 14:25:13 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:19:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,86 +36,39 @@ #ifndef DBAUI_GENERICCONTROLLER_HXX #define DBAUI_GENERICCONTROLLER_HXX -#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_ +#include "AsyncronousLink.hxx" +#include "controllerframe.hxx" +#include "dbaccessdllapi.h" +#include "IController.hxx" + +/** === begin UNO includes === **/ +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/frame/CommandGroup.hpp> #include <com/sun/star/frame/XController.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XFRAMEACTIONLISTENER_HPP_ -#include <com/sun/star/frame/XFrameActionListener.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_ #include <com/sun/star/frame/XDispatch.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDERINTERCEPTOR_HPP_ +#include <com/sun/star/frame/XDispatchInformationProvider.hpp> #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_ +#include <com/sun/star/frame/XFrameActionListener.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XDISPATCHINFORMATIONPROVIDER_HPP_ -#include <com/sun/star/frame/XDispatchInformationProvider.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_COMMANDGROUP_HPP_ -#include <com/sun/star/frame/CommandGroup.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_ -#include <com/sun/star/util/XModifyListener.hpp> -#endif -#ifndef _COM_SUN_STAR_UTIL_XURLTRANSFORMER_HPP_ -#include <com/sun/star/util/XURLTransformer.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ #include <com/sun/star/lang/XInitialization.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ -#include <com/sun/star/view/XSelectionSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> -#endif -#ifndef _CPPUHELPER_COMPBASE8_HXX_ -#include <cppuhelper/compbase8.hxx> -#endif -#ifndef _CPPUHELPER_COMPBASE1_HXX_ -#include <cppuhelper/compbase1.hxx> -#endif -#ifndef _CPPUHELPER_INTERFACECONTAINER_H_ -#include <cppuhelper/interfacecontainer.h> -#endif -#ifndef _COMPHELPER_STLTYPES_HXX_ -#include <comphelper/stl_types.hxx> -#endif -#ifndef DBAUI_ASYNCRONOUSLINK_HXX -#include "AsyncronousLink.hxx" -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ -#include <com/sun/star/container/XNameAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XCONNECTION_HPP_ #include <com/sun/star/sdbc/XConnection.hpp> -#endif -#ifndef _COM_SUN_STAR_SDBC_XDATASOURCE_HPP_ #include <com/sun/star/sdbc/XDataSource.hpp> -#endif -#ifndef _DBHELPER_DBEXCEPTION_HXX_ -#include <connectivity/dbexception.hxx> -#endif -#ifndef _COMPHELPER_BROADCASTHELPER_HXX_ +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/util/XURLTransformer.hpp> +#include <com/sun/star/view/XSelectionSupplier.hpp> +/** === end UNO includes === **/ + #include <comphelper/broadcasthelper.hxx> -#endif -#ifndef DBAUI_ICONTROLLER_HXX -#include "IController.hxx" -#endif -#ifndef INCLUDED_DBACCESSDLLAPI_H -#include "dbaccessdllapi.h" -#endif -#ifndef COMPHELPER_NAMEDVALUECOLLECTION_HXX #include <comphelper/namedvaluecollection.hxx> -#endif +#include <comphelper/stl_types.hxx> +#include <connectivity/dbexception.hxx> +#include <cppuhelper/compbase1.hxx> +#include <cppuhelper/compbase8.hxx> +#include <cppuhelper/interfacecontainer.h> #include <boost/optional.hpp> -#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ -#include <com/sun/star/uno/XComponentContext.hpp> -#endif class Window; class VCLXWindow; @@ -287,7 +240,7 @@ ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xUrlTransformer; // needed sometimes ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceFactory; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > m_xCurrentFrame;// the frame we're residing in + ControllerFrame m_aCurrentFrame; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatcher; // for intercepting dispatches ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatcher; // dito ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xDatabaseContext; @@ -296,7 +249,6 @@ sal_Bool m_bPreview; sal_Bool m_bReadOnly; - sal_Bool m_bFrameUiActive : 1; // updated in ::frameAction sal_Bool m_bCurrentlyModified : 1; @@ -318,14 +270,19 @@ The help id to dispatch. */ void openHelpAgent(sal_Int32 _nHelpId); + /** open the help agent for the given help url. @param _pHelpStringURL The help url to dispatch. */ - void openHelpAgent(rtl::OUString const& _suHelpStringURL ); - // void openHelpAgent(URL aURL); + void openHelpAgent( const rtl::OUString& _suHelpStringURL ); - void openHelpAgent(com::sun::star::util::URL aURL); + /** opens the given Help URL in the help agent + + The URL does not need to be parsed already, it is passed through + XURLTransformer::parseStrict before it is used. + */ + void openHelpAgent( const ::com::sun::star::util::URL& _rURL ); // closes the task when possible void closeTask(); @@ -419,6 +376,9 @@ */ virtual void updateTitle( ); + virtual void startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); + virtual void stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); + virtual ~OGenericUnoController(); private: @@ -431,9 +391,6 @@ sal_Bool ImplInvalidateTBItem(sal_uInt16 nId, const FeatureState& rState); void ImplBroadcastFeatureState(const ::rtl::OUString& _rFeature, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener, sal_Bool _bIgnoreCache); - sal_Bool startFrameListening( ); - void stopFrameListening( ); - // link methods DECL_LINK(OnAsyncInvalidateAll, void*); DECL_LINK(OnAsyncCloseTask, void*); @@ -475,7 +432,8 @@ virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const; virtual sal_Bool isCommandEnabled(const ::rtl::OUString& _rCompleteCommandURL) const; - virtual sal_Bool isDataSourceReadOnly() const { return sal_False; } + virtual sal_Bool isDataSourceReadOnly() const; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getAssociatedModel() const; // misc virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const; @@ -501,8 +459,8 @@ virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ) = 0; virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) 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 ){ return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > (); }; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame(void) throw( ::com::sun::star::uno::RuntimeException ){ return m_xCurrentFrame; }; + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException ); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame(void) throw( ::com::sun::star::uno::RuntimeException ); // ::com::sun::star::frame::XDispatch virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException); @@ -520,7 +478,7 @@ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw( ::com::sun::star::uno::RuntimeException ); // ::com::sun::star::lang::XComponent - virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException) {OGenericUnoController_COMPBASE::dispose(); } + virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL disposing(); virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
