[Libreoffice-commits] .: svtools/inc svtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 00:53:15 PDT 2012
svtools/inc/svtools/table/tablecontrol.hxx | 3 ---
svtools/source/table/tablecontrol.cxx | 18 ++----------------
svtools/source/table/tabledatawindow.cxx | 2 --
svtools/source/table/tabledatawindow.hxx | 6 ------
4 files changed, 2 insertions(+), 27 deletions(-)
New commits:
commit a6754e5a09afd62ae431a279fa30be5e0506ad39
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Mon Sep 3 16:25:42 2012 -0500
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 at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/svtools/inc/svtools/table/tablecontrol.hxx b/svtools/inc/svtools/table/tablecontrol.hxx
index c3078d8..8f297ed 100644
--- a/svtools/inc/svtools/table/tablecontrol.hxx
+++ b/svtools/inc/svtools/table/tablecontrol.hxx
@@ -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:
diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx
index 99053fe..1d1129f 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 4f69758..09ca76f 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 96f178a..c3a126a 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; }
More information about the Libreoffice-commits
mailing list