diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-21 11:53:08 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-21 16:47:19 +0100 |
commit | 4d9fbf446e2807d27fc1855e9be2e55abedcee4f (patch) | |
tree | f9181f813201499acbb02ae97b295eb15e644650 /ucb | |
parent | 99e0e14d2441c44b554608da416f3cd3b2207521 (diff) |
tdf#128598: Revert "Move dubious file: -> smb: conversion from...
INetURLObject to file UCP"
It turns out that there is lots of code in and around e.g.
SfxMedium::LockOrigFileOnDemand (sfx2/source/doc/docfile.cxx) that treats
document URLs non-generically and treats file URLs specially. That means that
it does not work to transparently rewrite a file URL as an smb URL in the
underlying UCB layer. So for libreoffice-6-4 revert the change again. (For
master towards LO 6.5, I plan to instead completely drop the feature of silently
treating certain forms of file URLs on Linux as smb URLs.)
This reverts commit 46c645bf4e9909f5296e75028f1f5434e83942d2.
Conflicts:
tools/qa/cppunit/test_urlobj.cxx
ucb/source/ucp/file/prov.cxx
Change-Id: I94ac0637115bea36924099951efd8542854a727d
Reviewed-on: https://gerrit.libreoffice.org/83396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/Library_ucpfile1.mk | 1 | ||||
-rw-r--r-- | ucb/source/ucp/file/prov.cxx | 19 |
2 files changed, 0 insertions, 20 deletions
diff --git a/ucb/Library_ucpfile1.mk b/ucb/Library_ucpfile1.mk index f676eacbde3f..4505708cbac8 100644 --- a/ucb/Library_ucpfile1.mk +++ b/ucb/Library_ucpfile1.mk @@ -21,7 +21,6 @@ $(eval $(call gb_Library_use_libraries,ucpfile1,\ cppu \ cppuhelper \ sal \ - tl \ ucbhelper \ )) diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 7c5c66e23e6e..9a7052e17304 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> @@ -170,24 +168,7 @@ FileProvider::queryContent( aUnc ); 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 ); - } return Reference< XContent >( new BaseContent( m_pMyShell.get(), xIdentifier, aUnc ) ); } |