User: kz      
Date: 2008-03-06 17:56:02+0000
Modified:
   dba/dbaccess/inc/genericcontroller.hxx

Log:
 INTEGRATION: CWS odbmacros2 (1.5.82); FILE MERGED
 2008/01/26 21:17:51 fs 1.5.82.5: removed unused n_aAsyncLoadSafety
 2008/01/24 10:31:26 fs 1.5.82.4: #i49133# support for making features 
invisible (i.e. they disappear from their menu/toolbar)
 2007/12/19 07:14:07 fs 1.5.82.3: #i10000#
 2007/12/18 21:20:41 fs 1.5.82.2: #i49133# some re-factoring
 2007/12/13 11:19:22 fs 1.5.82.1: #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.6&r2=1.7
Delta lines:  +60 -108
----------------------
--- genericcontroller.hxx       2008-03-05 17:04:19+0000        1.6
+++ genericcontroller.hxx       2008-03-06 17:55:59+0000        1.7
@@ -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>
+#include <com/sun/star/lang/XMultiServiceFactory.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/compbase9.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;
@@ -123,21 +76,6 @@
 {
        class ODataView;
 
-       typedef ::comphelper::OBaseMutex        OGenericUnoController_MBASE;
-
-       typedef ::cppu::WeakComponentImplHelper8        <       
::com::sun::star::frame::XDispatch
-                                                                               
                ,       ::com::sun::star::frame::XDispatchProviderInterceptor
-                                                                               
                ,       ::com::sun::star::util::XModifyListener
-                                                ,      
::com::sun::star::view::XSelectionSupplier
-                                                                               
                ,       ::com::sun::star::frame::XFrameActionListener
-                                                                               
                ,       ::com::sun::star::lang::XInitialization
-                                                                               
                ,       ::com::sun::star::lang::XServiceInfo
-                                                                               
                ,       ::com::sun::star::frame::XDispatchInformationProvider
-                                                                               
                >       OGenericUnoController_COMPBASE;
-
-       typedef ::cppu::ImplHelper1     <       
::com::sun::star::frame::XController
-                                                               >       
OGenericUnoController_CTRBASE;
-
        // ====================================================================
        // = optional
        // ====================================================================
@@ -245,10 +183,23 @@
                }
        };
 
+       typedef ::comphelper::OBaseMutex        OGenericUnoController_MBASE;
+
+    typedef ::cppu::WeakComponentImplHelper9    <   
::com::sun::star::frame::XDispatch
+                                                ,   
::com::sun::star::frame::XDispatchProviderInterceptor
+                                                ,   
::com::sun::star::util::XModifyListener
+                                                ,   
::com::sun::star::view::XSelectionSupplier
+                                                ,   
::com::sun::star::frame::XFrameActionListener
+                                                ,   
::com::sun::star::lang::XInitialization
+                                                ,   
::com::sun::star::lang::XServiceInfo
+                                                ,   
::com::sun::star::frame::XDispatchInformationProvider
+                                                ,   
::com::sun::star::frame::XController
+                                                >   OGenericUnoController_Base;
+
        // ====================================================================
-       class DBACCESS_DLLPUBLIC OGenericUnoController  :public 
OGenericUnoController_MBASE
-                                                               ,public 
OGenericUnoController_COMPBASE
-                                                               ,public 
OGenericUnoController_CTRBASE
+       class DBACCESS_DLLPUBLIC OGenericUnoController
+                                :public OGenericUnoController_MBASE
+                                                               ,public 
OGenericUnoController_Base
                                                                ,public 
IController
        {
     private:
@@ -279,7 +230,6 @@
 
         ::cppu::OInterfaceContainerHelper                                      
                                                                        
                                 m_aSelectionListeners;
-               ::osl::Mutex                    m_aAsyncLoadSafety;             
// for multi-thread access to our members
                ::osl::Mutex                    m_aFeatureMutex;                
// locked when features are append to or remove from deque
                StateCache                              m_aStateCache;          
        // save the current status of feature state
                Dispatch                                m_arrStatusListener;    
// all our listeners where we dispatch status changes
@@ -288,7 +238,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;
@@ -297,7 +247,6 @@
                sal_Bool                                m_bPreview;
                sal_Bool                                m_bReadOnly;
 
-               sal_Bool                                m_bFrameUiActive        
        : 1;            // updated in ::frameAction
                sal_Bool                                m_bCurrentlyModified    
: 1;
                
 
@@ -305,11 +254,11 @@
         // ----------------------------------------------------------------
         // attribute access
                ::osl::Mutex&                           getMutex( )             
                { return OGenericUnoController_MBASE::m_aMutex; }
-               ::cppu::OBroadcastHelper&       getBroadcastHelper()    { 
return OGenericUnoController_COMPBASE::rBHelper; }
+               ::cppu::OBroadcastHelper&       getBroadcastHelper()    { 
return OGenericUnoController_Base::rBHelper; }
 
         // ----------------------------------------------------------------
         // methods
-        OGenericUnoController(const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM);
+        OGenericUnoController( const ::com::sun::star::uno::Reference< 
::com::sun::star::lang::XMultiServiceFactory >& _rM );
         const ::comphelper::NamedValueCollection&
                                     getInitParams() const   { return 
m_aInitParameters; }
 
@@ -319,14 +268,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 );
+
+        /** opens the given Help URL in the help agent
 
-               void openHelpAgent(com::sun::star::util::URL aURL);
+            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();
@@ -420,6 +374,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:
@@ -432,9 +389,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*);
@@ -476,7 +430,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::XController > SAL_CALL getXController() throw( 
::com::sun::star::uno::RuntimeException );
 
         // misc
         virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
@@ -488,22 +443,17 @@
                virtual void SAL_CALL modified(const 
::com::sun::star::lang::EventObject& aEvent) throw( 
::com::sun::star::uno::RuntimeException );
 
                // XInterface
-               virtual ::com::sun::star::uno::Any      SAL_CALL 
queryInterface(const ::com::sun::star::uno::Type& _rType) throw 
(::com::sun::star::uno::RuntimeException);
                virtual void SAL_CALL acquire(  ) throw ();
                virtual void SAL_CALL release(  ) throw ();
 
-               // XTypeProvider
-               virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw 
(::com::sun::star::uno::RuntimeException);
-               virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId(  ) throw (::com::sun::star::uno::RuntimeException);
-
                // ::com::sun::star::frame::XController
                virtual void SAL_CALL attachFrame(const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) 
throw( ::com::sun::star::uno::RuntimeException );
                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 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);
@@ -521,7 +471,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);
@@ -546,6 +496,8 @@
         virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL 
getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
         virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::frame::DispatchInformation > SAL_CALL 
getConfigurableDispatchInformation( ::sal_Int16 ) throw 
(::com::sun::star::uno::RuntimeException);
 
+    protected:
+        OGenericUnoController();    // never implemented
        };
 }
 




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

Reply via email to