Kaydet (Commit) 44404a0c authored tarafından Noel Grandin's avatar Noel Grandin

convert Link<> to typed

Change-Id: If6334d32abbec379acbb9def98fdf6cb5144238b
üst c4fb1122
...@@ -144,7 +144,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper ...@@ -144,7 +144,7 @@ class UpdateCheckUI : public ::cppu::WeakImplHelper
private: private:
DECL_LINK_TYPED(ClickHdl, MenuBar::MenuBarButtonCallbackArg&, bool); DECL_LINK_TYPED(ClickHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
DECL_LINK( HighlightHdl, MenuBar::MenuBarButtonCallbackArg* ); DECL_LINK_TYPED(HighlightHdl, MenuBar::MenuBarButtonCallbackArg&, bool);
DECL_LINK_TYPED(WaitTimeOutHdl, Idle *, void); DECL_LINK_TYPED(WaitTimeOutHdl, Idle *, void);
DECL_LINK_TYPED(TimeOutHdl, Timer *, void); DECL_LINK_TYPED(TimeOutHdl, Timer *, void);
DECL_LINK_TYPED(UserEventHdl, void *, void); DECL_LINK_TYPED(UserEventHdl, void *, void);
...@@ -601,14 +601,14 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg ...@@ -601,14 +601,14 @@ IMPL_LINK_NOARG_TYPED(UpdateCheckUI, ClickHdl, MenuBar::MenuBarButtonCallbackArg
} }
IMPL_LINK( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg*, pData ) IMPL_LINK_TYPED( UpdateCheckUI, HighlightHdl, MenuBar::MenuBarButtonCallbackArg&, rData, bool )
{ {
if ( pData->bHighlight ) if ( rData.bHighlight )
maWaitIdle.Start(); maWaitIdle.Start();
else else
RemoveBubbleWindow( false ); RemoveBubbleWindow( false );
return 0; return false;
} }
......
...@@ -488,7 +488,7 @@ public: ...@@ -488,7 +488,7 @@ public:
// set the highlight link for additional button with ID nId // set the highlight link for additional button with ID nId
// highlight link will be called with a MenuBarButtonHighlightArg // highlight link will be called with a MenuBarButtonHighlightArg
// the bHighlight member of that struct shall contain the new state // the bHighlight member of that struct shall contain the new state
void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& ); void SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& );
// returns the rectangle occupied by the additional button named nId // returns the rectangle occupied by the additional button named nId
// coordinates are relative to the systemwindiow the menubar is attached to // coordinates are relative to the systemwindiow the menubar is attached to
// if the menubar is unattached an empty rectangle is returned // if the menubar is unattached an empty rectangle is returned
......
...@@ -2737,7 +2737,7 @@ sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<MenuBar: ...@@ -2737,7 +2737,7 @@ sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link<MenuBar:
return pMenuWin ? pMenuWin->AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0; return pMenuWin ? pMenuWin->AddMenuBarButton(i_rImage, i_rLink, i_rToolTip) : 0;
} }
void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink ) void MenuBar::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& rLink )
{ {
MenuBarWindow* pMenuWin = getMenuBarWindow(); MenuBarWindow* pMenuWin = getMenuBarWindow();
if (!pMenuWin) if (!pMenuWin)
......
...@@ -270,7 +270,7 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent ) ...@@ -270,7 +270,7 @@ IMPL_LINK( MenuBarWindow, ToolboxEventHdl, VclWindowEvent*, pEvent )
std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId ); std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( aArg.nId );
if( it != m_aAddButtons.end() ) if( it != m_aAddButtons.end() )
{ {
it->second.m_aHighlightLink.Call( &aArg ); it->second.m_aHighlightLink.Call( aArg );
} }
return 0; return 0;
} }
...@@ -1150,7 +1150,7 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<Me ...@@ -1150,7 +1150,7 @@ sal_uInt16 MenuBarWindow::AddMenuBarButton( const Image& i_rImage, const Link<Me
return nId; return nId;
} }
void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<>& rLink ) void MenuBarWindow::SetMenuBarButtonHighlightHdl( sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>& rLink )
{ {
std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId ); std::map< sal_uInt16, AddButtonEntry >::iterator it = m_aAddButtons.find( nId );
if( it != m_aAddButtons.end() ) if( it != m_aAddButtons.end() )
......
...@@ -69,7 +69,7 @@ private: ...@@ -69,7 +69,7 @@ private:
{ {
sal_uInt16 m_nId; sal_uInt16 m_nId;
Link<MenuBar::MenuBarButtonCallbackArg&,bool> m_aSelectLink; Link<MenuBar::MenuBarButtonCallbackArg&,bool> m_aSelectLink;
Link<> m_aHighlightLink; Link<MenuBar::MenuBarButtonCallbackArg&,bool> m_aHighlightLink;
AddButtonEntry() : m_nId( 0 ) {} AddButtonEntry() : m_nId( 0 ) {}
}; };
...@@ -143,7 +143,7 @@ public: ...@@ -143,7 +143,7 @@ public:
/// Add an arbitrary button to the menubar that will appear next to the close button. /// Add an arbitrary button to the menubar that will appear next to the close button.
sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&); sal_uInt16 AddMenuBarButton(const Image&, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&, const OUString&);
void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<>&); void SetMenuBarButtonHighlightHdl(sal_uInt16 nId, const Link<MenuBar::MenuBarButtonCallbackArg&,bool>&);
Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId); Rectangle GetMenuBarButtonRectPixel(sal_uInt16 nId);
void RemoveMenuBarButton(sal_uInt16 nId); void RemoveMenuBarButton(sal_uInt16 nId);
bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId); bool HandleMenuButtonEvent(sal_uInt16 i_nButtonId);
......
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