summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-31 13:41:05 +0200
committerNoel Grandin <noel@peralex.com>2015-09-04 13:08:30 +0200
commit2ec22477739d2c075e7d9997c3e90cb1a512f63f (patch)
tree44bd0825fe930703c393a78e771670fa0b52dce4
parent66a205d56f4ebd3ce6f32472ce90eb2c94f6f840 (diff)
convert Link<> to typed
Change-Id: I743c74b134552eefb14d35e54491494160f1ffbd
-rw-r--r--basctl/source/basicide/basidesh.cxx9
-rw-r--r--basctl/source/inc/basidesh.hxx4
-rw-r--r--include/svtools/tabbar.hxx12
-rw-r--r--sc/source/ui/inc/tabcont.hxx2
-rw-r--r--sc/source/ui/inc/tabview.hxx3
-rw-r--r--sc/source/ui/view/tabcont.cxx6
-rw-r--r--sc/source/ui/view/tabview.cxx4
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx24
-rw-r--r--sd/source/ui/view/drviews1.cxx4
-rw-r--r--svtools/source/control/tabbar.cxx2
10 files changed, 30 insertions, 40 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index a0c26a0f5a25..979d2dcaa349 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -449,23 +449,18 @@ void Shell::OuterResizePixel( const Point &rPos, const Size &rSize )
}
-IMPL_LINK( Shell, TabBarSplitHdl, TabBar *, pTBar )
+IMPL_LINK_NOARG_TYPED( Shell, TabBarSplitHdl, ::TabBar *, void )
{
- (void)pTBar;
bTabBarSplitted = true;
ArrangeTabBar();
-
- return 0;
}
-IMPL_LINK( Shell, TabBarHdl, TabBar *, pCurTabBar )
+IMPL_LINK_TYPED( Shell, TabBarHdl, ::TabBar *, pCurTabBar, void )
{
sal_uInt16 nCurId = pCurTabBar->GetCurPageId();
BaseWindow* pWin = aWindowTable[ nCurId ];
DBG_ASSERT( pWin, "Eintrag in TabBar passt zu keinem Fenster!" );
SetCurWindow( pWin );
-
- return 0;
}
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index eed997708905..9206e01ea381 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -105,8 +105,8 @@ private:
void ImplStartListening( StarBASIC* pBasic );
- DECL_LINK( TabBarHdl, TabBar* );
- DECL_LINK( TabBarSplitHdl, TabBar * );
+ DECL_LINK_TYPED( TabBarHdl, ::TabBar*, void );
+ DECL_LINK_TYPED( TabBarSplitHdl, ::TabBar *, void );
static unsigned nShellCount;
diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index 99539e054ad6..f7ae4d4cd5a1 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -348,9 +348,9 @@ private:
bool mbMirrored : 1;
bool mbScrollAlwaysEnabled : 1;
- Link<> maSelectHdl;
- Link<> maSplitHdl;
- Link<> maScrollAreaContextHdl;
+ Link<TabBar*,void> maSelectHdl;
+ Link<TabBar*,void> maSplitHdl;
+ Link<const CommandEvent&, void> maScrollAreaContextHdl;
size_t maCurrentItemList;
using Window::ImplInit;
@@ -496,9 +496,9 @@ public:
Size CalcWindowSizePixel() const;
- void SetSelectHdl( const Link<>& rLink ) { maSelectHdl = rLink; }
- void SetSplitHdl( const Link<>& rLink ) { maSplitHdl = rLink; }
- void SetScrollAreaContextHdl( const Link<>& rLink ) { maScrollAreaContextHdl = rLink; }
+ void SetSelectHdl( const Link<TabBar*,void>& rLink ) { maSelectHdl = rLink; }
+ void SetSplitHdl( const Link<TabBar*,void>& rLink ) { maSplitHdl = rLink; }
+ void SetScrollAreaContextHdl( const Link<const CommandEvent&,void>& rLink ) { maScrollAreaContextHdl = rLink; }
// accessibility
virtual css::uno::Reference<css::accessibility::XAccessible> CreateAccessible() SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/tabcont.hxx b/sc/source/ui/inc/tabcont.hxx
index d1515c56b843..4c1da4c397f0 100644
--- a/sc/source/ui/inc/tabcont.hxx
+++ b/sc/source/ui/inc/tabcont.hxx
@@ -42,7 +42,7 @@ private:
sal_uInt16 GetMaxId() const;
SCTAB GetPrivatDropPos(const Point& rPos );
- DECL_LINK(ShowPageList, const CommandEvent*);
+ DECL_LINK_TYPED(ShowPageList, const CommandEvent&, void);
void SwitchToPageId(sal_uInt16 nId);
protected:
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 216fdf85ed82..5e3ea93c2cd5 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -54,6 +54,7 @@ class SdrObject;
class ScHintWindow;
class ScPageBreakData;
class SdrHdlList;
+class TabBar;
namespace com { namespace sun { namespace star {
namespace chart2 { namespace data {
@@ -237,7 +238,7 @@ public:
void RemoveHintWindow();
void TestHintWindow();
- DECL_LINK( TabBarResize, void* );
+ DECL_LINK_TYPED( TabBarResize, ::TabBar*, void );
/** Sets an absolute tab bar width (in pixels). */
void SetTabBarWidth( long nNewWidth );
/** Sets a relative tab bar width.
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index 6f2ea426cc75..abe0aac982bf 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -84,7 +84,7 @@ ScTabControl::ScTabControl( vcl::Window* pParent, ScViewData* pData )
SetScrollAreaContextHdl( LINK( this, ScTabControl, ShowPageList ) );
}
-IMPL_LINK(ScTabControl, ShowPageList, const CommandEvent *, pEvent)
+IMPL_LINK_TYPED(ScTabControl, ShowPageList, const CommandEvent &, rEvent, void)
{
PopupMenu aPopup;
@@ -107,10 +107,8 @@ IMPL_LINK(ScTabControl, ShowPageList, const CommandEvent *, pEvent)
}
}
- sal_uInt16 nItemId = aPopup.Execute( this, pEvent->GetMousePosPixel() );
+ sal_uInt16 nItemId = aPopup.Execute( this, rEvent.GetMousePosPixel() );
SwitchToPageId(nItemId);
-
- return 0;
}
ScTabControl::~ScTabControl()
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index b0b020ee5853..443f7ef19d56 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -839,7 +839,7 @@ void ScTabView::GetBorderSize( SvBorder& rBorder, const Size& /* rSize */ )
::std::swap( rBorder.Left(), rBorder.Right() );
}
-IMPL_LINK_NOARG(ScTabView, TabBarResize)
+IMPL_LINK_NOARG_TYPED(ScTabView, TabBarResize, TabBar*, void)
{
if (aViewData.IsHScrollMode())
{
@@ -862,8 +862,6 @@ IMPL_LINK_NOARG(ScTabView, TabBarResize)
RepeatResize();
}
}
-
- return 0;
}
void ScTabView::SetTabBarWidth( long nNewWidth )
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 44b56f2b074e..c3bf37d15600 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -389,22 +389,22 @@ public:
//move this method to ViewShell.
//void NotifyAccUpdate();
protected:
- DrawView* mpDrawView;
- SdPage* mpActualPage;
- Rectangle maMarkRect;
- Point maMousePos;
- bool mbMousePosFreezed;
+ DrawView* mpDrawView;
+ SdPage* mpActualPage;
+ Rectangle maMarkRect;
+ Point maMousePos;
+ bool mbMousePosFreezed;
VclPtr<TabControl> maTabControl;
- EditMode meEditMode;
- PageKind mePageKind;
- bool mbZoomOnPage;
- bool mbIsRulerDrag;
+ EditMode meEditMode;
+ PageKind mePageKind;
+ bool mbZoomOnPage;
+ bool mbIsRulerDrag;
sal_uLong mnLockCount;
- bool mbReadOnly;
- static bool mbPipette;
+ bool mbReadOnly;
+ static bool mbPipette;
DECL_LINK_TYPED( ClipboardChanged, TransferableDataHelper*, void );
- DECL_LINK( TabSplitHdl, TabBar * );
+ DECL_LINK_TYPED( TabSplitHdl, TabBar *, void );
DECL_LINK( NameObjectHdl, AbstractSvxNameDialog* );
DECL_LINK( RenameSlideHdl, AbstractSvxNameDialog* );
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 32cd1d4e0dff..f04dea68d5fc 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -606,7 +606,7 @@ void DrawViewShell::SetUIUnit(FieldUnit eUnit)
* Refresh TabControl on splitter change
*/
-IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab )
+IMPL_LINK_TYPED( DrawViewShell, TabSplitHdl, TabBar *, pTab, void )
{
const long int nMax = maViewSize.Width() - maScrBarWH.Width()
- maTabControl->GetPosPixel().X() ;
@@ -626,8 +626,6 @@ IMPL_LINK( DrawViewShell, TabSplitHdl, TabBar *, pTab )
Size aScrSize(nMax - aTabSize.Width(), maScrBarWH.Height());
mpHorizontalScrollBar->SetPosSizePixel(aPos, aScrSize);
-
- return 0;
}
/// inherited from sd::ViewShell
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 68637b63f84d..04a048915ec4 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -290,7 +290,7 @@ void ImplTabButton::Command(const CommandEvent& rCommandEvent)
if (rCommandEvent.GetCommand() == CommandEventId::ContextMenu)
{
TabBar* pParent = GetParent();
- pParent->maScrollAreaContextHdl.Call(const_cast<CommandEvent *>(&rCommandEvent));
+ pParent->maScrollAreaContextHdl.Call(rCommandEvent);
}
PushButton::Command(rCommandEvent);
}