diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-12-06 15:23:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-12-06 15:23:39 +0000 |
commit | 390e5f5ba11aecd098af2c174a0d87df286b7ff9 (patch) | |
tree | df5daaa49600a2175c67d18921a2c92053bb5991 /sw | |
parent | fa22c33794245d64056ed0f7b6260ddd60f9dc70 (diff) |
use explicit cancel/close handler
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/fldui/fldtdlg.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/inc/fldtdlg.hxx | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 2bdbf6c50b7d..81b754c10a26 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -87,6 +87,7 @@ SwFldDlg::SwFldDlg(SfxBindings* pB, SwChildWinWrapper* pCW, Window *pParent) GetCancelButton().SetText(String(SW_RES(STR_FLD_CLOSE))); GetCancelButton().SetHelpId(HID_FIELD_CLOSE); GetCancelButton().SetHelpText(aEmptyStr); // so that generated help text is used + GetCancelButton().SetClickHdl(LINK(this, SwFldDlg, CancelHdl)); FreeResource(); @@ -223,6 +224,13 @@ IMPL_LINK( SwFldDlg, OKHdl, Button *, EMPTYARG ) return 0; } +IMPL_LINK( SwFldDlg, CancelHdl, Button *, EMPTYARG ) +{ + Close(); + return 0; +} + + /*-------------------------------------------------------------------- Description: newly initialise dialog after Doc-Switch --------------------------------------------------------------------*/ diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx index 013002276b9c..26dc75b63705 100644 --- a/sw/source/ui/inc/fldtdlg.hxx +++ b/sw/source/ui/inc/fldtdlg.hxx @@ -54,6 +54,7 @@ public: virtual ~SwFldDlg(); DECL_LINK( OKHdl, Button * ); + DECL_LINK( CancelHdl, Button * ); void Initialize(SfxChildWinInfo *pInfo); void ReInitDlg(); |