diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-03-19 15:05:59 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-03-19 15:05:59 +0000 |
commit | 8047ec508abcb29f1dbdf12735e1f487c50e4362 (patch) | |
tree | 1f540a3ebdbbcaef311c8ca1af0e2fe61e1f1cf2 /sc/inc/viewuno.hxx | |
parent | INTEGRATION: CWS sab008 (1.3.260); FILE MERGED (diff) | |
download | core-8047ec508abcb29f1dbdf12735e1f487c50e4362.tar.gz core-8047ec508abcb29f1dbdf12735e1f487c50e4362.zip |
INTEGRATION: CWS sab008 (1.6.230); FILE MERGED
2004/01/29 18:14:37 sab 1.6.230.2: #115009#; add exceptions and fix case problems
2004/01/23 12:17:56 sab 1.6.230.1: #115009#; add XEnhancedMouseClickBroadcaster and XActivationBroadcaster
Diffstat (limited to 'sc/inc/viewuno.hxx')
-rw-r--r-- | sc/inc/viewuno.hxx | 52 |
1 files changed, 49 insertions, 3 deletions
diff --git a/sc/inc/viewuno.hxx b/sc/inc/viewuno.hxx index 0f49ddf4d329..e729dd351122 100644 --- a/sc/inc/viewuno.hxx +++ b/sc/inc/viewuno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: viewuno.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: sab $ $Date: 2002-10-01 08:40:42 $ + * last change: $Author: obo $ $Date: 2004-03-19 16:05:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,12 @@ #ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETVIEW_HPP_ #include <com/sun/star/sheet/XSpreadsheetView.hpp> #endif +#ifndef _COM_SUN_STAR_SHEET_XENHANCEDMOUSECLICKBROADCASTER_HPP_ +#include <com/sun/star/sheet/XEnhancedMouseClickBroadcaster.hpp> +#endif +#ifndef _COM_SUN_STAR_SHEET_XACTIVATIONBROADCASTER_HPP_ +#include <com/sun/star/sheet/XActivationBroadcaster.hpp> +#endif #ifndef _COM_SUN_STAR_SHEET_XVIEWPANE_HPP_ #include <com/sun/star/sheet/XViewPane.hpp> #endif @@ -135,6 +141,14 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >* XViewPropertyChangeListenerPtr; SV_DECL_PTRARR_DEL( XViewPropertyChangeListenerArr_Impl, XViewPropertyChangeListenerPtr, 4, 4 ); +typedef ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XEnhancedMouseClickHandler >* XMouseClickHandlerPtr; +SV_DECL_PTRARR_DEL( XMouseClickHandlerArr_Impl, XMouseClickHandlerPtr, 4, 4 ); + +typedef ::com::sun::star::uno::Reference< + ::com::sun::star::sheet::XActivationEventListener >* XActivationEventListenerPtr; +SV_DECL_PTRARR_DEL( XActivationEventListenerArr_Impl, XActivationEventListenerPtr, 4, 4 ); + // ScViewPaneBase not derived from OWeakObject // to avoid duplicate OWeakObject in ScTabViewObj @@ -216,12 +230,13 @@ public: virtual void SAL_CALL release() throw(); }; - // OWeakObject is base of SfxBaseController -> use ScViewPaneBase class ScTabViewObj : public ScViewPaneBase, public SfxBaseController, public com::sun::star::sheet::XSpreadsheetView, + public com::sun::star::sheet::XEnhancedMouseClickBroadcaster, + public com::sun::star::sheet::XActivationBroadcaster, public com::sun::star::container::XEnumerationAccess, public com::sun::star::container::XIndexAccess, public com::sun::star::view::XSelectionSupplier, @@ -237,6 +252,8 @@ private: XRangeSelectionListenerArr_Impl aRangeSelListeners; XRangeSelectionChangeListenerArr_Impl aRangeChgListeners; XViewPropertyChangeListenerArr_Impl aPropertyChgListeners; + XMouseClickHandlerArr_Impl aMouseClickHandlers; + XActivationEventListenerArr_Impl aActivationListeners; sal_Bool bDrawSelModeSet; ScViewPaneObj* GetObjectByIndex_Impl(USHORT nIndex) const; @@ -245,11 +262,19 @@ private: INT16 GetZoomType(void) const; void SetZoomType(INT16 ZoomType); + com::sun::star::uno::Reference< com::sun::star::uno::XInterface > GetClickedObject(const Point& rPoint) const; + void StartMouseListening(); + void EndMouseListening(); + void StartActivationListening(); + void EndActivationListening(); + public: ScTabViewObj(); ScTabViewObj(ScTabViewShell* pViewSh); virtual ~ScTabViewObj(); + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -258,6 +283,9 @@ public: void SelectionChanged(); void VisAreaChanged(); + sal_Bool IsMouseListening() { return aMouseClickHandlers.Count() > 0; } + sal_Bool MousePressed( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool MouseReleased( const ::com::sun::star::awt::MouseEvent& e ) throw (::com::sun::star::uno::RuntimeException); void RangeSelDone( const String& rText ); void RangeSelAborted( const String& rText ); @@ -342,6 +370,24 @@ public: ::com::sun::star::sheet::XSpreadsheet >& xActiveSheet ) throw(::com::sun::star::uno::RuntimeException); + //XEnhancedMouseClickBroadcaster + + virtual void SAL_CALL addEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeEnhancedMouseClickHandler( const ::com::sun::star::uno::Reference< + ::com::sun::star::awt::XEnhancedMouseClickHandler >& aListener ) + throw (::com::sun::star::uno::RuntimeException); + + //XActivationBroadcaster + + virtual void SAL_CALL addActivationEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::sheet::XActivationEventListener >& aListener ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActivationEventListener( const ::com::sun::star::uno::Reference< + ::com::sun::star::sheet::XActivationEventListener >& aListener ) + throw (::com::sun::star::uno::RuntimeException); + // XViewSplitable virtual sal_Bool SAL_CALL getIsWindowSplit() throw(::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getSplitHorizontal() throw(::com::sun::star::uno::RuntimeException); |