Tag: cws_dev300_dba30d
User: fs      
Date: 2008-06-01 20:52:17+0000
Modified:
   dba/dbaccess/inc/IController.hxx
   dba/dbaccess/inc/genericcontroller.hxx

Log:
 #i80943# +registerCommandURL

File Changes:

Directory: /dba/dbaccess/inc/
=============================

File [changed]: IController.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/IController.hxx?r1=1.5.30.1&r2=1.5.30.2
Delta lines:  +17 -3
--------------------
--- IController.hxx     2008-05-28 21:43:45+0000        1.5.30.1
+++ IController.hxx     2008-06-01 20:52:14+0000        1.5.30.2
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: IController.hxx,v $
- * $Revision: 1.5.30.1 $
+ * $Revision: 1.5.30.2 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -101,11 +101,25 @@
                */
         virtual sal_Bool isCommandEnabled( const ::rtl::OUString& 
_rCompleteCommandURL ) const = 0;
 
+        /** registers a command URL, giving it a unique name
+
+            If you call this with a command URL which is supported by the 
controller, then
+            you will simply get the controller's internal numeric shortcut to 
this command.
+
+            If you call this with a command URL which is not supported by the 
controller, then
+            you will get a new ID, which is unique during the lifetime of the 
controller.
+
+            If the command URL is invalid, or the controller cannot register 
new commands anymore,
+            then 0 is returned.
+        */
+        virtual sal_uInt16
+                        registerCommandURL( const ::rtl::OUString& 
_rCompleteCommandURL ) = 0;
+
                /** notifyHiContrastChanged will be called when the hicontrast 
mode changed.
                        @param  _bHiContrast
                                <TRUE/> when in hicontrast mode.
                */
-               virtual void notifyHiContrastChanged() {}
+               virtual void notifyHiContrastChanged() = 0;
 
                /** checks if the selected data source is read only
                        @return 
@@ -118,7 +132,7 @@
             This must be the same model as returned by XController::getModel, 
and might be <NULL/> when
             the controller does not have an own model.
         */
-               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XController > SAL_CALL
+               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XController >
                 getXController(void) throw( 
::com::sun::star::uno::RuntimeException ) = 0;
 
         /** allows interception of user input, aka mouse clicks and key events

File [changed]: genericcontroller.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/inc/genericcontroller.hxx?r1=1.10.28.1&r2=1.10.28.2
Delta lines:  +19 -7
--------------------
--- genericcontroller.hxx       2008-05-28 21:44:09+0000        1.10.28.1
+++ genericcontroller.hxx       2008-06-01 20:52:14+0000        1.10.28.2
@@ -7,7 +7,7 @@
  * OpenOffice.org - a multi-platform office productivity suite
  *
  * $RCSfile: genericcontroller.hxx,v $
- * $Revision: 1.10.28.1 $
+ * $Revision: 1.10.28.2 $
  *
  * This file is part of OpenOffice.org.
  *
@@ -198,6 +198,7 @@
                                                 ,   
::com::sun::star::awt::XUserInputInterception
                                                 >   OGenericUnoController_Base;
 
+    struct OGenericUnoController_Data;
        // ====================================================================
        class DBACCESS_DLLPUBLIC OGenericUnoController
                                 :public OGenericUnoController_MBASE
@@ -208,7 +209,10 @@
                SupportedFeatures                       m_aSupportedFeatures;
         ::comphelper::NamedValueCollection
                                         m_aInitParameters;
-        ::sfx2::UserInputInterception   m_aUserInputInterception;
+
+        ::std::auto_ptr< OGenericUnoController_Data >
+                                        m_pData;
+
 #ifdef DBG_UTIL 
         bool    m_bDescribingSupportedFeatures;
 #endif
@@ -305,7 +309,7 @@
                // state of a feature. 'feature' may be the handle of a 
::com::sun::star::util::URL somebody requested a dispatch interface for OR a 
toolbar slot.
                virtual FeatureState    GetState(sal_uInt16 nId) const;
                // execute a feature
-               virtual void                    Execute(sal_uInt16 nId , const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& 
aArgs) = 0;
+               virtual void                    Execute(sal_uInt16 nId , const 
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& 
aArgs);
 
         /** describes a feature supported by the controller
 
@@ -335,7 +339,11 @@
         // gets the URL which the given id is assigned to
                ::com::sun::star::util::URL getURLForId(sal_Int32 _nId) const;
 
-        void fillSupportedFeatures();
+        /** determines whether the given feature ID denotes a user-defined 
feature
+
+            @see IController::registerCommandURL
+        */
+        bool    isUserDefinedFeature( const sal_uInt16 nFeatureId );
 
                // connect to a datasource
                ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XConnection > connect(
@@ -380,8 +388,10 @@
         virtual void    stopFrameListening( const 
::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
 
         virtual ~OGenericUnoController();
+
        private:
-                       // invalidate features - implementation
+        void fillSupportedFeatures();
+
                void InvalidateAll_Impl();
                void InvalidateFeature_Impl();
 
@@ -431,8 +441,10 @@
                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_uInt16 registerCommandURL( const ::rtl::OUString& 
_rCompleteCommandURL );
+        virtual void notifyHiContrastChanged();
                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 );
+               virtual ::com::sun::star::uno::Reference< 
::com::sun::star::frame::XController > getXController() throw( 
::com::sun::star::uno::RuntimeException );
         virtual bool interceptUserInput( const NotifyEvent& _rEvent );
 
         // misc




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

Reply via email to