diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-19 13:29:13 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-19 15:22:22 +0200 |
commit | c4484a8225a5d0fe0cd8a7f9ca36cc8b009b35ff (patch) | |
tree | 9835d1ab89263837024484f765aaea3c22ef0d83 /cui/source | |
parent | 2e5427ce81cf9641ec21ce6bd935120e25e4c00d (diff) |
convert Link<> to typed
Change-Id: I1d8fe58c589b56590453b2136296ca50bfe78252
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/cuigrfflt.cxx | 36 | ||||
-rw-r--r-- | cui/source/inc/cuigrfflt.hxx | 16 |
2 files changed, 25 insertions, 27 deletions
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx index bdf4c9377d59..f19e52398383 100644 --- a/cui/source/dialogs/cuigrfflt.cxx +++ b/cui/source/dialogs/cuigrfflt.cxx @@ -123,7 +123,7 @@ void GraphicPreviewWindow::ScaleImageToFit() } } - maModifyHdl.Call(this); + maModifyHdl.Call(nullptr); } void GraphicPreviewWindow::Resize() @@ -170,15 +170,13 @@ IMPL_LINK_NOARG_TYPED(GraphicFilterDialog, ImplPreviewTimeoutHdl, Timer *, void) -IMPL_LINK_NOARG(GraphicFilterDialog, ImplModifyHdl) +IMPL_LINK_NOARG_TYPED(GraphicFilterDialog, ImplModifyHdl, LinkParamNone*, void) { if (bIsBitmap) { maTimer.Stop(); maTimer.Start(); } - - return 0; } @@ -208,14 +206,14 @@ GraphicFilterMosaic::GraphicFilterMosaic( vcl::Window* pParent, const Graphic& r mpMtrWidth->GrabFocus(); } -IMPL_LINK_TYPED(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, rCheckBox, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterMosaic, CheckBoxModifyHdl, CheckBox&, void) { - GetModifyHdl().Call(&rCheckBox); + GetModifyHdl().Call(nullptr); } -IMPL_LINK_TYPED(GraphicFilterMosaic, EditModifyHdl, Edit&, rEdit, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterMosaic, EditModifyHdl, Edit&, void) { - GetModifyHdl().Call(&rEdit); + GetModifyHdl().Call(nullptr); } GraphicFilterMosaic::~GraphicFilterMosaic() @@ -282,9 +280,9 @@ GraphicFilterSmooth::GraphicFilterSmooth( vcl::Window* pParent, const Graphic& r mpMtrRadius->GrabFocus(); } -IMPL_LINK_TYPED(GraphicFilterSmooth, EditModifyHdl, Edit&, rEdit, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterSmooth, EditModifyHdl, Edit&, void) { - GetModifyHdl().Call(&rEdit); + GetModifyHdl().Call(nullptr); } GraphicFilterSmooth::~GraphicFilterSmooth() @@ -345,13 +343,13 @@ GraphicFilterSolarize::GraphicFilterSolarize( vcl::Window* pParent, const Graphi mpCbxInvert->SetToggleHdl( LINK(this, GraphicFilterSolarize, CheckBoxModifyHdl) ); } -IMPL_LINK_TYPED(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, rCheckBox, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterSolarize, CheckBoxModifyHdl, CheckBox&, void) { - GetModifyHdl().Call(&rCheckBox); + GetModifyHdl().Call(nullptr); } -IMPL_LINK_TYPED(GraphicFilterSolarize, EditModifyHdl, Edit&, rEdit, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterSolarize, EditModifyHdl, Edit&, void) { - GetModifyHdl().Call(&rEdit); + GetModifyHdl().Call(nullptr); } GraphicFilterSolarize::~GraphicFilterSolarize() @@ -416,9 +414,9 @@ GraphicFilterSepia::GraphicFilterSepia( vcl::Window* pParent, const Graphic& rGr mpMtrSepia->SetModifyHdl( LINK(this, GraphicFilterSepia, EditModifyHdl) ); } -IMPL_LINK_TYPED(GraphicFilterSepia, EditModifyHdl, Edit&, rEdit, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterSepia, EditModifyHdl, Edit&, void) { - GetModifyHdl().Call(&rEdit); + GetModifyHdl().Call(nullptr); } GraphicFilterSepia::~GraphicFilterSepia() @@ -474,9 +472,9 @@ GraphicFilterPoster::GraphicFilterPoster(vcl::Window* pParent, const Graphic& rG mpNumPoster->SetModifyHdl( LINK(this, GraphicFilterPoster, EditModifyHdl) ); } -IMPL_LINK_TYPED(GraphicFilterPoster, EditModifyHdl, Edit&, rEdit, void) +IMPL_LINK_NOARG_TYPED(GraphicFilterPoster, EditModifyHdl, Edit&, void) { - GetModifyHdl().Call(&rEdit); + GetModifyHdl().Call(nullptr); } GraphicFilterPoster::~GraphicFilterPoster() @@ -526,7 +524,7 @@ void EmbossControl::MouseButtonDown( const MouseEvent& rEvt ) SvxRectCtl::MouseButtonDown( rEvt ); if( GetActualRP() != eOldRP ) - maModifyHdl.Call( this ); + maModifyHdl.Call( nullptr ); } Size EmbossControl::GetOptimalSize() const diff --git a/cui/source/inc/cuigrfflt.hxx b/cui/source/inc/cuigrfflt.hxx index 9d7be2deeb35..db4b0a384eec 100644 --- a/cui/source/inc/cuigrfflt.hxx +++ b/cui/source/inc/cuigrfflt.hxx @@ -36,7 +36,7 @@ class GraphicPreviewWindow : public Control { private: const Graphic* mpOrigGraphic; - Link<> maModifyHdl; + Link<LinkParamNone*,void> maModifyHdl; Graphic maScaledOrig; Graphic maPreview; double mfScaleX; @@ -51,7 +51,7 @@ private: public: GraphicPreviewWindow(vcl::Window* pParent, WinBits nStyle); - void init(const Graphic* pOrigGraphic, const Link<>& rLink) + void init(const Graphic* pOrigGraphic, const Link<LinkParamNone*,void>& rLink) { mpOrigGraphic = pOrigGraphic; maModifyHdl = rLink; @@ -69,17 +69,17 @@ class GraphicFilterDialog : public ModalDialog private: Timer maTimer; - Link<> maModifyHdl; + Link<LinkParamNone*,void> maModifyHdl; Size maSizePixel; bool bIsBitmap; - DECL_LINK_TYPED(ImplPreviewTimeoutHdl, Timer *, void); - DECL_LINK( ImplModifyHdl, void* ); + DECL_LINK_TYPED( ImplPreviewTimeoutHdl, Timer *, void ); + DECL_LINK_TYPED( ImplModifyHdl, LinkParamNone*, void); protected: VclPtr<GraphicPreviewWindow> mpPreview; - const Link<>& GetModifyHdl() const { return maModifyHdl; } + const Link<LinkParamNone*,void>& GetModifyHdl() const { return maModifyHdl; } const Size& GetGraphicSizePixel() const { return maSizePixel; } public: @@ -183,14 +183,14 @@ public: class EmbossControl : public SvxRectCtl { private: - Link<> maModifyHdl; + Link<LinkParamNone*, void> maModifyHdl; virtual void MouseButtonDown( const MouseEvent& rEvt ) override; virtual Size GetOptimalSize() const override; public: EmbossControl(vcl::Window* pParent) : SvxRectCtl(pParent) {} - void SetModifyHdl( const Link<>& rHdl ) { maModifyHdl = rHdl; } + void SetModifyHdl( const Link<LinkParamNone*,void>& rHdl ) { maModifyHdl = rHdl; } }; class GraphicFilterEmboss : public GraphicFilterDialog |