diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-09-14 11:18:01 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-09-14 11:18:01 +0000 |
commit | ea35f2f06cbb9507218af9c224d2ebdcaa2bec10 (patch) | |
tree | 2e492090fd9daf7f2a20ec4d1598496db6f1520c /svx/source/inc/gridcell.hxx | |
parent | 8570f88531e1b206f3fa63e10b308df9c57bb9c9 (diff) |
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
Diffstat (limited to 'svx/source/inc/gridcell.hxx')
-rw-r--r-- | svx/source/inc/gridcell.hxx | 199 |
1 files changed, 167 insertions, 32 deletions
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx index 6a552da6edb7..cb747e3a894c 100644 --- a/svx/source/inc/gridcell.hxx +++ b/svx/source/inc/gridcell.hxx @@ -42,20 +42,24 @@ #include <com/sun/star/form/XBoundControl.hpp> #include <com/sun/star/awt/XTextComponent.hpp> #include <com/sun/star/awt/XListBox.hpp> +#include <com/sun/star/awt/XComboBox.hpp> #include <com/sun/star/awt/TextAlign.hpp> #include <com/sun/star/awt/XControlModel.hpp> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/awt/XCheckBox.hpp> +#include <com/sun/star/awt/XButton.hpp> #include <com/sun/star/beans/XFastPropertySet.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/form/XChangeBroadcaster.hpp> /** === end UNO includes === **/ -#include <tools/rtti.hxx> - #include <comphelper/propmultiplex.hxx> #include <comphelper/componentcontext.hxx> - #include <cppuhelper/component.hxx> +#include <cppuhelper/implbase1.hxx> +#include <cppuhelper/implbase2.hxx> +#include <tools/diagnose_ex.h> +#include <tools/rtti.hxx> class DbCellControl; class Edit; @@ -282,7 +286,11 @@ public: virtual ~DbCellControl(); - Window* GetControl() const { return m_pWindow; } + Window& GetWindow() const + { + ENSURE_OR_THROW( m_pWindow, "no window" ); + return *m_pWindow; + } // control alignment inline sal_Bool isAlignedController() const { return m_bAlignedController; } @@ -732,20 +740,34 @@ protected: //================================================================== // Base class providing the access to a grid cell //================================================================== -class FmXGridCell : public ::cppu::OComponentHelper, - public ::com::sun::star::awt::XControl, - public ::com::sun::star::form::XBoundControl +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XControl + , ::com::sun::star::form::XBoundControl + > FmXGridCell_Base; +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XWindow + > FmXGridCell_WindowBase; +class FmXGridCell :public ::cppu::OComponentHelper + ,public FmXGridCell_Base + ,public FmXGridCell_WindowBase { protected: - ::osl::Mutex m_aMutex; - DbGridColumn* m_pColumn; - DbCellControl* m_pCellControl; + ::osl::Mutex m_aMutex; + DbGridColumn* m_pColumn; + DbCellControl* m_pCellControl; + +private: + ::cppu::OInterfaceContainerHelper m_aWindowListeners; + ::cppu::OInterfaceContainerHelper m_aFocusListeners; + ::cppu::OInterfaceContainerHelper m_aKeyListeners; + ::cppu::OInterfaceContainerHelper m_aMouseListeners; + ::cppu::OInterfaceContainerHelper m_aMouseMotionListeners; +protected: virtual ~FmXGridCell(); + public: TYPEINFO(); - FmXGridCell(DbGridColumn* pColumn, DbCellControl* pControl); - + FmXGridCell( DbGridColumn* pColumn, DbCellControl* pControl ); + void init(); DECLARE_UNO3_AGG_DEFAULTS(FmXGridCell, OComponentHelper); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); @@ -754,6 +776,7 @@ public: void SetTextLineColor(const Color& _rColor); // 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); // OComponentHelper @@ -781,6 +804,25 @@ public: virtual sal_Bool SAL_CALL getLock() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setLock(sal_Bool _bLock) throw(::com::sun::star::uno::RuntimeException); + // XWindow + virtual void SAL_CALL setPosSize( ::sal_Int32 X, ::sal_Int32 Y, ::sal_Int32 Width, ::sal_Int32 Height, ::sal_Int16 Flags ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::awt::Rectangle SAL_CALL getPosSize( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setVisible( ::sal_Bool Visible ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setEnable( ::sal_Bool Enable ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setFocus( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeFocusListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XFocusListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeKeyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeMouseListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeMouseMotionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseMotionListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePaintListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XPaintListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); + sal_Bool Commit() {return m_pCellControl->Commit();} void ImplInitWindow( Window& rParent, const InitWindowFacet _eInitWhat ) { m_pCellControl->ImplInitWindow( rParent, _eInitWhat ); } @@ -788,6 +830,17 @@ public: sal_Bool isAlignedController() const { return m_pCellControl->isAlignedController(); } void AlignControl(sal_Int16 nAlignment) { m_pCellControl->AlignControl(nAlignment);} + +protected: + virtual Window* getEventWindow() const; + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + + // default implementations call our focus listeners, don't forget to call them if you override this + virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent ); + virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent ); + +private: + DECL_LINK( OnWindowEvent, VclWindowEvent* ); }; //================================================================== @@ -795,7 +848,10 @@ class FmXDataCell : public FmXGridCell { public: TYPEINFO(); - FmXDataCell(DbGridColumn* pColumn, DbCellControl* pControl):FmXGridCell(pColumn, pControl){} + FmXDataCell( DbGridColumn* pColumn, DbCellControl& _rControl ) + :FmXGridCell( pColumn, &_rControl ) + { + } virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, @@ -831,11 +887,7 @@ protected: public: TYPEINFO(); - FmXTextCell( DbGridColumn* pColumn, DbCellControl* pControl ) - :FmXDataCell( pColumn, pControl ) - ,m_bFastPaint( sal_True ) - { - } + FmXTextCell( DbGridColumn* pColumn, DbCellControl& _rControl ); virtual void PaintFieldToCell(OutputDevice& rDev, const Rectangle& rRect, @@ -849,23 +901,31 @@ public: }; //================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent + , ::com::sun::star::form::XChangeBroadcaster + > FmXEditCell_Base; class FmXEditCell : public FmXTextCell, - public ::com::sun::star::awt::XTextComponent + public FmXEditCell_Base { +private: + ::rtl::OUString m_sValueOnEnter; + protected: ::cppu::OInterfaceContainerHelper m_aTextListeners; + ::cppu::OInterfaceContainerHelper m_aChangeListeners; ::svt::IEditImplementation* m_pEditImplementation; bool m_bOwnEditImplementation; virtual ~FmXEditCell(); public: - FmXEditCell(DbGridColumn* pColumn, DbCellControl* pControl); + FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl ); DECLARE_UNO3_AGG_DEFAULTS(FmXEditCell, FmXTextCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); // 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); // OComponentHelper virtual void SAL_CALL disposing(); @@ -884,26 +944,43 @@ public: virtual void SAL_CALL setMaxTextLen(sal_Int16 nLen) throw(::com::sun::star::uno::RuntimeException); virtual sal_Int16 SAL_CALL getMaxTextLen() throw(::com::sun::star::uno::RuntimeException); + // XChangeBroadcaster + virtual void SAL_CALL addChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::form::XChangeListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); + protected: - DECL_LINK( OnTextChanged, void* ); + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + + virtual void onFocusGained( const ::com::sun::star::awt::FocusEvent& _rEvent ); + virtual void onFocusLost( const ::com::sun::star::awt::FocusEvent& _rEvent ); + +private: + void onTextChanged(); }; //================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XCheckBox + , ::com::sun::star::awt::XButton + > FmXCheckBoxCell_Base; class FmXCheckBoxCell : public FmXDataCell, - public ::com::sun::star::awt::XCheckBox + public FmXCheckBoxCell_Base { ::cppu::OInterfaceContainerHelper m_aItemListeners; + ::cppu::OInterfaceContainerHelper m_aActionListeners; + ::rtl::OUString m_aActionCommand; CheckBox* m_pBox; + protected: virtual ~FmXCheckBoxCell(); -public: - FmXCheckBoxCell(DbGridColumn* pColumn, DbCellControl* pControl); +public: + FmXCheckBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); // UNO DECLARE_UNO3_AGG_DEFAULTS(FmXCheckBoxCell, FmXDataCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); 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); // OComponentHelper virtual void SAL_CALL disposing(); @@ -916,26 +993,37 @@ public: virtual void SAL_CALL setLabel(const ::rtl::OUString& Label) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL enableTriState(sal_Bool b) throw(::com::sun::star::uno::RuntimeException); + // XButton + virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& l ) throw (::com::sun::star::uno::RuntimeException); + //virtual void SAL_CALL setLabel( const ::rtl::OUString& Label ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setActionCommand( const ::rtl::OUString& Command ) throw (::com::sun::star::uno::RuntimeException); + protected: - DECL_LINK( OnClick, void* ); + virtual Window* getEventWindow() const; + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); }; //================================================================== -class FmXListBoxCell : public FmXTextCell, - public ::com::sun::star::awt::XListBox +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XListBox + > FmXListBoxCell_Base; +class FmXListBoxCell :public FmXTextCell + ,public FmXListBoxCell_Base { ::cppu::OInterfaceContainerHelper m_aItemListeners, m_aActionListeners; ListBox* m_pBox; + protected: virtual ~FmXListBoxCell(); -public: - FmXListBoxCell(DbGridColumn* pColumn, DbCellControl* pControl); +public: + FmXListBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); 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); // OComponentHelper virtual void SAL_CALL disposing(); @@ -965,14 +1053,60 @@ public: virtual void SAL_CALL SAL_CALL makeVisible(sal_Int16 nEntry) throw(::com::sun::star::uno::RuntimeException); protected: - DECL_LINK( OnSelect, VclWindowEvent* ); + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); + DECL_LINK( OnDoubleClick, void* ); }; //================================================================== +typedef ::cppu::ImplHelper1 < ::com::sun::star::awt::XComboBox + > FmXComboBoxCell_Base; +class FmXComboBoxCell :public FmXTextCell + ,public FmXComboBoxCell_Base +{ +private: + ::cppu::OInterfaceContainerHelper m_aItemListeners, + m_aActionListeners; + ComboBox* m_pComboBox; + +protected: + virtual ~FmXComboBoxCell(); + +public: + FmXComboBoxCell( DbGridColumn* pColumn, DbCellControl& _rControl ); + + DECLARE_UNO3_AGG_DEFAULTS(FmXListBoxCell, FmXTextCell); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); + 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); + + // OComponentHelper + virtual void SAL_CALL disposing(); + + // XComboBox + virtual void SAL_CALL addItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItemListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XItemListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeActionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XActionListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addItem( const ::rtl::OUString& _Item, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addItems( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _Items, ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeItems( ::sal_Int16 nPos, ::sal_Int16 nCount ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getItemCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getItem( ::sal_Int16 _Pos ) throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getItems( ) throw (::com::sun::star::uno::RuntimeException); + virtual ::sal_Int16 SAL_CALL getDropDownLineCount( ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDropDownLineCount( ::sal_Int16 _Lines ) throw (::com::sun::star::uno::RuntimeException); + +protected: + virtual void onWindowEvent( const ULONG _nEventId, const Window& _rWindow, const void* _pEventData ); +}; + +//================================================================== +typedef ::cppu::ImplHelper2 < ::com::sun::star::awt::XTextComponent + , ::com::sun::star::lang::XUnoTunnel + > FmXFilterCell_Base; class FmXFilterCell :public FmXGridCell - ,public ::com::sun::star::awt::XTextComponent - ,public ::com::sun::star::lang::XUnoTunnel + ,public FmXFilterCell_Base { ::cppu::OInterfaceContainerHelper m_aTextListeners; protected: @@ -985,6 +1119,7 @@ public: DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell); virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& _rType ) throw(::com::sun::star::uno::RuntimeException); 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); // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); |