summaryrefslogtreecommitdiff
path: root/dbaccess/inc/genericcontroller.hxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 11:28:36 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 11:28:36 +0000
commit9130a51b589c22843f8695f579d25a63bfbf4831 (patch)
treee22c5592485bbbebf6545b81f5ddb1cc5e9407f9 /dbaccess/inc/genericcontroller.hxx
parent0a4d27639bce293d2a534d9b4eee8a5673742bd6 (diff)
INTEGRATION: CWS dba30d (1.10.28); FILE MERGED
2008/06/11 20:24:02 fs 1.10.28.4: during #i80943#: don't implement XSelectionSupplier (empty) if only a few derived classes need it 2008/06/10 06:39:58 fs 1.10.28.3: RESYNC: (1.10-1.11); FILE MERGED 2008/06/01 20:52:14 fs 1.10.28.2: #i80943# +registerCommandURL 2008/05/28 21:44:09 fs 1.10.28.1: #i84016# +XUserInputInterception
Diffstat (limited to 'dbaccess/inc/genericcontroller.hxx')
-rw-r--r--dbaccess/inc/genericcontroller.hxx48
1 files changed, 30 insertions, 18 deletions
diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx
index 977822506b64..4a75355c7657 100644
--- a/dbaccess/inc/genericcontroller.hxx
+++ b/dbaccess/inc/genericcontroller.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: genericcontroller.hxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -54,8 +54,8 @@
#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>
+#include <com/sun/star/awt/XUserInputInterception.hpp>
/** === end UNO includes === **/
#include <comphelper/broadcasthelper.hxx>
@@ -66,6 +66,7 @@
#include <cppuhelper/interfacecontainer.h>
#include <boost/optional.hpp>
+#include <sfx2/userinputinterception.hxx>
class Window;
class VCLXWindow;
@@ -185,7 +186,6 @@ namespace dbaui
typedef ::cppu::WeakComponentImplHelper11 < ::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
@@ -193,8 +193,10 @@ namespace dbaui
, ::com::sun::star::frame::XController2
, ::com::sun::star::frame::XTitle
, ::com::sun::star::frame::XTitleChangeBroadcaster
+ , ::com::sun::star::awt::XUserInputInterception
> OGenericUnoController_Base;
+ struct OGenericUnoController_Data;
// ====================================================================
class DBACCESS_DLLPUBLIC OGenericUnoController
:public OGenericUnoController_MBASE
@@ -202,10 +204,13 @@ namespace dbaui
,public IController
{
private:
- SupportedFeatures m_aSupportedFeatures; // look at the name
-
+ SupportedFeatures m_aSupportedFeatures;
::comphelper::NamedValueCollection
- m_aInitParameters;
+ m_aInitParameters;
+
+ ::std::auto_ptr< OGenericUnoController_Data >
+ m_pData;
+
#ifdef DBG_UTIL
bool m_bDescribingSupportedFeatures;
#endif
@@ -227,8 +232,6 @@ namespace dbaui
FeaturePairDeque m_aFeaturesToInvalidate;
- ::cppu::OInterfaceContainerHelper
- m_aSelectionListeners;
::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
@@ -302,7 +305,7 @@ namespace dbaui
// 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
@@ -332,7 +335,11 @@ namespace dbaui
// 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(
@@ -377,8 +384,10 @@ namespace dbaui
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();
@@ -426,8 +435,11 @@ namespace dbaui
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
virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
@@ -481,12 +493,6 @@ namespace dbaui
// lang::XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
- // XSelectionSupplier
- virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-
// XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException) = 0;
virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
@@ -504,6 +510,12 @@ namespace dbaui
virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
+ // XUserInputInterception
+ virtual void SAL_CALL addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
+
protected:
OGenericUnoController(); // never implemented
};