diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-10-18 13:01:05 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-10-19 10:11:14 +0200 |
commit | b2d4e18de07891896a37405f151b80a1e0b0eab6 (patch) | |
tree | e8969cb340be30d22d58c07dbcbc1e6eedbbef29 /fpicker | |
parent | tdf#145169 have one button per response (diff) | |
download | core-b2d4e18de07891896a37405f151b80a1e0b0eab6.tar.gz core-b2d4e18de07891896a37405f151b80a1e0b0eab6.zip |
Related: tdf#145169 unwanted dialogs on sftp save to remote to a new document
which is similar to:
commit f12e483589888f87843026ceff5ae3c1e615ca02
Date: Mon Feb 1 16:04:49 2016 +0100
Fix tdf#97500 Reinstate missing file error dialog on WebDAV
this all looks a bit dubious, but make a safely backportable change
first
Change-Id: Ia6dbaacf7024d05083c336135a80b5acf607dfc5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123642
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'fpicker')
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index dceb9da84eec..ff4e0b75c07f 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -1144,6 +1144,9 @@ bool RemoteFilesDialog::ContentIsFolder( const OUString& rURL ) { Reference< XInteractionHandler > xInteractionHandler( InteractionHandler::createWithParent( m_xContext, nullptr ), UNO_QUERY_THROW ); + INetURLObject aURLObject(rURL); + if (aURLObject.isAnyKnownWebDAVScheme() || aURLObject.GetProtocol() == INetProtocol::Sftp) + xInteractionHandler.set(new comphelper::StillReadWriteInteraction(xInteractionHandler, xInteractionHandler)); Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); ::ucbhelper::Content aContent( rURL, xEnv, m_xContext ); @@ -1164,7 +1167,8 @@ bool RemoteFilesDialog::ContentIsDocument( const OUString& rURL ) Reference< XInteractionHandler > xInteractionHandler( InteractionHandler::createWithParent( m_xContext, nullptr ), UNO_QUERY_THROW ); //check if WebDAV or not - if ( !INetURLObject( rURL ).isAnyKnownWebDAVScheme() ) + INetURLObject aURLObject(rURL); + if (!aURLObject.isAnyKnownWebDAVScheme() && aURLObject.GetProtocol() != INetProtocol::Sftp) { // no webdav, use the interaction handler as is Reference< XCommandEnvironment > xEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); |