sw/source/uibase/dbui/dbtree.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit ebdf896c9d3260b544ebe67ffa09d21be603d170 Author: Justin Luth <[email protected]> AuthorDate: Wed Jan 13 21:27:56 2021 +0300 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 20 12:17:28 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]> (cherry picked from commit 6c580008d397f5f5f4a0bfd879308018b5d2a54f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109582 Reviewed-by: Michael Stahl <[email protected]> diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx index cf31941c31db..f9ffad0f26ab 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, &aImg, true, nullptr); } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
