Kaydet (Commit) 368291e7 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Stephan Bergmann

basctl: Use typed Links

Change-Id: I0e0b6086852c06df88e1b623d4631f364eb28b09
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 91d6b00f
...@@ -237,7 +237,7 @@ protected: ...@@ -237,7 +237,7 @@ protected:
DECL_LINK( ButtonHdl, ImageButton * ); DECL_LINK( ButtonHdl, ImageButton * );
DECL_LINK(TreeListHdl, void *); DECL_LINK(TreeListHdl, void *);
DECL_LINK( implEndDragHdl, HeaderBar * ); DECL_LINK( implEndDragHdl, HeaderBar * );
DECL_LINK( EditAccHdl, Accelerator * ); DECL_LINK_TYPED( EditAccHdl, Accelerator *, void );
public: public:
......
...@@ -1810,7 +1810,7 @@ IMPL_LINK( WatchWindow, implEndDragHdl, HeaderBar *, pBar ) ...@@ -1810,7 +1810,7 @@ IMPL_LINK( WatchWindow, implEndDragHdl, HeaderBar *, pBar )
return 0; return 0;
} }
IMPL_LINK( WatchWindow, EditAccHdl, Accelerator *, pAcc ) IMPL_LINK_TYPED( WatchWindow, EditAccHdl, Accelerator *, pAcc, void )
{ {
switch ( pAcc->GetCurKeyCode().GetCode() ) switch ( pAcc->GetCurKeyCode().GetCode() )
{ {
...@@ -1830,8 +1830,6 @@ IMPL_LINK( WatchWindow, EditAccHdl, Accelerator *, pAcc ) ...@@ -1830,8 +1830,6 @@ IMPL_LINK( WatchWindow, EditAccHdl, Accelerator *, pAcc )
} }
break; break;
} }
return 0;
} }
void WatchWindow::UpdateWatches( bool bBasicStopped ) void WatchWindow::UpdateWatches( bool bBasicStopped )
......
...@@ -83,8 +83,9 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD ...@@ -83,8 +83,9 @@ DialogWindow::DialogWindow(DialogWindowLayout* pParent, ScriptDocument const& rD
{ {
InitSettings( true, true, true ); InitSettings( true, true, true );
aOldNotifyUndoActionHdl = pEditor->GetModel().GetNotifyUndoActionHdl(); pEditor->GetModel().SetNotifyUndoActionHdl(
pEditor->GetModel().SetNotifyUndoActionHdl(LINK(this, DialogWindow, NotifyUndoActionHdl)); LINK(this, DialogWindow, NotifyUndoActionHdl)
);
SetHelpId( HID_BASICIDE_DIALOGWINDOW ); SetHelpId( HID_BASICIDE_DIALOGWINDOW );
......
...@@ -29,10 +29,9 @@ namespace basctl ...@@ -29,10 +29,9 @@ namespace basctl
class ExtendedEdit : public Edit class ExtendedEdit : public Edit
{ {
private: private:
Accelerator aAcc; Accelerator aAcc;
Link<> aAccHdl; Link<Accelerator*,void> aAccHdl;
Link<> aGotFocusHdl; Link<ExtendedEdit*,void> aLoseFocusHdl;
Link<> aLoseFocusHdl;
protected: protected:
DECL_LINK( EditAccHdl, Accelerator * ); DECL_LINK( EditAccHdl, Accelerator * );
...@@ -42,10 +41,9 @@ protected: ...@@ -42,10 +41,9 @@ protected:
public: public:
ExtendedEdit( vcl::Window* pParent, IDEResId nRes ); ExtendedEdit( vcl::Window* pParent, IDEResId nRes );
void SetAccHdl( const Link<>& rLink ) { aAccHdl = rLink; } void SetAccHdl( const Link<Accelerator*,void>& rLink ) { aAccHdl = rLink; }
void SetLoseFocusHdl( const Link<>& rLink ) { aLoseFocusHdl = rLink; } void SetLoseFocusHdl( const Link<ExtendedEdit*,void>& rLink ) { aLoseFocusHdl = rLink; }
void SetGotFocusHdl( const Link<>& rLink ) { aGotFocusHdl = rLink; } Accelerator& GetAccelerator() { return aAcc; }
Accelerator& GetAccelerator() { return aAcc; }
}; };
} // namespace basctl } // namespace basctl
......
...@@ -58,7 +58,6 @@ private: ...@@ -58,7 +58,6 @@ private:
DialogWindowLayout& rLayout; DialogWindowLayout& rLayout;
boost::scoped_ptr<DlgEditor> pEditor; // never nullptr boost::scoped_ptr<DlgEditor> pEditor; // never nullptr
boost::scoped_ptr<SfxUndoManager> pUndoMgr; // never nullptr boost::scoped_ptr<SfxUndoManager> pUndoMgr; // never nullptr
Link<> aOldNotifyUndoActionHdl;
OUString aCurPath; OUString aCurPath;
protected: protected:
......
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