[Libreoffice-commits] core.git: sc/inc sc/source
Katarina Behrens (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 13 09:12:31 UTC 2019
sc/inc/strings.hrc | 1 +
sc/source/ui/miscdlgs/linkarea.cxx | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 022deeb79ef693550ea762c9cc899806ae4b374c
Author: Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Thu May 9 20:46:45 2019 +0200
Commit: Katarina Behrens <Katarina.Behrens at cib.de>
CommitDate: Mon May 13 11:11:46 2019 +0200
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: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/sc/inc/strings.hrc b/sc/inc/strings.hrc
index 3a5e2710aed0..d5685ed3c626 100644
--- a/sc/inc/strings.hrc
+++ b/sc/inc/strings.hrc
@@ -370,6 +370,7 @@
#define STR_NO_USER_DATA_AVAILABLE NC_("sharedocumentdlg|nouserdata", "No user data available.")
#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
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index eedb528c704e..1ad934835b26 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -32,6 +32,8 @@
#include <rangeutl.hxx>
#include <docsh.hxx>
#include <tablink.hxx>
+#include <scresid.hxx>
+#include <strings.hrc>
ScLinkedAreaDlg::ScLinkedAreaDlg(weld::Window* pParent)
: GenericDialogController(pParent, "modules/scalc/ui/externaldata.ui", "ExternalDataDialog")
@@ -260,8 +262,13 @@ void ScLinkedAreaDlg::UpdateSourceRanges()
m_xLbRanges->thaw();
- if (m_xLbRanges->n_children() == 1)
+ if (m_xLbRanges->n_children() >= 1)
m_xLbRanges->select(0);
+ else
+ {
+ m_xLbRanges->append_text(ScResId(STR_NO_NAMED_RANGES_AVAILABLE));
+ m_xLbRanges->set_sensitive(false);
+ }
}
void ScLinkedAreaDlg::UpdateEnable()
More information about the Libreoffice-commits
mailing list