diff options
authorStephan Bergmann <>2019-11-21 15:00:48 +0100
committerStephan Bergmann <>2019-11-21 17:16:37 +0100
commitfa314082a89f917912dd2e610ac19991b84921fa (patch)
parent9f88256783a3618244aa0c75ba4c0ba70cabc0bd (diff)
tdf#128598: Drop dubious file: -> smb: conversion completely
As discussed in the commit message of 46c645bf4e9909f5296e75028f1f5434e83942d2 "Move dubious file: -> smb: conversion from INetURLObject to file UCP", it is unclear why exactly file://<host>/ URLs should be retried as smb URLs on Linux. That commit had tried to keep that dubious feature alive with a different hack, but tdf#128598 "FILEOPEN: Certain syntax of opening file from samba share results in Document in Use dialog" demonstrates that that hack doesn't work well either (see libreoffice-6-4 <> "tdf#128598: Revert 'Move dubious file: -> smb: conversion from..." for further details). So just drop the dubious (mis-)feature entirely from LO 6.5. On Linux, use GIO's smb URLs to access Windows SMB shares, just like you would use e.g. GIO's afp URLs to access AppleTalk resources. Change-Id: I2ad53f508919a5f581e3afc4c4a5d26461b8ed2b Reviewed-on: Tested-by: Jenkins Reviewed-by: Stephan Bergmann <>
1 files changed, 0 insertions, 17 deletions
diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx
index 7c5c66e23e6e..937487e749cc 100644
--- a/ucb/source/ucp/file/prov.cxx
+++ b/ucb/source/ucp/file/prov.cxx
@@ -20,8 +20,6 @@
#include <osl/security.hxx>
#include <osl/file.hxx>
#include <osl/socket.h>
-#include <tools/urlobj.hxx>
-#include <ucbhelper/content.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -171,21 +169,6 @@ FileProvider::queryContent(
if( err )
- // Hack to retry file://<host>/... URLs as smb URLs:
- INetURLObject url(xIdentifier->getContentIdentifier());
- if (url.GetProtocol() == INetProtocol::File
- && !url.GetHost(INetURLObject::DecodeMechanism::NONE).isEmpty())
- {
- url.changeScheme(INetProtocol::Smb);
- ucbhelper::Content content;
- if (ucbhelper::Content::create(
- url.GetMainURL(INetURLObject::DecodeMechanism::NONE),
- css::uno::Reference<css::ucb::XCommandEnvironment>(), m_xContext, content))
- {
- return content.get();
- }
- }
throw IllegalIdentifierException( THROW_WHERE );