diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-15 15:26:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 15:47:13 +0200 |
commit | 74d686bc59cd70e7ad89f7845199eb751aa7145d (patch) | |
tree | 29ce62f941b417f37802d89984fd6e570eba929c /include/svtools | |
parent | 6212c467156e2bd4580a9f8145124223d3135ea4 (diff) |
simplify the CellController modify Link<> handling
in preparation for some more "make Link<> typed" work
Change-Id: Ifdf58cc697c7172102bf9e4cc63f869c522517e6
Diffstat (limited to 'include/svtools')
-rw-r--r-- | include/svtools/editbrowsebox.hxx | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index bbabf5b4dd08..991f9b18f990 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -83,10 +83,11 @@ namespace svt class SVT_DLLPUBLIC CellController : public SvRefBase { friend class EditBrowseBox; + Link<LinkParamNone*, void> maModifyHdl; protected: - VclPtr<Control> pWindow; - bool bSuspended; // <true> if the window is hidden and disabled + VclPtr<Control> pWindow; + bool bSuspended; // <true> if the window is hidden and disabled public: TYPEINFO(); @@ -111,8 +112,9 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const; - virtual void SetModifyHdl(const Link<>& rLink) = 0; + void SetModifyHdl(const Link<LinkParamNone*,void>& rLink) { maModifyHdl = rLink; } virtual bool WantMouseEvent() const; + virtual void callModifyHdl() { maModifyHdl.Call(nullptr); } }; typedef tools::SvRef<CellController> CellControllerRef; @@ -249,7 +251,8 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const override; - virtual void SetModifyHdl(const Link<>& rLink) override; + private: + DECL_LINK(ModifyHdl, void*); }; @@ -269,7 +272,8 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const override; - virtual void SetModifyHdl(const Link<>& rLink) override; + private: + DECL_LINK(ModifyHdl, void*); }; @@ -313,15 +317,16 @@ namespace svt public: TYPEINFO_OVERRIDE(); - CheckBoxCellController(CheckBoxControl* pWin):CellController(pWin){} + CheckBoxCellController(CheckBoxControl* pWin); CheckBox& GetCheckBox() const; virtual bool IsModified() const override; virtual void ClearModified() override; protected: - virtual void SetModifyHdl(const Link<>& rLink) override; virtual bool WantMouseEvent() const override; + private: + DECL_LINK(ModifyHdl, void*); }; @@ -354,7 +359,8 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const override; - virtual void SetModifyHdl(const Link<>& rLink) override; + private: + DECL_LINK(ModifyHdl, void*); }; @@ -388,9 +394,7 @@ namespace svt protected: virtual bool MoveAllowed(const KeyEvent& rEvt) const override; - virtual void SetModifyHdl(const Link<>& rLink) override; private: - Link<> maModifyHdl; DECL_LINK_TYPED(ListBoxSelectHdl, ListBox&, void); }; @@ -669,7 +673,7 @@ namespace svt SVT_DLLPRIVATE void implActivateCellOnMouseEvent(const BrowserMouseEvent& _rEvt, bool _bUp); SVT_DLLPRIVATE void impl_construct(); - DECL_DLLPRIVATE_LINK(ModifyHdl, void* ); + DECL_DLLPRIVATE_LINK_TYPED(ModifyHdl, LinkParamNone*, void ); DECL_DLLPRIVATE_LINK_TYPED(StartEditHdl, void*, void ); DECL_DLLPRIVATE_LINK_TYPED(EndEditHdl, void*, void ); DECL_DLLPRIVATE_LINK_TYPED(CellModifiedHdl, void*, void ); |