summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorSarper Akdemir <sarper.akdemir@allotropia.de>2024-06-21 12:40:11 +0200
committerSarper Akdemir <sarper.akdemir@allotropia.de>2024-06-28 12:06:25 +0200
commit2ad7d5cfb0288559921b0d9ccad0a23d95cde452 (patch)
tree251a5106cb6bc904754f379f570bd3ec6414e1fa /cui/source
parent93dbba5361b2fd4b4b9a62725edab5e59b8be575 (diff)
make additionsdialog show connection errors
use non-scoped interaction handler instead of the scoped SimpleFileAccessInteraction so that errors will be handled with correct pop-up dialogs. Also throw the correct type of DAVException for USC_CONNECT_FAILED in Content::Open Change-Id: If2031dfa2796f91fad6866bc9608194c92658b96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169519 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/AdditionsDialog.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/cui/source/dialogs/AdditionsDialog.cxx b/cui/source/dialogs/AdditionsDialog.cxx
index 61bee50455b3..3f57676a13ec 100644
--- a/cui/source/dialogs/AdditionsDialog.cxx
+++ b/cui/source/dialogs/AdditionsDialog.cxx
@@ -71,11 +71,12 @@ using namespace ::com::sun::star::beans;
namespace
{
// Gets the content of the given URL and returns as a standard string
-std::string ucbGet(const OUString& rURL)
+std::string ucbGet(const OUString& rURL, const css::uno::Reference<css::awt::XWindow>& xParentWin)
{
try
{
- auto const s = utl::UcbStreamHelper::CreateStream(rURL, StreamMode::STD_READ);
+ auto const s
+ = utl::UcbStreamHelper::CreateStream(rURL, StreamMode::STD_READ, xParentWin, false);
if (!s)
{
SAL_WARN("cui.dialogs", "CreateStream <" << rURL << "> failed");
@@ -404,7 +405,10 @@ void SearchAndParseThread::execute()
if (m_bIsFirstLoading)
{
- std::string sResponse = !m_bUITest ? ucbGet(m_pAdditionsDialog->m_sURL) : "";
+ const auto pDialog = m_pAdditionsDialog->getDialog();
+ std::string sResponse = !m_bUITest ? ucbGet(m_pAdditionsDialog->m_sURL,
+ pDialog ? pDialog->GetXWindow() : nullptr)
+ : "";
parseResponse(sResponse, m_pAdditionsDialog->m_aAllExtensionsVector);
std::sort(m_pAdditionsDialog->m_aAllExtensionsVector.begin(),
m_pAdditionsDialog->m_aAllExtensionsVector.end(),