sw/source/uibase/dbui/dbtree.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 6c580008d397f5f5f4a0bfd879308018b5d2a54f Author: Justin Luth <[email protected]> AuthorDate: Wed Jan 13 21:27:56 2021 +0300 Commit: Xisco Fauli <[email protected]> CommitDate: Tue Jan 19 11:45:55 2021 +0100 tdf#119610 tdf#112634: Don't show broken connections - RevB This changes LO 6.0 commit 75a881829f19439245cdb859fc16d59461992f79 to use a light-weight check to see if a database exists. The previous way made a connection, which is extremely expensive if there is a password, or if network traffic needs to timeout, etc. And if there are multiple registered databases like that... Change-Id: I980cb6979cfc7cae8f1251f3459718192459aaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109242 Tested-by: Jenkins Reviewed-by: Justin Luth <[email protected]> (cherry picked from commit 647c9de0338350c1b5eff4b9adf08bd06930e36b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109402 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index 4dee21a4ed0c..9b23f2a4f457 100644 --- a/sw/source/uibase/dbui/dbtree.cxx +++ b/sw/source/uibase/dbui/dbtree.cxx @@ -157,8 +157,10 @@ void SwDBTreeList::InitTreeList() OUString aImg(RID_BMP_DB); for (const OUString& rDBName : std::as_const(aDBNames)) { - Reference<XConnection> xConnection = pImpl->GetConnection(rDBName); - if (xConnection.is()) + // If this database has a password or a (missing) remote connection, + // then it might take a long time or spam for unnecessary credentials. + // Just check that it basically exists to weed out any broken/obsolete registrations. + if (SwDBManager::getDataSourceAsParent(Reference<sdbc::XConnection>(), rDBName).is()) { m_xTreeView->insert(nullptr, -1, &rDBName, nullptr, nullptr, nullptr, true, m_xScratchIter.get()); m_xTreeView->set_image(*m_xScratchIter, aImg); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
