diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-03 16:25:42 -0500 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-09-14 07:52:56 +0000 |
commit | a6754e5a09afd62ae431a279fa30be5e0506ad39 (patch) | |
tree | 716c01ad1acd69b330a2e543ef085071d6ba9389 /svtools/source | |
parent | b68f053b765f37fc43fc2d67c57686c121acdfbf (diff) |
gridfixes: re-enable the mouse listeners which got lost
in a previous change.
Do this by making the TableControl a CompoundControl,
so VCL cares for everything which is needed. Consequently,
get rid of the manual notification of the respective VCLEVENT_*'s,
and everything related to it
Change-Id: Id8872680b744e1171be916f6f66a4968e9d6567a
Reviewed-on: https://gerrit.libreoffice.org/553
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/table/tablecontrol.cxx | 18 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.cxx | 2 | ||||
-rw-r--r-- | svtools/source/table/tabledatawindow.hxx | 6 |
3 files changed, 2 insertions, 24 deletions
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 99053fead039..1d1129f8957f 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -59,14 +59,14 @@ namespace svt { namespace table ,m_pImpl( new TableControl_Impl( *this ) ) { TableDataWindow& rDataWindow = m_pImpl->getDataWindow(); - rDataWindow.SetMouseButtonDownHdl( LINK( this, TableControl, ImplMouseButtonDownHdl ) ); - rDataWindow.SetMouseButtonUpHdl( LINK( this, TableControl, ImplMouseButtonUpHdl ) ); rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); // by default, use the background as determined by the style settings const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() ); SetBackground( Wallpaper( aWindowColor ) ); SetFillColor( aWindowColor ); + + SetCompoundControl( true ); } // ----------------------------------------------------------------------------------------------------------------- @@ -662,20 +662,6 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - IMPL_LINK( TableControl, ImplMouseButtonDownHdl, MouseEvent*, pData ) - { - CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONDOWN, pData ); - return 1; - } - - //------------------------------------------------------------------------------------------------------------------ - IMPL_LINK( TableControl, ImplMouseButtonUpHdl, MouseEvent*, pData ) - { - CallEventListeners( VCLEVENT_WINDOW_MOUSEBUTTONUP, pData ); - return 1; - } - - //------------------------------------------------------------------------------------------------------------------ void TableControl::Select() { ImplCallEventListenersAndHandler( VCLEVENT_TABLEROW_SELECT, m_pImpl->getSelectHandler(), this ); diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx index 4f69758f4307..09ca76fdc7bf 100644 --- a/svtools/source/table/tabledatawindow.cxx +++ b/svtools/source/table/tabledatawindow.cxx @@ -205,7 +205,6 @@ namespace svt { namespace table { m_aSelectHdl.Call( NULL ); } - m_aMouseButtonDownHdl.Call((MouseEvent*) &rMEvt); } //------------------------------------------------------------------------------------------------------------------ @@ -214,7 +213,6 @@ namespace svt { namespace table if ( !m_rTableControl.getInputHandler()->MouseButtonUp( m_rTableControl, rMEvt ) ) Window::MouseButtonUp( rMEvt ); - m_aMouseButtonUpHdl.Call((MouseEvent*) &rMEvt); m_rTableControl.getAntiImpl().GrabFocus(); } diff --git a/svtools/source/table/tabledatawindow.hxx b/svtools/source/table/tabledatawindow.hxx index 96f178a62801..c3a126ad6e9a 100644 --- a/svtools/source/table/tabledatawindow.hxx +++ b/svtools/source/table/tabledatawindow.hxx @@ -51,8 +51,6 @@ namespace svt { namespace table friend class TableFunctionSet; private: TableControl_Impl& m_rTableControl; - Link m_aMouseButtonDownHdl; - Link m_aMouseButtonUpHdl; Link m_aSelectHdl; sal_uLong m_nTipWindowHandle; @@ -60,10 +58,6 @@ namespace svt { namespace table TableDataWindow( TableControl_Impl& _rTableControl ); ~TableDataWindow(); - inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; } - inline const Link& GetMouseButtonDownHdl() const { return m_aMouseButtonDownHdl; } - inline void SetMouseButtonUpHdl( const Link& rLink ) { m_aMouseButtonUpHdl = rLink; } - inline const Link& GetMouseButtonUpHdl() const { return m_aMouseButtonUpHdl; } inline void SetSelectHdl( const Link& rLink ) { m_aSelectHdl = rLink; } inline const Link& GetSelectHdl() const { return m_aSelectHdl; } |