[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Dec 6 07:24:01 PST 2011
sw/source/ui/fldui/fldtdlg.cxx | 8 ++++++++
sw/source/ui/inc/fldtdlg.hxx | 1 +
2 files changed, 9 insertions(+)
New commits:
commit 390e5f5ba11aecd098af2c174a0d87df286b7ff9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Dec 6 15:23:16 2011 +0000
use explicit cancel/close handler
diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx
index 2bdbf6c..81b754c 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 0130022..26dc75b 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();
More information about the Libreoffice-commits
mailing list