Kaydet (Commit) 022deeb7 authored tarafından Katarina Behrens's avatar Katarina Behrens

Make it more obvious that there are no named ranges

and thus the selected doc can't be used as the source of external
data for this sheet. In other words, help the user figure out
why is OK button disabled

Change-Id: Ie1b999c9c3640397e9f6f6ee321d3a5a5d63fa3b
Reviewed-on: https://gerrit.libreoffice.org/72075
Tested-by: Jenkins
Reviewed-by: 's avatarKatarina Behrens <Katarina.Behrens@cib.de>
üst d1d44e1d
...@@ -370,6 +370,7 @@ ...@@ -370,6 +370,7 @@
#define STR_NO_USER_DATA_AVAILABLE NC_("sharedocumentdlg|nouserdata", "No user data available.") #define STR_NO_USER_DATA_AVAILABLE NC_("sharedocumentdlg|nouserdata", "No user data available.")
#define STR_EXCLUSIVE_ACCESS NC_("sharedocumentdlg|exclusive", "(exclusive access)") #define STR_EXCLUSIVE_ACCESS NC_("sharedocumentdlg|exclusive", "(exclusive access)")
#define STR_NO_NAMED_RANGES_AVAILABLE NC_("STR_NO_NAMED_RANGES_AVAILABLE", "No named ranges available in the selected document")
#endif #endif
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include <rangeutl.hxx> #include <rangeutl.hxx>
#include <docsh.hxx> #include <docsh.hxx>
#include <tablink.hxx> #include <tablink.hxx>
#include <scresid.hxx>
#include <strings.hrc>
ScLinkedAreaDlg::ScLinkedAreaDlg(weld::Window* pParent) ScLinkedAreaDlg::ScLinkedAreaDlg(weld::Window* pParent)
: GenericDialogController(pParent, "modules/scalc/ui/externaldata.ui", "ExternalDataDialog") : GenericDialogController(pParent, "modules/scalc/ui/externaldata.ui", "ExternalDataDialog")
...@@ -260,8 +262,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges() ...@@ -260,8 +262,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
m_xLbRanges->thaw(); m_xLbRanges->thaw();
if (m_xLbRanges->n_children() == 1) if (m_xLbRanges->n_children() >= 1)
m_xLbRanges->select(0); m_xLbRanges->select(0);
else
{
m_xLbRanges->append_text(ScResId(STR_NO_NAMED_RANGES_AVAILABLE));
m_xLbRanges->set_sensitive(false);
}
} }
void ScLinkedAreaDlg::UpdateEnable() void ScLinkedAreaDlg::UpdateEnable()
......
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