diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-07 22:27:35 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-11-28 13:28:28 -0500 |
commit | 450bca12a14b090feb8e288da0ea2c5e2555b9ce (patch) | |
tree | d9f28ffcf71d6798b3428a4556a39cabe78f054e /sc/source/ui/xmlsource | |
parent | 19d0fcd04ee36e66d64b0f3e3faf751f0c6cdc63 (diff) |
Handler methods for OK and Cancel.
Change-Id: I8637543dc10ade3e75205031581eeaadd1b7ca4d
Diffstat (limited to 'sc/source/ui/xmlsource')
-rw-r--r-- | sc/source/ui/xmlsource/xmlsourcedlg.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 69fb08d2efc8..2fd452de8d39 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -37,9 +37,9 @@ ScXMLSourceDlg::ScXMLSourceDlg( maFtSourceFile(this, ScResId(FT_SOURCE_FILE)), maFtMapXmlDoc(this, ScResId(FL_MAP_XML_TO_DOCUMENT)), maFtMappedCellTitle(this, ScResId(FT_MAPPED_CELL_TITLE)), + maLbTree(this, ScResId(LB_SOURCE_TREE)), maRefEdit(this, this, ScResId(ED_MAPPED_CELL)), maRefBtn(this, ScResId(BTN_MAPPED_CELL), &maRefEdit, this), - maLbTree(this, ScResId(LB_SOURCE_TREE)), maBtnOk(this, ScResId(BTN_OK)), maBtnCancel(this, ScResId(BTN_CANCEL)), maImgFileOpen(ScResId(IMG_FILE_OPEN)), @@ -54,7 +54,10 @@ ScXMLSourceDlg::ScXMLSourceDlg( maBtnSelectSource.SetModeImage(maImgFileOpen); FreeResource(); - maBtnSelectSource.SetClickHdl(LINK(this, ScXMLSourceDlg, BtnPressedHdl)); + Link aBtnHdl = LINK(this, ScXMLSourceDlg, BtnPressedHdl); + maBtnSelectSource.SetClickHdl(aBtnHdl); + maBtnOk.SetClickHdl(aBtnHdl); + maBtnCancel.SetClickHdl(aBtnHdl); Link aLink = LINK(this, ScXMLSourceDlg, GetFocusHdl); maRefEdit.SetGetFocusHdl(aLink); @@ -388,6 +391,17 @@ bool ScXMLSourceDlg::IsChildrenDirty(SvTreeListEntry* pEntry) const return false; } +void ScXMLSourceDlg::OkPressed() +{ + // Store the xml link data to document. + Close(); +} + +void ScXMLSourceDlg::CancelPressed() +{ + Close(); +} + IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl) { HandleGetFocus(pCtrl); @@ -404,6 +418,10 @@ IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn) { if (pBtn == &maBtnSelectSource) SelectSourceFile(); + else if (pBtn == &maBtnOk) + OkPressed(); + else if (pBtn == &maBtnCancel) + CancelPressed(); return 0; } |