[Libreoffice-commits] core.git: 2 commits - cui/source framework/inc framework/source include/vcl svx/source
Noel Grandin
noelgrandin at gmail.com
Thu Sep 3 23:32:57 PDT 2015
cui/source/inc/cuitabline.hxx | 2 +-
cui/source/tabpages/tpline.cxx | 3 +--
framework/inc/uielement/statusbarmanager.hxx | 4 ++--
framework/source/uielement/statusbarmanager.cxx | 12 ++++--------
include/vcl/menubtn.hxx | 6 +++---
include/vcl/status.hxx | 24 ++++++++++++------------
svx/source/form/datanavi.cxx | 5 ++---
svx/source/inc/datanavi.hxx | 6 +++---
8 files changed, 28 insertions(+), 34 deletions(-)
New commits:
commit 24d90b8aa8e49507d02aa87a0b726ec303a27518
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Thu Sep 3 18:37:52 2015 +0200
convert Link<> to typed
Change-Id: I936606b6fdbb5db50661bde68fc8472bb9dd8861
Reviewed-on: https://gerrit.libreoffice.org/18317
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/framework/inc/uielement/statusbarmanager.hxx b/framework/inc/uielement/statusbarmanager.hxx
index 0159a66..9dfeed3 100644
--- a/framework/inc/uielement/statusbarmanager.hxx
+++ b/framework/inc/uielement/statusbarmanager.hxx
@@ -86,8 +86,8 @@ class StatusBarManager : public ::cppu::WeakImplHelper<
void MouseMove( const MouseEvent& rMEvt );
void MouseButtonDown( const MouseEvent& rMEvt );
void MouseButtonUp( const MouseEvent& rMEvt );
- DECL_LINK(Click, void *);
- DECL_LINK(DoubleClick, void *);
+ DECL_LINK_TYPED(Click, StatusBar*, void);
+ DECL_LINK_TYPED(DoubleClick, StatusBar*, void);
void RemoveControllers();
OUString RetrieveLabelFromCommand( const OUString& aCmdURL );
diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx
index 5a034bb..cd44aa1 100644
--- a/framework/source/uielement/statusbarmanager.cxx
+++ b/framework/source/uielement/statusbarmanager.cxx
@@ -654,12 +654,12 @@ void StatusBarManager::MouseButtonUp( const MouseEvent& rMEvt )
MouseButton(rMEvt,&frame::XStatusbarController::mouseButtonUp);
}
-IMPL_LINK_NOARG(StatusBarManager, Click)
+IMPL_LINK_NOARG_TYPED(StatusBarManager, Click, StatusBar*, void)
{
SolarMutexGuard g;
if ( m_bDisposed )
- return 1;
+ return;
sal_uInt16 nId = m_pStatusBar->GetCurItemId();
StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
@@ -673,16 +673,14 @@ IMPL_LINK_NOARG(StatusBarManager, Click)
xController->click( aAWTPoint );
}
}
-
- return 1;
}
-IMPL_LINK_NOARG(StatusBarManager, DoubleClick)
+IMPL_LINK_NOARG_TYPED(StatusBarManager, DoubleClick, StatusBar*, void)
{
SolarMutexGuard g;
if ( m_bDisposed )
- return 1;
+ return;
sal_uInt16 nId = m_pStatusBar->GetCurItemId();
StatusBarControllerMap::const_iterator it = m_aControllerMap.find( nId );
@@ -696,8 +694,6 @@ IMPL_LINK_NOARG(StatusBarManager, DoubleClick)
xController->doubleClick( aAWTPoint );
}
}
-
- return 1;
}
}
diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx
index fda3c31..3367065 100644
--- a/include/vcl/status.hxx
+++ b/include/vcl/status.hxx
@@ -91,8 +91,8 @@ private:
bool mbProgressMode;
bool mbInUserDraw;
bool mbAdjustHiDPI;
- Link<> maClickHdl;
- Link<> maDoubleClickHdl;
+ Link<StatusBar*,void> maClickHdl;
+ Link<StatusBar*,void> maDoubleClickHdl;
using Window::ImplInit;
SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle );
@@ -149,21 +149,21 @@ public:
void Clear();
- sal_uInt16 GetItemCount() const;
- sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
- sal_uInt16 GetItemId( const Point& rPos ) const;
- sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
+ sal_uInt16 GetItemCount() const;
+ sal_uInt16 GetItemId( sal_uInt16 nPos ) const;
+ sal_uInt16 GetItemId( const Point& rPos ) const;
+ sal_uInt16 GetItemPos( sal_uInt16 nItemId ) const;
Rectangle GetItemRect( sal_uInt16 nItemId ) const;
Point GetItemTextPos( sal_uInt16 nItemId ) const;
- sal_uInt16 GetCurItemId() const { return mnCurItemId; }
+ sal_uInt16 GetCurItemId() const { return mnCurItemId; }
- sal_uLong GetItemWidth( sal_uInt16 nItemId ) const;
+ sal_uLong GetItemWidth( sal_uInt16 nItemId ) const;
StatusBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
long GetItemOffset( sal_uInt16 nItemId ) const;
void SetItemText( sal_uInt16 nItemId, const OUString& rText );
- const OUString& GetItemText( sal_uInt16 nItemId ) const;
+ const OUString& GetItemText( sal_uInt16 nItemId ) const;
void SetItemData( sal_uInt16 nItemId, void* pNewData );
void* GetItemData( sal_uInt16 nItemId ) const;
@@ -172,7 +172,7 @@ public:
const OUString GetItemCommand( sal_uInt16 nItemId );
void SetHelpText( sal_uInt16 nItemId, const OUString& rText );
- const OUString& GetHelpText( sal_uInt16 nItemId ) const;
+ const OUString& GetHelpText( sal_uInt16 nItemId ) const;
using Window::SetQuickHelpText;
void SetQuickHelpText( sal_uInt16 nItemId, const OUString& rText );
@@ -191,8 +191,8 @@ public:
Size CalcWindowSizePixel() const;
- void SetClickHdl( const Link<>& rLink ) { maClickHdl = rLink; }
- void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; }
+ void SetClickHdl( const Link<StatusBar*,void>& rLink ) { maClickHdl = rLink; }
+ void SetDoubleClickHdl( const Link<StatusBar*,void>& rLink ) { maDoubleClickHdl = rLink; }
using Window::SetAccessibleName;
void SetAccessibleName( sal_uInt16 nItemId, const OUString& rName );
commit 6741a0f25a0193941135636833e1068ee12fc77f
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Thu Sep 3 16:59:55 2015 +0200
convert Link<> to typed
Change-Id: I5469c9983ef94b418b729af841f8db10b9116667
Reviewed-on: https://gerrit.libreoffice.org/18316
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx
index c5204b9..e9ff28b 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -174,7 +174,7 @@ private:
// handler for gallery popup menu button + size
DECL_LINK_TYPED( GraphicHdl_Impl, MenuButton *, void );
- DECL_LINK( MenuCreateHdl_Impl, MenuButton * );
+ DECL_LINK_TYPED( MenuCreateHdl_Impl, MenuButton *, void );
DECL_LINK( SizeHdl_Impl, MetricField * );
DECL_LINK_TYPED( RatioHdl_Impl, Button*, void );
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 1dc40a9..e270329 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -1735,10 +1735,9 @@ void SvxLineTabPage::FillUserData()
// #58425# Symbols on a list (e.g. StarChart)
// Handler for the symbol selection's popup menu (NumMenueButton)
// The following link originates from SvxNumOptionsTabPage
-IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
+IMPL_LINK_TYPED( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton, void )
{
InitSymbols(pButton);
- return 0;
}
// #58425# Symbols on a list (e.g. StarChart)
diff --git a/include/vcl/menubtn.hxx b/include/vcl/menubtn.hxx
index d164ed8..62933f1 100644
--- a/include/vcl/menubtn.hxx
+++ b/include/vcl/menubtn.hxx
@@ -41,8 +41,8 @@ private:
PopupMenu* mpMenu;
sal_uInt16 mnCurItemId;
sal_uInt16 mnMenuMode;
- Link<> maActivateHdl;
- Link<MenuButton *, void> maSelectHdl;
+ Link<MenuButton*,void> maActivateHdl;
+ Link<MenuButton*,void> maSelectHdl;
SAL_DLLPRIVATE void ImplInitMenuButtonData();
DECL_DLLPRIVATE_LINK_TYPED( ImplMenuTimeoutHdl, Timer*, void );
@@ -75,7 +75,7 @@ public:
sal_uInt16 GetCurItemId() const { return mnCurItemId; }
OString GetCurItemIdent() const;
- void SetActivateHdl( const Link<>& rLink ) { maActivateHdl = rLink; }
+ void SetActivateHdl( const Link<MenuButton *, void>& rLink ) { maActivateHdl = rLink; }
void SetSelectHdl( const Link<MenuButton *, void>& rLink ) { maSelectHdl = rLink; }
};
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index 875e928..1879f0d 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -1375,7 +1375,7 @@ namespace svxform
Link<MenuButton *, void> aLink1 = LINK( this, DataNavigatorWindow, MenuSelectHdl );
m_pModelBtn->SetSelectHdl( aLink1 );
m_pInstanceBtn->SetSelectHdl( aLink1 );
- Link<> aLink2 = LINK( this, DataNavigatorWindow, MenuActivateHdl );
+ Link<MenuButton*,void> aLink2 = LINK( this, DataNavigatorWindow, MenuActivateHdl );
m_pModelBtn->SetActivateHdl( aLink2 );
m_pInstanceBtn->SetActivateHdl( aLink2 );
m_pTabCtrl->SetActivatePageHdl( LINK( this, DataNavigatorWindow, ActivatePageHdl ) );
@@ -1774,7 +1774,7 @@ namespace svxform
return m_pTabCtrl->GetPagePos(nId) >= 3;
}
- IMPL_LINK( DataNavigatorWindow, MenuActivateHdl, MenuButton *, pBtn )
+ IMPL_LINK_TYPED( DataNavigatorWindow, MenuActivateHdl, MenuButton *, pBtn, void )
{
Menu* pMenu = pBtn->GetPopupMenu();
@@ -1796,7 +1796,6 @@ namespace svxform
{
SAL_WARN( "svx.form", "DataNavigatorWindow::MenuActivateHdl(): wrong button" );
}
- return 0;
}
IMPL_LINK_NOARG_TYPED(DataNavigatorWindow, ActivatePageHdl, TabControl*, void)
diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx
index a6e82f9..e37521b 100644
--- a/svx/source/inc/datanavi.hxx
+++ b/svx/source/inc/datanavi.hxx
@@ -349,9 +349,9 @@ namespace svxform
DECL_LINK( ModelSelectHdl, ListBox * );
DECL_LINK_TYPED( MenuSelectHdl, MenuButton *, void );
- DECL_LINK( MenuActivateHdl, MenuButton * );
- DECL_LINK_TYPED(ActivatePageHdl, TabControl*, void);
- DECL_LINK_TYPED(UpdateHdl, Timer *, void);
+ DECL_LINK_TYPED( MenuActivateHdl, MenuButton *, void );
+ DECL_LINK_TYPED( ActivatePageHdl, TabControl*, void);
+ DECL_LINK_TYPED( UpdateHdl, Timer *, void);
XFormsPage* GetCurrentPage( sal_uInt16& rCurId );
void LoadModels();
More information about the Libreoffice-commits
mailing list