Kaydet (Commit) 40eb44c1 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Enable the 'Import' button only when linked data exists.

It makes no sense to allow import if there is no link specified.

Change-Id: I3ff4bfa7fd78c79a2c4ee74c7a1a34d2b7a2d1c4
üst 582931ec
...@@ -104,8 +104,10 @@ ScXMLSourceDlg::ScXMLSourceDlg( ...@@ -104,8 +104,10 @@ ScXMLSourceDlg::ScXMLSourceDlg(
aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl); aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl);
maRefEdit.SetModifyHdl(aLink); maRefEdit.SetModifyHdl(aLink);
maBtnOk.Disable();
SetNonLinkable(); SetNonLinkable();
maBtnSelectSource.GrabFocus(); maBtnSelectSource.GrabFocus(); // Initial focus is on the select source button.
} }
ScXMLSourceDlg::~ScXMLSourceDlg() ScXMLSourceDlg::~ScXMLSourceDlg()
...@@ -559,6 +561,10 @@ void ScXMLSourceDlg::RefEditModified() ...@@ -559,6 +561,10 @@ void ScXMLSourceDlg::RefEditModified()
else else
maCellLinks.erase(pEntry); maCellLinks.erase(pEntry);
} }
// Enable the import button only when at least one link exists.
bool bHasLink = !maCellLinks.empty() || !maRangeLinks.empty();
maBtnOk.Enable(bHasLink);
} }
IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl) IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment