Kaydet (Commit) 2ec22477 authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: I743c74b134552eefb14d35e54491494160f1ffbd
üst 66a205d5
......@@ -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;
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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:
......
......@@ -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.
......
......@@ -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()
......
......@@ -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 )
......
......@@ -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* );
......
......@@ -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
......
......@@ -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);
}
......
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