diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-28 16:35:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-31 09:50:11 +0200 |
commit | b6e95a8c9997e03099492079ebc34c4a47b8b502 (patch) | |
tree | 9955ffbc914a27e1589c22e3f2fbc0d4edb7b503 | |
parent | 410c06bec452b09cd15ddfcb82b8b2b0508f3c55 (diff) |
convert Link<> to typed
and remove some dead code
Change-Id: I6a42dbaea5053b4aa3c47b3f154410b05f32dfe4
-rw-r--r-- | include/svtools/ruler.hxx | 10 | ||||
-rw-r--r-- | svtools/source/control/ruler.cxx | 9 | ||||
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 3 | ||||
-rw-r--r-- | sw/inc/view.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 3 |
5 files changed, 5 insertions, 22 deletions
diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 4a3ffd2f3148..116f0c80d7ba 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -651,12 +651,7 @@ private: RulerSelection maHoverSelection; - Link<> maStartDragHdl; - Link<> maDragHdl; - Link<> maEndDragHdl; - Link<> maClickHdl; - Link<> maDoubleClickHdl; - Link<> maExtraDownHdl; + Link<Ruler*,void> maDoubleClickHdl; std::unique_ptr<RulerSelection> mxCurrentHitTest; std::unique_ptr<RulerSelection> mxPreviousHitTest; @@ -792,8 +787,7 @@ public: void SetStyle( WinBits nStyle ); WinBits GetStyle() const { return mnWinStyle; } - const Link<>& GetStartDragHdl() const { return maStartDragHdl; } - void SetDoubleClickHdl( const Link<>& rLink ) { maDoubleClickHdl = rLink; } + void SetDoubleClickHdl( const Link<Ruler*,void>& rLink ) { maDoubleClickHdl = rLink; } void SetTextRTL(bool bRTL); bool GetTextRTL(); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 4dcc834351a2..de25ff67a326 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -2282,25 +2282,19 @@ void Ruler::DataChanged( const DataChangedEvent& rDCEvt ) bool Ruler::StartDrag() { - if ( maStartDragHdl.IsSet() ) - return maStartDragHdl.Call( this ); - else - return false; + return false; } void Ruler::Drag() { - maDragHdl.Call( this ); } void Ruler::EndDrag() { - maEndDragHdl.Call( this ); } void Ruler::Click() { - maClickHdl.Call( this ); } void Ruler::DoubleClick() @@ -2310,7 +2304,6 @@ void Ruler::DoubleClick() void Ruler::ExtraDown() { - maExtraDownHdl.Call( this ); } void Ruler::Activate() diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 2a2104ea1b83..a068ee569643 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -3181,9 +3181,6 @@ bool SvxRuler::StartDrag() bool bOk = true; - if(GetStartDragHdl().IsSet()) - bOk = Ruler::StartDrag(); - if(bOk) { lInitialDragPos = GetDragPos(); diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index 6398b92f192c..62f3748d6a01 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -502,7 +502,7 @@ public: void ExecDraw(SfxRequest&); void ExecTabWin(SfxRequest&); void ExecuteStatusLine(SfxRequest&); - DECL_LINK( ExecRulerClick, Ruler * ); + DECL_LINK_TYPED( ExecRulerClick, Ruler *, void ); void ExecSearch(SfxRequest&, bool bNoMessage = false); void ExecViewOptions(SfxRequest &); diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 49424a6e864d..3674f78f035e 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -527,7 +527,7 @@ int SwView::KillVRuler() return 1; } -IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler ) +IMPL_LINK_TYPED( SwView, ExecRulerClick, Ruler *, pRuler, void ) { OUString sDefPage; switch( pRuler->GetClickType() ) @@ -548,7 +548,6 @@ IMPL_LINK( SwView, ExecRulerClick, Ruler *, pRuler ) GetViewFrame()->GetDispatcher()->Execute( SID_PARA_DLG, SfxCallMode::SYNCHRON|SfxCallMode::RECORD, &aDefPage, 0L ); - return 0; } sal_uInt16 SwView::GetMoveType() |