Kaydet (Commit) a6754e5a authored tarafından Norbert Thiebaud's avatar Norbert Thiebaud Kaydeden (comit) Miklos Vajna

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/553Reviewed-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
Tested-by: 's avatarMiklos Vajna <vmiklos@suse.cz>
üst b68f053b
......@@ -173,9 +173,6 @@ namespace svt { namespace table
// .............................................................................................................
private:
DECL_DLLPRIVATE_LINK( ImplMouseButtonDownHdl, MouseEvent* );
DECL_DLLPRIVATE_LINK( ImplMouseButtonUpHdl, MouseEvent* );
DECL_DLLPRIVATE_LINK( ImplSelectHdl, void* );
private:
......
......@@ -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 );
}
// -----------------------------------------------------------------------------------------------------------------
......@@ -661,20 +661,6 @@ namespace svt { namespace table
return 1;
}
//------------------------------------------------------------------------------------------------------------------
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()
{
......
......@@ -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();
}
......
......@@ -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; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment